From 5f5a8deedffac3cdeeb2f178d910d3759d366e8e Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 28 Sep 2022 16:28:36 +0200 Subject: full-upgrade: Mark phased upgrades for keep before anything else By marking them at the end, we might make other decisions that depend on the new phased updates, confusing the solver. Run the marking at the start too. The EDSP test file from Jeremy was modified to include Machine-ID and Phased-Update-Percentage fields and then filtered to mostly exclude packages irrelevant to the test case by running grep-dctrl \( -FRequest "EDSP 0.5" -o -FInstalled yes \ -oFPhased-Update-Percentage 10 \) \ -a --not -FArchitecture i386 LP: #1990586 --- apt-pkg/upgrade.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/upgrade.cc b/apt-pkg/upgrade.cc index a7e18026b..e3e98e5c6 100644 --- a/apt-pkg/upgrade.cc +++ b/apt-pkg/upgrade.cc @@ -107,6 +107,7 @@ struct PhasedUpgrader continue; Cache.MarkKeep(I, false, false); + Cache.MarkProtected(I); if (Fix != nullptr) Fix->Protect(I); } @@ -133,6 +134,8 @@ static bool pkgDistUpgrade(pkgDepCache &Cache, OpProgress * const Progress) pkgDepCache::ActionGroup group(Cache); + PhasedUpgrader().HoldBackIgnoredPhasedUpdates(Cache, nullptr); + /* Upgrade all installed packages first without autoinst to help the resolver in versioned or-groups to upgrade the old solver instead of installing a new one (if the old solver is not the first one [anymore]) */ -- cgit v1.2.3-70-g09d2