Public bug reported:
On Ubuntu 26.04.1 with apt 3.2.0, an `apt full-upgrade` also installs a
kernel of some other flavour. On my laptop it was linux-
image-7.0.0-1007-vmware, and on my desktop it was a -gke kernel, at five
kernel updates between September and November.
The trigger is Oracle's virtualbox-7.2 package
(7.2.18-175117~Ubuntu~resolute), which has an unversioned "Recommends:
linux-image". But that Recommends is already satisfied: the installed
(in this specific case) linux-image-7.0.0-31-generic provides linux-
image, and the same upgrade installs linux-image-7.0.0-44-generic, which
provides it too. The classic solver (--solver internal) doesn't add
anything for it.
aptitude gets it right too. From the same state, with no pin or other
workaround, aptitude's full-upgrade and safe-upgrade install only linux-
image-7.0.0-44-generic and no other kernel. So the same packages from
the same archive upgrade cleanly, and the extra kernel comes from apt's
3.0 solver.
Same state (one installed kernel, 7.0.0-31-generic), same archive,
simulated on 2026-11-26:
apt-get -s full-upgrade -> 7.0.0-44-generic and
7.0.0-1007-vmware
apt-get -s full-upgrade --solver internal -> 7.0.0-44-generic only
aptitude -s full-upgrade (0.8.13) -> 7.0.0-44-generic only
aptitude -s safe-upgrade -> 7.0.0-44-generic only
With -o Debug::APT::Solver=2:
[140] Install:linux-image-7.0.0-1007-vmware:amd64=7.0.0-1007.7
(virtualbox-7.2:amd64)
[140] Install:linux-modules-7.0.0-1007-vmware:amd64 (virtualbox-7.2:amd64 ->
linux-image-7.0.0-1007-vmware:amd64=7.0.0-1007.7 ->
linux-image-7.0.0-1007-vmware:amd64)
On the desktop I replayed one of those upgrades against the dpkg status
backup from before it. The solver picked the gke kernel at step 412, the
new generic kernel at step 416, and kept the old (auto-installed)
generic kernel only at step 468. So by the time it handles the
Recommends, no provider counts as installed or kept, and it takes one
from the whole archive. --no-install-recommends and --solver internal
both avoid it.
It isn't the highest version either: the archive also has
7.3.0-1004-oem, 7.0.0-1025-nvidia and 7.0.0-1021-azure, and the solver
picked 1007-vmware on one machine and 1008-gke on the other.
Why it matters: GRUB sorts the extra kernel above the generic one
(7.0.0-1007-vmware > 7.0.0-44-generic), so with GRUB_DEFAULT=0 the next
boot is a cloud kernel. Someone in the VirtualBox issue below reports
broken NVIDIA drivers from that. apt autoremove doesn't remove it
either, because the Recommends still points at it.
Expected: only the new generic kernel gets installed, as the classic
solver and aptitude do. The generic kernel already satisfies the
Recommends, so there's no reason to add another one.
To reproduce, as a normal user (simulation only), on a system with
virtualbox-7.2 and one generic kernel installed:
apt-get -s full-upgrade | grep -E '^Inst linux-image-[0-9]'
apt-get -s full-upgrade --solver internal | grep -E '^Inst linux-image-[0-9]'
aptitude -s -y full-upgrade | grep -oE 'linux-image-[0-9][^ {]*' | sort -u
For an older state, add -o Dir::State::status=<copy of
/var/backups/dpkg.status.0>.
Workaround for now: an apt preferences file that pins every non-generic
flavour to -1:
Package:
/^linux-(image|image-unsigned|modules|modules-extra|headers)-[0-9.]+-[0-9]+-(gke|gcp|aws|azure|azure-fde|oracle|oem|nvidia|nvidia-bos|ibm|realtime|lowlatency|vmware)$/
Pin: release *
Pin-Priority: -1
It has to list the flavours by name, so a new one gets through until
it's added (vmware just did).
Related:
- https://github.com/VirtualBox/virtualbox/issues/862
- https://www.virtualbox.org/ticket/21415
- LP: #2100247, #2101800, #2102720 (earlier solver3 bugs where something
already satisfied was treated as a new demand)
** Affects: apt (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2176174
Title:
3.0 solver installs a random kernel flavour (gke, vmware) for an
already satisfied "Recommends: linux-image"
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/2176174/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs