]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/pkgcache.cc
try all providers in order if uninstallable in MarkInstall
[apt.git] / apt-pkg / pkgcache.cc
index 879f340994d50bda976e5bcc221d28f670019825..d7725563b07c8979df8eb9e23a0d73cb33faed47 100644 (file)
@@ -634,8 +634,7 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() const
       {
         if (IsIgnorable(I.ParentPkg()) == true)
            continue;
-
-        if (Owner->VS->CheckDep(I.VerStr(),S->CompareOp,TargetVer()) == false)
+        if (IsSatisfied(I) == false)
            continue;
 
         Size++;
@@ -648,8 +647,7 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() const
       {
         if (IsIgnorable(I) == true)
            continue;
-
-        if (Owner->VS->CheckDep(I.ProvideVersion(),S->CompareOp,TargetVer()) == false)
+        if (IsSatisfied(I) == false)
            continue;
 
         Size++;
@@ -757,6 +755,16 @@ bool pkgCache::DepIterator::IsMultiArchImplicit() const
    return false;
 }
                                                                        /*}}}*/
+// DepIterator::IsSatisfied - check if a version satisfied the dependency /*{{{*/
+bool pkgCache::DepIterator::IsSatisfied(VerIterator const &Ver) const
+{
+   return Owner->VS->CheckDep(Ver.VerStr(),S->CompareOp,TargetVer());
+}
+bool pkgCache::DepIterator::IsSatisfied(PrvIterator const &Prv) const
+{
+   return Owner->VS->CheckDep(Prv.ProvideVersion(),S->CompareOp,TargetVer());
+}
+                                                                       /*}}}*/
 // ostream operator to handle string representation of a dependecy     /*{{{*/
 // ---------------------------------------------------------------------
 /* */