[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#941937: apt: Unexpected linkage dependency on libsystemd



On Wed, 9 Oct 2019 17:36:07 +0200 David Kalnischkies
<david@kalnischkies.de> wrote:

> As Julian already said, it is "just" used for its dbus communication
> implementation. We don't require systemd to be your init or to be even
> functional. So I guess proposing an alternative which a) works equally
> well and b) doesn't add additional bootstrapping complications has
> better chances of acceptance – assuming that exists as the obvious
> choice libdbus links against libsystemd as well even before checking a)
> and b) …
>

I'm not a big expert in systemd and never will be, but perhaps
`systemd-inhibit --what="shutdown" --mode="block" apt ...` should do
about the same thing. If every invocation of apt should be like that
then maybe `alias apt='systemd-inhibit --what="shutdown"
--mode="block" apt'` in .bashrc can do the trick. This does not
require any patching whatsoever.

This linking to libsystemd is redundant. If issue is with dpkg leaving
system in inconsistent state when interrupted, then perhaps this issue
has to be fixed in dpkg, if issue is with systemd incorrectly
interrupting dpkg, then in systemd. I think that dependency on
systemd:

1) Doesn't solve any underlying issues;
2) Doesn't solve any issues on systems without systemd;
3) Doesn't solve the issue on systems with systemd installed but not
running because in that case there won't be anyone to react on dbus
message and inhibit shutdown, so this is not going to work.

So it doesn't do much anyway, it attempts to solve some very specific
issue in very specific environment, but it doesn't do that very well
and can be replaced with one shell alias.

It would be really nice if this dependency is removed and ideally
underlying issue(s) properly fixed instead of applying band aid here
and there.


Reply to: