diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2022-09-26 12:33:55 +0200 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2022-09-28 16:32:44 +0200 |
| commit | f93a5aa2daa92255c75865b6f92dddb4b072ff33 (patch) | |
| tree | af2b3561aadf55fad38338bef5269ba2d3f35f08 /apt-pkg | |
| parent | 28e44a3cd8b879744bebfec1133d0a9c51b25d88 (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')
| -rw-r--r-- | apt-pkg/algorithms.cc | 4 |
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; |
