]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
factor out the detection of self-conflicts into Dep::IsIgnorable
[apt.git] / apt-pkg / depcache.cc
index 3c6dc4325ff4748748ad71a683cb75614a463f28..0851597111cff81a8cb7ba9ee59075a26d53c162 100644 (file)
@@ -371,19 +371,10 @@ bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res)
    
    // Check the providing packages
    PrvIterator P = Dep.TargetPkg().ProvidesList();
-   PkgIterator Pkg = Dep.ParentPkg();
    for (; P.end() != true; ++P)
    {
-      if (Dep.IsNegative() == true)
-      {
-        /* Provides may never be applied against the same package (or group)
-           if it is a conflicts. See the comment above. */
-        if (P.OwnerPkg()->Group == Pkg->Group)
-           continue;
-        // Implicit group-conflicts should not be applied on providers of other groups
-        if (Pkg->Group == Dep.TargetPkg()->Group && P.OwnerPkg()->Group != Pkg->Group)
-           continue;
-      }
+      if (Dep.IsIgnorable(P) == true)
+        continue;
 
       // Check if the provides is a hit
       if (Type == NowVersion)