summaryrefslogtreecommitdiff
path: root/apt-pkg/orderlist.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2011-05-16 15:57:52 +0200
committerMichael Vogt <mvo@debian.org>2011-05-16 15:57:52 +0200
commitd44b706c2d5964daaaf55e6eb97845827958f6e3 (patch)
treeb77f6e72c34c2444ec28e2d47430211d802efb4b /apt-pkg/orderlist.cc
parent9c192d2811c12dcaf607024eb7f0677b011194e6 (diff)
parentd77b985a309c379d4978525172a72b728fecd15e (diff)
merged from lp:~donkult/apt/sid
Diffstat (limited to 'apt-pkg/orderlist.cc')
-rw-r--r--apt-pkg/orderlist.cc18
1 files changed, 5 insertions, 13 deletions
diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc
index d5bd19581..ba43bc757 100644
--- a/apt-pkg/orderlist.cc
+++ b/apt-pkg/orderlist.cc
@@ -490,7 +490,7 @@ bool pkgOrderList::VisitRProvides(DepFunc F,VerIterator Ver)
bool Res = true;
for (PrvIterator P = Ver.ProvidesList(); P.end() == false; P++)
Res &= (this->*F)(P.ParentPkg().RevDependsList());
- return true;
+ return Res;
}
/*}}}*/
// OrderList::VisitProvides - Visit all of the providing packages /*{{{*/
@@ -507,15 +507,11 @@ bool pkgOrderList::VisitProvides(DepIterator D,bool Critical)
if (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing)
continue;
- if (D->Type != pkgCache::Dep::Conflicts &&
- D->Type != pkgCache::Dep::DpkgBreaks &&
- D->Type != pkgCache::Dep::Obsoletes &&
+ if (D.IsNegative() == false &&
Cache[Pkg].InstallVer != *I)
continue;
- if ((D->Type == pkgCache::Dep::Conflicts ||
- D->Type == pkgCache::Dep::DpkgBreaks ||
- D->Type == pkgCache::Dep::Obsoletes) &&
+ if (D.IsNegative() == true &&
(Version *)Pkg.CurrentVer() != *I)
continue;
@@ -647,9 +643,7 @@ bool pkgOrderList::DepUnPackCrit(DepIterator D)
{
/* Forward critical dependencies MUST be correct before the
package can be unpacked. */
- if (D->Type != pkgCache::Dep::Conflicts &&
- D->Type != pkgCache::Dep::DpkgBreaks &&
- D->Type != pkgCache::Dep::Obsoletes &&
+ if (D.IsNegative() == false &&
D->Type != pkgCache::Dep::PreDepends)
continue;
@@ -1077,9 +1071,7 @@ bool pkgOrderList::CheckDep(DepIterator D)
/* Conflicts requires that all versions are not present, depends
just needs one */
- if (D->Type != pkgCache::Dep::Conflicts &&
- D->Type != pkgCache::Dep::DpkgBreaks &&
- D->Type != pkgCache::Dep::Obsoletes)
+ if (D.IsNegative() == false)
{
/* Try to find something that does not have the after flag set
if at all possible */