Thanks for the analysis, Julian. Adding the Provides to the metapackages sounds like a sensible fix on the kernel side, and I agree that special- casing protected kernels in the obsolete check may not be worth the extra quirk.
That said, I think this points at a more general gap in the solver that would be worth looking at in its own right. When a dependency (here a previously satisfied Recommends) has several providers, couldn't apt prefer: a) a provider that the same transaction installs anyway (here linux-image-7.0.0-43-generic, pulled in by linux-generic), or b) the successor of the obsolete provider that satisfied it before, i.e. a provider built from the newer version of the source package that made the installed one obsolete? Either would have given the right result here without anything kernel-specific. It would also cover any virtual package whose installed provider gets renamed, not just linux-image. It bites especially hard here because the fallback order isn't neutral: the providers end up sorted by package name, so the cloud flavours (4-digit ABI) always sort before generic, and every ABI bump lands on a cloud kernel. Right now the outcome also depends on how the transaction is run: running upgrade before dist-upgrade works on the command line, but PackageKit/Discover users (#5, #6) don't get that choice. Would it make sense to keep the apt task open as Wishlist for that, rather than Won't Fix? Separately, the trigger here is Oracle's virtualbox-7.2 package, which declares a bare "Recommends: linux-image". On a host that recommendation adds nothing, since the package already recommends the kernel headers it needs to build vboxdrv. So it's worth reporting to Oracle too, independent of any apt or kernel-side fix. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2169247 Title: virtualbox-7.2 Recommends: linux-image causes APT to install arbitrary cloud kernel flavours To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/2169247/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
