summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 8281949f9..dd18305d2 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1421,7 +1421,12 @@ bool pkgDepCache::IsInstallOkDependenciesSatisfiableByCandidates(PkgIterator con
// the dependency is critical, but can't be installed, so discard the candidate
// as the problemresolver will trip over it otherwise trying to install it (#735967)
if (Pkg->CurrentVer != 0 && (PkgState[Pkg->ID].iFlags & Protected) != Protected)
+ {
SetCandidateVersion(Pkg.CurrentVer());
+ StateCache &State = PkgState[Pkg->ID];
+ State.Mode = ModeKeep;
+ State.Update(Pkg, *this);
+ }
return false;
}
}