diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 8281949..083d189 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1420,8 +1420,10 @@ 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) + if (Pkg->CurrentVer != 0 && (PkgState[Pkg->ID].iFlags & Protected) != Protected) { + PkgState[Pkg->ID].Mode = ModeKeep; SetCandidateVersion(Pkg.CurrentVer()); + } return false; } }