diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-04-27 19:39:02 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-05-11 10:46:11 +0200 |
commit | cde24ec5f51681233a2c6f2f5b6c7d0432160681 (patch) | |
tree | 7a38cce9ca844ebc2fdda63121dc20b23b493bbe /apt-pkg | |
parent | 9d70773a207af6f7c4439ef14aae16cd20e88eca (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')
-rw-r--r-- | apt-pkg/depcache.cc | 4 |
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; } |