summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2020-05-29 12:46:59 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2020-05-29 12:46:59 +0200
commit33e19f1fe1655e2d6883ff8d30226fb7db02dd45 (patch)
treee60f122cb61c8ed22c47d360968f5edbaab3fc95 /apt-pkg/algorithms.cc
parent1941515e1c96f9c33d63e426049d9dad5420c580 (diff)
Consider protected packages for removal if they are marked as such
The pkgProblemResolver incorrectly skips protected packages while considering packages for removal, which was always wrong but is now a lot more visible as (potentially) far more packages are considered protected in their state. Note that the testcase shows that we need more changes to make this proper.
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r--apt-pkg/algorithms.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 3fdb5116e..ea6d4c39a 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -1043,7 +1043,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
}
// Skip adding to the kill list if it is protected
- if (Cache[Pkg].Protect())
+ if (Cache[Pkg].Protect() && Cache[Pkg].Mode != pkgDepCache::ModeDelete)
continue;
if (Debug == true)