diff options
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r-- | apt-pkg/pkgcache.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index c854249e4..5361696d0 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -636,11 +636,18 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() const { if (Owner->VS->CheckDep(I.ProvideVersion(),S->CompareOp,TargetVer()) == false) continue; - - if (IsNegative() == true && - ParentPkg()->Group == I.OwnerPkg()->Group) - continue; - + + if (IsNegative() == true) + { + /* Provides may never be applied against the same package (or group) + if it is a conflicts. See the comment above. */ + if (I.OwnerPkg()->Group == ParentPkg()->Group) + continue; + // Implicit group-conflicts should not be applied on providers of other groups + if (ParentPkg()->Group == TargetPkg()->Group && I.OwnerPkg()->Group != ParentPkg()->Group) + continue; + } + Size++; if (Res != 0) *End++ = I.OwnerVer(); |