The APT fix looks decent fwiw, never mark packages as obsolete that are
in the never autoremovable root set (including "latest 2" (more or less)
installed kernel versions)
diff --git a/apt-pkg/depsolver.cc b/apt-pkg/depsolver.cc
index 63ad83e95..f83bf4066 100644
--- a/apt-pkg/depsolver.cc
+++ b/apt-pkg/depsolver.cc
@@ -442,6 +442,12 @@ bool DependencySolver::Obsolete(pkgCache::PkgIterator pkg,
bool AllowManual) con
if (pkgObsolete[pkg] != LiftedBool::Undefined)
return pkgObsolete[pkg] == LiftedBool::True;
+ if (DefaultRootSetFunc2 rootSet{&cache}; rootSet.InRootSet(pkg))
+ {
+ pkgObsolete[pkg] = LiftedBool::False;
+ return false;
+ }
+
auto ver = GetCandidateVer(pkg);
if (ver.end() && not StrictPinning)
--
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