summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-04-27 19:39:02 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-04-28 10:08:32 +0200
commit91414dd77ec7efe1d3fc053e32cbe4d82263e015 (patch)
treebdfd43d9f28488e0aea7073ed421dbde829a6cc9 /apt-pkg/depcache.cc
parentf43dd43912990f736b7fe7cad941f3deb3429af5 (diff)
respect user pinning in M-A:same version (un)screwing
Using Pkg.CandVersion() here is wrong as its implementation will return a candidate based just on the default policy settings ignoring user preferences and otherwise set candidates (aka: it sidesteps the pkgDepCache). This causes M-A:same libraries to be detected as screwed even through they aren't, so that they end up being kept back. Reported-By: Felipe Sateler on IRC
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index b2173d2e4..aa434e99c 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1360,7 +1360,7 @@ bool pkgDepCache::IsInstallOkMultiArchSameVersionSynced(PkgIterator const &Pkg,
// not having a candidate or being in sync
// (simple string-compare as stuff like '1' == '0:1-0' can't happen here)
VerIterator CV = PkgState[P->ID].CandidateVerIter(*this);
- if (CV.end() == true || strcmp(Pkg.CandVersion(), CV.VerStr()) == 0)
+ if (CV.end() == true || strcmp(CandVer.VerStr(), CV.VerStr()) == 0)
continue;
// packages losing M-A:same can be out-of-sync
@@ -1375,7 +1375,7 @@ bool pkgDepCache::IsInstallOkMultiArchSameVersionSynced(PkgIterator const &Pkg,
if (unlikely(DebugMarker == true))
std::clog << OutputInDepth(Depth) << "Ignore MarkInstall of " << Pkg
<< " as it is not in sync with its M-A:same sibling " << P
- << " (" << Pkg.CandVersion() << " != " << CV.VerStr() << ")" << std::endl;
+ << " (" << CandVer.VerStr() << " != " << CV.VerStr() << ")" << std::endl;
return false;
}