Package: apt
Version: 3.0.3
Severity: normal
X-Debbugs-Cc: [email protected]
Before invoking dpkg to perform the work, apt-get connects to DBUS in
order to make the seat-manager inhibit shutdowns.
If you don't have systemd-logind or elogind running (because e.g. you
were forced to install elogind as a dependency, but you disabled
it), this hangs for 25 seconds, until dbus reports timeout on
org.freedesktop.login1.
A quick and dirty workaround consists in putting
DPkg::Inhibit-Shutdown "false";
in a file in /etc/apt/apt.conf.d. I could not find references to that
option in apt.conf(5), and had to search in the source code
(apt-pkg/deb/dpkgpm.cc) to discover it. Therefore I kindly ask the
developers to document it, maybe together with Binary::apt::Pager [1].
Perhaps I am an old beard, but IMHO a package manager that depends on an
external daemon (and more generally on libsystemd) for something that
could be implemented with a lock file is a terrible idea. Sooner or
later, someone will rewrite "ls" or "date" to call into dbus, and maybe
also contact remote servers, just to be sure...
Best regards,
g.
[1] BTW I've been seeing "WARNING: apt does not have a stable CLI
interface. Use with caution in scripts" for years, because of course why
add "| less" (or "| grep something") when you have a helpful internal
pager stuck in your throat?
-- System Information:
Debian Release: 13.3