From 4a2b89be6fa73b9c193d5b70e11a9305272efc3e Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 23 May 2024 13:24:25 +0200 Subject: solver3: Fix translations of removals for marked install We also need to issue a MarkDelete() if the package is marked for installation currently but should not be, not only if it did not have a previous version. This fixes the final test in test-multiarch-barbarian, the others only needed adjustments to mark all packages as automatic. --- apt-pkg/solver3.cc | 2 +- test/integration/solver3.broken | 1 - test/integration/test-multiarch-barbarian | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apt-pkg/solver3.cc b/apt-pkg/solver3.cc index d5811423d..9831f7e14 100644 --- a/apt-pkg/solver3.cc +++ b/apt-pkg/solver3.cc @@ -987,7 +987,7 @@ bool APT::Solver::ToDepCache(pkgDepCache &depcache) depcache[P].Marked = 1; depcache[P].Garbage = 0; } - else if (P->CurrentVer) + else if (P->CurrentVer || depcache[P].Install()) { depcache.MarkDelete(P, false, 0, (*this)[P].reason.empty()); depcache[P].Marked = 0; diff --git a/test/integration/solver3.broken b/test/integration/solver3.broken index 6575b068d..75ddbe5df 100644 --- a/test/integration/solver3.broken +++ b/test/integration/solver3.broken @@ -20,7 +20,6 @@ test-dont-forget-conflicts-via-unknown-architectures test-explore-or-groups-in-markinstall test-external-dependency-solver-protocol test-method-mirror -test-multiarch-barbarian test-parse-all-archs-into-cache test-phased-updates-new-depends test-phased-updates-upgrade diff --git a/test/integration/test-multiarch-barbarian b/test/integration/test-multiarch-barbarian index 293f22735..b89783473 100755 --- a/test/integration/test-multiarch-barbarian +++ b/test/integration/test-multiarch-barbarian @@ -5,6 +5,7 @@ TESTDIR="$(readlink -f "$(dirname "$0")")" . "$TESTDIR/framework" setupenvironment +allowremovemanual configarchitecture 'amd64' 'i386' buildsimplenativepackage 'foreign-foo' 'amd64,i386' '1' 'stable' 'Multi-Arch: foreign -- cgit v1.2.3-70-g09d2