From cde24ec5f51681233a2c6f2f5b6c7d0432160681 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 27 Apr 2016 19:39:02 +0200 Subject: 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 --- apt-pkg/depcache.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg') 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; } -- cgit v1.2.3