diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-09-28 14:50:38 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-09-28 14:50:38 +0200 |
commit | 24fd9c0645b34ebb433588582d4e593cfcc5427a (patch) | |
tree | e91550ddf8b6791a8ea98fba57874f2e0d5a11b4 /apt-pkg/pkgcache.cc | |
parent | 6fdb6892cbc333b6be5ff6a3cc55879a17f78430 (diff) | |
parent | 173c98da4cfa28ccde70c4d503fcdf6230b9085f (diff) |
merged from lp:~donkult/apt/sid
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r-- | apt-pkg/pkgcache.cc | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 353172d8a..1de33ff9b 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -690,8 +690,29 @@ void pkgCache::DepIterator::GlobOr(DepIterator &Start,DepIterator &End) on virtual packages. */ bool pkgCache::DepIterator::IsIgnorable(PkgIterator const &Pkg) const { - if (ParentPkg() == TargetPkg()) - return IsNegative(); + if (IsNegative() == false) + return false; + + pkgCache::PkgIterator PP = ParentPkg(); + pkgCache::PkgIterator PT = TargetPkg(); + if (PP->Group != PT->Group) + return false; + // self-conflict + if (PP == PT) + return true; + pkgCache::VerIterator PV = ParentVer(); + // ignore group-conflict on a M-A:same package - but not our implicit dependencies + // so that we can have M-A:same packages conflicting with their own real name + if ((PV->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same) + { + // Replaces: ${self}:other ( << ${binary:Version}) + if (S->Type == pkgCache::Dep::Replaces && S->CompareOp == pkgCache::Dep::Less && strcmp(PV.VerStr(), TargetVer()) == 0) + return false; + // Breaks: ${self}:other (!= ${binary:Version}) + if (S->Type == pkgCache::Dep::DpkgBreaks && S->CompareOp == pkgCache::Dep::NotEquals && strcmp(PV.VerStr(), TargetVer()) == 0) + return false; + return true; + } return false; } |