summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-06-07 22:46:37 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-06-07 22:46:37 +0200
commite41d3d7e25754f858b6dfe4dd841f4749f7f3ab1 (patch)
tree61be869ff07e7e8fc13a3b87ccecb1391818dd4d /apt-pkg/depcache.cc
parent4c10a0b81341219e243a40e366b269ccc887b15e (diff)
do not revert candidate for protected packages
In commit 21b3eac8 I promoted the check for installable dependencies to a pre-install check, which also reverts to a known good candidate (the installed version) if it fails. This revert was done even for user requested candidate switches which disabled our Broken detection so that install requests which are impossible to satisfy do not fail anymore, but print an (incomplete) solution proposal and then exit successfully. Closes: 745046
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index aa96ac58f..c25672d1c 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1374,7 +1374,7 @@ 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)
+ if (Pkg->CurrentVer != 0 && (PkgState[Pkg->ID].iFlags & Protected) != Protected)
SetCandidateVersion(Pkg.CurrentVer());
return false;
}