summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 879f34099..d7725563b 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -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 /*{{{*/
// ---------------------------------------------------------------------
/* */