summaryrefslogtreecommitdiff
path: root/apt-pkg/solver3.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2024-05-23 13:24:25 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2024-05-24 17:01:55 +0200
commit4a2b89be6fa73b9c193d5b70e11a9305272efc3e (patch)
tree0f1738842318b9d09911ee040e18801c47a32143 /apt-pkg/solver3.cc
parentaaa9e415ce48964726401462767d6038da6d82e7 (diff)
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.
Diffstat (limited to 'apt-pkg/solver3.cc')
-rw-r--r--apt-pkg/solver3.cc2
1 files changed, 1 insertions, 1 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;