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

Bug#941937: apt: Unexpected linkage dependency on libsystemd



Control: tag -1 wontfix
Control: severity -1 wishlist

On Mon, Oct 07, 2019 at 08:22:33PM +0200, Andreas Messer wrote:
> Package: apt
> Version: 1.8.2
> Severity: normal
> 
> I observed a linkage dependency on libsystemd. This was unexpected for me
> since I wouldn't expect a package manager depend on it. A package manager should
> be as lean as possible.
> 
> Having reviewed the code, the only function using libsystemd is used to talk on dbus 
> to inhibit system shutdown. Something which will work for systemd only.
> 
> Would it make sense to use dlopen() to dynamically load libsystemd when needed
> and avoid the hard dependency on libsystemd? If systemd is installed, libsystemd
> will be available anyways.

This is too fragile, it broke our udev integration last time for years, hence
we are not using dlopen() anymore. A simple solution is the best solution.

We have no intention to change anything in the near future. libsystemd is
widely available (or libelogind0 is), and is basically essential, is tiny,
and it's dbus library is the easiest to use.

I expect that apt will eventually switch to using libglib's dbus support,
once we implement a daemon, but that's a bit off, and that stuff might live
in a separate binary to not pull in libglib on systems that don't need a
daemon.

-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en


Reply to: