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

Bug#941937: apt: Unexpected linkage dependency on libsystemd



Hi David,

On Wed, Oct 9, 2019 at 6:03 PM David Kalnischkies <david@kalnischkies.de> wrote:
>
> On Wed, Oct 09, 2019 at 12:53:45AM +0200, Adam Borowski wrote:
> > 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 think systemd has to many fingers in too many areas to switch it out at
> runtime. But I also think you and everyone else reading this bugreport
> knows that better than I do. That might be unfortunate, but as a user is
> unlikely to change from and to it a lot it seems like a waste to
> optimize for potential problems in "unrelated" packages (if we called
> every package with a failing maintainer script related to apt because it
> makes apt fail, apt would be related to the entire archive).
>
> APT is also not "the very package supposed to fix such a problem". The
> entire program family is supposed to start from a consistent state and
> end in a consistent state. Some tools like apt might have a --fix-broken
> mode which tries to help if it is really easy, but the only tool which
> can help you for real if you deal with major breakage is dpkg: That not
> only knows what a maintainer script is (apt doesn't) – it is also
> essential, so it [normally] works even in inconsistent states.
>
>
> > > 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.
>
> The Inhibit() is implemented in libapt so that shutdown is inhibited for
> all libapt-based tools from aptitude to unattended-upgrades – and so
> they all gain this linkage via libapt.

For the record unattended-upgrades handles inhibition on its own
(differently) and did so before libapt added inhibition handling.

Cheers,
Balint

-- 
Balint Reczey
Ubuntu & Debian Developer


Reply to: