summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2013-04-30 10:44:16 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2013-04-30 10:44:16 +0200
commit3599bca5211077f5456a40adb5cec1bcbee8c3ae (patch)
tree221627b7ef4e3d6d294fbaaab425f2400734bd93 /apt-pkg/depcache.cc
parent6029901a2cf49aac035590960d84572b56f28933 (diff)
parentb5595da902e62af7c295f1603ae5b43ba4cef281 (diff)
merged from the debian-sid branch
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc25
1 files changed, 10 insertions, 15 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index a48cd8b0c..6a3e9bfc4 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -351,18 +351,15 @@ bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res)
PkgIterator Pkg = Dep.TargetPkg();
// Check the base package
if (Type == NowVersion && Pkg->CurrentVer != 0)
- if (VS().CheckDep(Pkg.CurrentVer().VerStr(),Dep->CompareOp,
- Dep.TargetVer()) == true)
+ if (Dep.IsSatisfied(Pkg.CurrentVer()) == true)
return true;
if (Type == InstallVersion && PkgState[Pkg->ID].InstallVer != 0)
- if (VS().CheckDep(PkgState[Pkg->ID].InstVerIter(*this).VerStr(),
- Dep->CompareOp,Dep.TargetVer()) == true)
+ if (Dep.IsSatisfied(PkgState[Pkg->ID].InstVerIter(*this)) == true)
return true;
if (Type == CandidateVersion && PkgState[Pkg->ID].CandidateVer != 0)
- if (VS().CheckDep(PkgState[Pkg->ID].CandidateVerIter(*this).VerStr(),
- Dep->CompareOp,Dep.TargetVer()) == true)
+ if (Dep.IsSatisfied(PkgState[Pkg->ID].CandidateVerIter(*this)) == true)
return true;
}
@@ -398,7 +395,7 @@ bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res)
}
// Compare the versions.
- if (VS().CheckDep(P.ProvideVersion(),Dep->CompareOp,Dep.TargetVer()) == true)
+ if (Dep.IsSatisfied(P) == true)
{
Res = P.OwnerPkg();
return true;
@@ -1192,14 +1189,13 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
{
APT::VersionList verlist;
pkgCache::VerIterator Cand = PkgState[Start.TargetPkg()->ID].CandidateVerIter(*this);
- if (Cand.end() == false && VS().CheckDep(Cand.VerStr(), Start->CompareOp, Start.TargetVer()) == true)
+ if (Cand.end() == false && Start.IsSatisfied(Cand) == true)
verlist.insert(Cand);
for (PrvIterator Prv = Start.TargetPkg().ProvidesList(); Prv.end() != true; ++Prv)
{
pkgCache::VerIterator V = Prv.OwnerVer();
pkgCache::VerIterator Cand = PkgState[Prv.OwnerPkg()->ID].CandidateVerIter(*this);
- if (Cand.end() == true || V != Cand ||
- VS().CheckDep(Prv.ProvideVersion(), Start->CompareOp, Start.TargetVer()) == false)
+ if (Cand.end() == true || V != Cand || Start.IsSatisfied(Prv) == false)
continue;
verlist.insert(Cand);
}
@@ -1407,7 +1403,7 @@ bool pkgDepCache::SetCandidateRelease(pkgCache::VerIterator TargetVer,
if (Cand.end() == true)
continue;
// check if the current candidate is enough for the versioned dependency - and installable?
- if (VS().CheckDep(P.CandVersion(), Start->CompareOp, Start.TargetVer()) == true &&
+ if (Start.IsSatisfied(Cand) == true &&
(VersionState(Cand.DependsList(), DepInstall, DepCandMin, DepCandPolicy) & DepCandMin) == DepCandMin)
{
itsFine = true;
@@ -1441,7 +1437,7 @@ bool pkgDepCache::SetCandidateRelease(pkgCache::VerIterator TargetVer,
V = Match.Find(D.TargetPkg());
// check if the version from this release could satisfy the dependency
- if (V.end() == true || VS().CheckDep(V.VerStr(), D->CompareOp, D.TargetVer()) == false)
+ if (V.end() == true || D.IsSatisfied(V) == false)
{
if (stillOr == true)
continue;
@@ -1771,7 +1767,7 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg,
for(VerIterator V = d.TargetPkg().VersionList();
!V.end(); ++V)
{
- if(_system->VS->CheckDep(V.VerStr(), d->CompareOp, d.TargetVer()))
+ if(d.IsSatisfied(V))
{
if(debug_autoremove)
{
@@ -1793,8 +1789,7 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg,
for(PrvIterator prv=d.TargetPkg().ProvidesList();
!prv.end(); ++prv)
{
- if(_system->VS->CheckDep(prv.ProvideVersion(), d->CompareOp,
- d.TargetVer()))
+ if(d.IsSatisfied(prv))
{
if(debug_autoremove)
{