summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2022-09-26 12:33:55 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2022-09-28 16:32:44 +0200
commitf93a5aa2daa92255c75865b6f92dddb4b072ff33 (patch)
treeaf2b3561aadf55fad38338bef5269ba2d3f35f08 /apt-pkg/algorithms.cc
parent28e44a3cd8b879744bebfec1133d0a9c51b25d88 (diff)
Check state of dependency, not dependee in dependency keep back
When iterating over I's dependencies (which are called Pkg), we accidentally checked if I was Protected() instead of Pkg when deciding whether Pkg can be kept back. LP: #1990684
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r--apt-pkg/algorithms.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 09fd78329..26d8c71c2 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -1359,8 +1359,8 @@ bool pkgProblemResolver::ResolveByKeepInternal()
if (Cache[Pkg].InstallVer == 0 ||
Pkg->CurrentVer == 0)
continue;
-
- if (not Cache[I].Protect())
+
+ if (not Cache[Pkg].Protect())
{
if (Debug == true)
clog << " Keeping Package " << Pkg.FullName(false) << " due to " << Start.DepType() << endl;