On Mon, Oct 07, 2019 at 09:23:01PM +0200, Julian Andres Klode wrote: > On Mon, Oct 07, 2019 at 08:22:33PM +0200, Andreas Messer wrote: > > 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.
It's not about not being available in normal use, it's because switching the library's implementation is fragile -- especially if systemd's prerm fails which it's notorious to. This will make apt fail, and apt happens to be the very package supposed to fix such a problem. > 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. Would you accept a patch to move the inhibit function to a small separate binary? That'd be a very simple solution. Meow! -- ⢀⣴⠾⠻⢶⣦⠀ A MAP07 (Dead Simple) raspberry tincture recipe: 0.5l 95% alcohol, ⣾⠁⢠⠒⠀⣿⡁ 1kg raspberries, 0.4kg sugar; put into a big jar for 1 month. ⢿⡄⠘⠷⠚⠋⠀ Filter out and throw away the fruits (can dump them into a cake, ⠈⠳⣄⠀⠀⠀⠀ etc), let the drink age at least 3-6 months.