After upgrading to apt 3.1.11, "apt full-upgrade" wants to install a bunch of packages as dependencies. However, those packages appear to be Recommends of a certain package as adding --no-install-recommends to the commandline makes it behave normally. The issue does not occur when using apt 3.1.9. Here's a dump : # apt full-upgrade Installing dependencies: accountsservice libhandy-1-0 anacron libharfbuzz-icu0 blueman libharfbuzz-subset0 bluez libhidapi-hidraw0 bluez-obexd libhyphen0 bubblewrap libical3t64 catdoc libieee1284-3t64 cinnamon libimobiledevice-1.0-6 cinnamon-common libimobiledevice-glue-1.0-0 cinnamon-control-center libjavascriptcoregtk-4.1-0 cinnamon-control-center-data libjavascriptcoregtk-6.0-1 cinnamon-core libjim0.83 cinnamon-desktop-data libjxl-gdk-pixbuf cinnamon-l10n libkeybinder-3.0-0 cinnamon-screensaver libmanette-0.2-0 cinnamon-session libmbim-glib4 cinnamon-session-common libmbim-proxy cinnamon-settings-daemon libmbim-utils cjs libmm-glib0 colord libmozjs-128-0 colord-data libmsgraph-1-1 cracklib-runtime libmspack0t64 cups-pk-helper libmtp-common desktop-base libmtp-runtime docbook-xml libmtp9t64 evolution-data-server libmuffin0t64 evolution-data-server-common libnautilus-extension4 evolution-ews-core libndp0 exif libnemo-extension1 file-roller libnl-route-3-200 fonts-dejavu libnm0 fonts-dejavu-extra libnma-common fonts-quicksand libnma0 gcr libopenfec1 gcr4 libpam-gnome-keyring geocode-glib-common libpcsclite1 gir1.2-accountsservice-1.0 libphonenumber8 gir1.2-camel-1.2 libpipewire-0.3-modules gir1.2-caribou-1.0 libplist-2.0-4 gir1.2-cinnamondesktop-3.0 libplymouth5 gir1.2-cmenu-3.0 libpulsedsp gir1.2-cvc-1.0 libpwquality-common gir1.2-ecal-2.0 libpwquality1 gir1.2-edataserver-1.2 libqmi-glib5 gir1.2-gck-1 libqmi-proxy gir1.2-gcr-3 libqmi-utils gir1.2-gkbd-3.0 libqrtr-glib0 gir1.2-graphene-1.0 librest-1.0-0 gir1.2-gsound-1.0 libroc0.4 gir1.2-ical-3.0 libsane-common gir1.2-json-1.0 libsane1 gir1.2-keybinder-3.0 libsimdutf27 gir1.2-meta-muffin-0.0 libsnmp-base gir1.2-nemo-3.0 libsnmp40t64 gir1.2-nm-1.0 libstemmer0d gir1.2-nma-1.0 libteamdctl0 gir1.2-notify-0.7 libtimezonemap-data gir1.2-polkit-1.0 libtimezonemap1 gir1.2-timezonemap-1.0 libupower-glib3 gir1.2-upowerglib-1.0 libusbmuxd-2.0-7 gir1.2-xapp-1.0 libvte-2.91-0 gir1.2-xkl-1.0 libvte-2.91-common gir1.2-xmlb-2.0 libwebkit2gtk-4.1-0 gkbd-capplet libwebkitgtk-6.0-4 gnome-backgrounds libwireplumber-0.5-0 gnome-disk-utility libwoff1 gnome-keyring libxapp-gtk3-module gnome-keyring-pkcs11 libxapp1 gnome-online-accounts libxcb-res0 gnome-online-accounts-gtk libxdo3 gnome-terminal libxklavier16 gnome-terminal-data libxml++2.6-2v5 gstreamer1.0-libav libxmlb2 gvfs-backends libyelp-1-0 gvfs-fuse mate-icon-theme html2text metacity-common hwdata mobile-broadband-provider-info id3 modemmanager inxi muffin ipp-usb muffin-common iso-flags-png-320x240 nautilus-extension-gnome-terminal libaccountsservice0 nemo libadwaita-1-0 nemo-data libappstream5 nemo-fileroller libavahi-glib1 network-manager libbluetooth3 network-manager-l10n libcairo-script-interpreter2 nm-connection-editor libcamel-1.2-64t64 p11-kit libcanberra-gtk3-0 p11-kit-modules libcanberra-gtk3-module pinentry-gnome3 libcanberra-pulse pipewire libcanberra0 pipewire-bin libcaribou-common pipewire-pulse libcaribou0 plymouth libcinnamon-control-center1 plymouth-label libcinnamon-desktop4t64 pnp.ids libcinnamon-menu-3-0 ppp libcjs0 pulseaudio libcolorhug2 pulseaudio-module-bluetooth libconfig++11 pulseaudio-utils libcrack2 python-tinycss2-common libcvc0t64 python3-dbus libdbusmenu-glib4 python3-pampy libdbusmenu-gtk3-4 python3-pexpect libebackend-1.2-11t64 python3-ptyprocess libebook-1.2-21t64 python3-pytz libebook-contacts-1.2-4t64 python3-setproctitle libecal-2.0-3 python3-tinycss2 libedata-book-1.2-27t64 python3-tz libedata-cal-2.0-2t64 python3-xapp libedataserver-1.2-27t64 python3-xlib libedataserverui-1.2-4t64 python3-xlrd libexempi8 rtkit libffado2 sane-airscan libfyaml0 sane-utils libgail-3-0t64 sgml-data libgck-1-0 sound-theme-freedesktop libgcr-base-3-1 untex libgcr-ui-3-1 update-inetd libgee-0.8-2 upower libgeocode-glib-2-0 usb-modeswitch libglibmm-2.4-1t64 usb-modeswitch-data libgnomekbd-common usbmuxd libgnomekbd8 user-session-migration libgoa-1.0-0b wireless-regdb libgoa-1.0-common wireplumber libgoa-backend-1.0-2 wpasupplicant libgphoto2-6t64 xapp-sn-watcher libgphoto2-l10n xapps-common libgphoto2-port12t64 xdg-dbus-proxy libgsf-1-114 xdg-desktop-portal libgsf-1-common xdg-desktop-portal-gtk libgsound0t64 xdg-desktop-portal-xapp libgtk-4-1 xdg-terminal-exec libgtk-4-bin yelp libgtk-4-common yelp-xsl libgusb2 zenity libgweather-4-0t64 zenity-common libgweather-4-common Suggested packages: gnome-control-center libusbmuxd-tools rsyslog pcscd | system-log-daemon hplip tk snmp-mibs-downloader | wish gstreamer1.0-alsa cinnamon-desktop-environment eog cinnamon-doc evince python3-opencv | pdf-viewer colord-sensor-argyll totem gnome | mp3-decoder | kde-standard libteam-utils | xfce4 pinentry-doc | wmaker libspa-0.2-bluetooth docbook plymouth-themes docbook-defguide pavumeter docbook-dsssl pavucontrol docbook-xsl paprefs evolution python-dbus-doc arj python-pexpect-doc lha python-tinycss2-doc lzop unpaper ncompress perlsgml rpm2cpio w3-recs rzip opensp squashfs-tools comgt unace wvdial unalz libspa-0.2-libcamera unar wireplumber-doc zoo wpagui wsdd libengine-pkcs11-openssl libxml-dumper-perl mate-xapp-status-applet gphoto2 xdg-desktop-portal-gnome I have tried running apt with -oDebug::pkgAutoRemove=1 and followed the chain of the cinnamon package. It seems like the installation of this package is triggered as a dependency of the "cinnamon-session" package, which is triggered by "xinit" 's dependency on "x-session-manager" : Following dep: xorg:amd64 Depends on xinit:amd64 < 1.4.2-1 @ii K >, provided by xinit:amd64 1.4.2-1 (1/1) Marking: xinit:amd64 1.4.2-1 (Dependency) Following dep: xinit:amd64 Recommends on xterm:amd64 < 402-1 @ii mK >, provided by xterm:amd64 402-1 (1/1) Following dep: xinit:amd64 Recommends on x-window-manager:amd64 < none @un mH >, provided by fluxbox:amd64 1.3.7-1+b1 (1/1) /* snipped */ Following dep: xorg:amd64 Depends on xinit:amd64 < 1.4.2-1 @ii K >, provided by xinit:amd64 1.4.2-1 (1/1) Marking: xinit:amd64 1.4.2-1 (Dependency) Following dep: xinit:amd64 Recommends on xterm:amd64 < 402-1 @ii mK >, provided by xterm:amd64 402-1 (1/1) Following dep: xinit:amd64 Recommends on x-session-manager:amd64 < none @un mH >, provided by cinnamon-session:amd64 6.4.2-1 (1/1) "xinit" recommends either one of x-terminal-emulator, x-window-manager, or x-session-manager. The first two recommends are satisfied via respectively xterm and fluxbox (which apt correctly noticed, at least according to the logs) so I'm surprised to see it wanting to install a session manager that I don't really want in this system. However, this may be a shot in the dark as I don't really know what I'm looking for or if this is the best way to debug this. Pointers welcome, I'm holding apt at 3.1.9 for now.
Control: tag -1 moreinfo This isn't useful as it debugs the autoremover, not the solver. You'll want to pass -o Debug::APT::Solver=3 (or 2,1). Particularly have a look at the line Install:<name> for packages you don't want installed, it includes an implication graph - or path through it - that lead to the package being installed. To collect a solver dump please run $ apt -o Dir::Log::Solver=$PWD/full-upgrade.edsp full-upgrade -s --solver internal or similar. The --solver internal is needed at this point it seems, I need to debug it - it's not relevant because the solver dump is the input to the solver, not the output :)
Thanks Julian. Running with Debug::APT::Solver=3 does seem to highlight the
actual problem. The issue appears to be caused by Thunar recommending the
policykit-1-gnome or polkit-1-auth-agent virtual packages which apt to try
installing Cinnamon as the default ("try it") first choice :
[411] Install:thunar:amd64 ()
-- snip --
Found dependency critical thunar:amd64 -> policykit-1-gnome:amd64
Adding work to item thunar:amd64 -> policykit-1-gnome:amd64=0.105-8+b1
Adding work to item thunar:amd64 -> xfce-polkit:amd64=0.3+v20220621-3
Adding work to item thunar:amd64 -> ukui-polkit:amd64=1.2.2.2-1.1+b1
Adding work to item thunar:amd64 -> polkit-kde-agent-1:amd64=4:6.5.0-1
Adding work to item thunar:amd64 -> phosh:amd64=0.49.0-1
Adding work to item thunar:amd64 -> mate-polkit:amd64=1.26.1-5
Adding work to item thunar:amd64 -> lxpolkit:amd64=0.5.6-2
Adding work to item thunar:amd64 -> lxqt-policykit:amd64=2.2.0-1
Adding work to item thunar:amd64 -> gnome-shell:amd64=48.5-3
Adding work to item thunar:amd64 -> gnome-flashback:amd64=3.58.0-1
Adding work to item thunar:amd64 -> cinnamon:amd64=6.4.13-1
Promoting previously satisfied clause to hard dependency: thunar:amd64
Recommends policykit-1-gnome | polkit-1-auth-agent
-- snip --
Item (12@411) thunar:amd64 -> | cinnamon:amd64=6.4.13-1 |
gnome-flashback:amd64=3.58.0-1 | gnome-shell:amd64=48.5-3 |
lxpolkit:amd64=0.5.6
-2 | lxqt-policykit:amd64=2.2.0-1 | mate-polkit:amd64=1.26.1-5 |
phosh:amd64=0.49.0-1 | polkit-kde-agent-1:amd64=4:6.5.0-1 |
ukui-polkit:am
d64=1.2.2.2-1.1+b1 | xfce-polkit:amd64=0.3+v20220621-3 |
policykit-1-gnome:amd64 | policykit-1-gnome:amd64=0.105-8+b1
Trying choice for Item (12@411) thunar:amd64 -> |
cinnamon:amd64=6.4.13-1 | gnome-flashback:amd64=3.58.0-1 |
gnome-shell:amd64=48.5-3 | lx
polkit:amd64=0.5.6-2 | lxqt-policykit:amd64=2.2.0-1 |
mate-polkit:amd64=1.26.1-5 | phosh:amd64=0.49.0-1 |
polkit-kde-agent-1:amd64=4:6.5.0-
1 | ukui-polkit:amd64=1.2.2.2-1.1+b1 |
xfce-polkit:amd64=0.3+v20220621-3 | policykit-1-gnome:amd64 |
policykit-1-gnome:amd64=0.105-8+b1
(try it: cinnamon:amd64=6.4.13-1)
[469] Install:cinnamon:amd64=6.4.13-1 (thunar:amd64)
Which then triggers all the packages needed by Cinnamon.
In case you want to test this yourself, I could reproduce the very same
situation in the forky Docker image. Just apt update/upgrade to get it to
apt 3.1.11, and then do "apt install thunar". You'll see a very similar list of
packages that I'm getting.
Let me know if there's anything more I can do.
Hi,
I ran into the same problem. In my case, it was nm-connection-editor
depending on policykit-1-gnome|polkit-1-auth-agent, with
policykit-1-gnome being dropped from Debian testing a couple months ago.
Trying to apt install polkit-1-auth-agent and picking a suitable
alternative fixed the issue for me.
A couple notes/ideas about what would have made this easier to resolve:
1. Debug::APT::Solver=3 is completely undocumented (I tried man
apt.conf, and later confirmed by grepping the entire apt sources).
2. apt could have hinted that policykit-1-gnome will become
autoremovable after the upgrade that installs cinnamon, then I might
have had an idea what to look for.
3. Perhaps a more user-friendly debug option might be added that only
shows info about dependency chains for newly installed packages
during full-upgrade? If I could do `apt full-upgrade -VV` or
something and get an output like "nm-connection-editor →
policykit-1-gnome|polkit-1-auth-agent → cinnamon" then I'd
immediately know what's going on and what needs to be done to resolve
this.
4. Or perhaps if `apt full-upgrade` told me months ago that
policykit-1-gnome dropped from the archives and needs replacing?
Also note that in today's debian:testing docker image, apt install
nm-connection-editor makes different choices depending on solver. 3.0
tries to install cinnamon, legacy solver goes with xfce-polkit.
Yes, I mean it's a debugging option. We don't expect you to go debug the apt solver it's barely comprehensible to experts (well the new one may be a lot easier :D). Dumps with Dir::Log::Solver is the preferred option for reporting bugs, also because if we fix them we can add them to the solver regression test suite. I think I can add automatic dumping of the solver request whenever you answer no at the prompt which would possibly help, then you can just attach the file. It simply might not be auto removable because the protection of auto installed dependencies protects all or dependencies. Possibly we should restrict the obsolete demotion to packages where the alternatives conflict with it. Could be nice yeah, good idea! Hi, it's mostly a bit shocking now because the new solver has that logic to replace obsolete packages but the old one doesn't. That's correct yes, the old solver ordered by index in cache, the new one alphabetically if all else is equal to increase reproducibility across systems.
Hi, Oh I wish I didn't need to… :-) I just played around with it a little bit more (in docker) to see if there's some other way I can understand what apt's trying to do without having to resort to reading debug logs. I though that perhaps marking cinnamon as hold might get apt to explore other options, ultimately telling me that it can't find anything once I mark enough stuff as unwanted. Unfortunately, I hit a roadblock fairly soon — I installed policykit-1-gnome from snapshot and nm-connection-editor from testing, and then tried apt full-upgrade, but apt full-upgrade just takes ages (in the solver) and then offers nothing. And yeah I don't know enough about the debug output to understand why it ultimately rejects the attempt to install cinnamon. Anyway, I'm attaching the solver requests in case you want to look into it. Now that deborphan is gone, I actually find it helpful that apt itself takes obsolete packages into account. It the obsolete demotion had been restricted to conflicting alternatives, I may never have learned about policykit-1-gnome being obsolete. The only bit I'm missing is being told what's going on. Either try to remove the obsolete package, or at least give me a warning that it's trying to install a replacement for it. Or—preferably—show the dependency chain motivating the install or every extra package.
This is still a problem with 3.2.0 - I tried upgrading my system to apt 3.2.0 yesterday, and a full-upgrade command with 3.2.0 installed resulted in a very similar list of packages, a good number of which isn't really needed. The issue is still reproducible in a recent forky docker image (9c430eb3833c), just "apt install thunar" and the gigantic list pops up. Is there anything more I can do to help? Thanks.