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.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 4940387a6..b2173d2e4 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1424,8 +1424,11 @@ bool pkgDepCache::IsInstallOkDependenciesSatisfiableByCandidates(PkgIterator con
{
SetCandidateVersion(Pkg.CurrentVer());
StateCache &State = PkgState[Pkg->ID];
- State.Mode = ModeKeep;
- State.Update(Pkg, *this);
+ if (State.Mode != ModeDelete)
+ {
+ State.Mode = ModeKeep;
+ State.Update(Pkg, *this);
+ }
}
return false;
}