On Thu, 17 Sep 2015 22:59:56 +0200, Joachim Breitner wrote:

> > But local-apt-repository has a hard dependency on systemd and is 
> > hence uninstallable on systems without systemd.
> 
> I am a bit worried about the postinst scripts, in particular this part:
> 
> # Automatically added by dh_systemd_start
> if [ -d /run/systemd/system ]; then
>       systemctl --system daemon-reload >/dev/null || true
>       deb-systemd-invoke start local-apt-repository.path >/dev/null || true
> fi
> # End automatically added section
> 
> Will this not break if systemd is not installed, but
> /run/systemd/system is still around? But then it might be argued that
> this would be a bug in dh_systemd_start.

This does indeed not end very well. I tried now:
- rebuild with systemd moved to Recommends
- `mkdir -p /run/systemd/system' to test this situation
- dpkg -i local-apt-repository_0.2_all.deb

And that's how it looks like:

Selecting previously unselected package local-apt-repository.
(Reading database ... 413166 files and directories currently installed.)
Preparing to unpack .../local-apt-repository_0.2_all.deb ...
Unpacking local-apt-repository (0.2) ...
Setting up local-apt-repository (0.2) ...
Can't exec "systemctl": No such file or directory at 
/usr/bin/deb-systemd-helper line 542.
/var/lib/dpkg/info/local-apt-repository.postinst: line 38: systemctl: command 
not found
Can't exec "/bin/systemctl": No such file or directory at 
/usr/bin/deb-systemd-invoke line 88.
Use of uninitialized value $enabled_output in pattern match (m//) at 
/usr/bin/deb-systemd-invoke line 90.
Can't exec "/bin/systemctl": No such file or directory at 
/usr/bin/deb-systemd-invoke line 93.
local-apt-repository.path is a disabled or a static unit, not starting it.


Without /run/systemd/system there are no errors.



> > Maybe you could also use incron or inoticoming as alternative 
> > directory watching tool on non-systemd systems.
> I’d prefer not adding complexity that is not required on default Debian
> systems; I will however accept a patch (as required per #746715).

I guess an example or a howto in the README would be fine.


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Lightnin' Hopkins: Wonder why

Attachment: signature.asc
Description: Digital Signature

Reply via email to