Bug#784604: systemd: can't remove systemd unless it is correctly running

Michael Biebl biebl at debian.org
Thu May 7 13:30:22 BST 2015


Am 07.05.2015 um 06:38 schrieb Brian May:
> Unpacking systemd-shim (9-1) ...
> Processing triggers for systemd (215-17) ...
> Failed to get D-Bus connection: No such file or directory
> dpkg: error processing package systemd (--unpack):
>  subprocess installed post-installation script returned error exit status 1
> Processing triggers for man-db (2.7.0.2-5) ...
> Processing triggers for dbus (1.8.16-1) ...
> Errors were encountered while processing:
>  systemd
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> 
> I think other packages that call systemctl unconditionally in prerm or postrm
> scripts will have exactly the same problem.

So, systemd.postinst seems to fail in the trigger
We do not call systemctl uncondionally here:

_systemctl() {
    if [ -d /run/systemd/system ]; then
        systemctl "$@"
    fi
}


if [ "$1" = "triggered" ]; then
   _systemctl daemon-reload
   exit 0
fi

So, this looks like you (wrongly) had a /run/systemd/system directory at
this point?
We can (and probably should) add a "|| true" to the daemon-reload call,
since we don't really care about the return code and shouldn't fail
installation in such a case.

That said, I'm still curious, why the systemctl call was made in the
first place. systemctl also complains with a D-Bus error.
Did you have a /var/run/dbus/system_bus_socket? If that socket does not
exist, systemctl should fall back to use a private dbus socket which
doesn't require a run dbus system bus.
Was dbus installed at this point dbus.service and dbus.socket correctly
running?

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20150507/a59070ca/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list