summaryrefslogtreecommitdiff
path: root/apt-pkg/orderlist.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-11-15 10:28:27 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-11-15 10:28:27 +0100
commit58a642755c63cde3cf377d3719d66add27b13d65 (patch)
tree92719b94ccca55b5e128f28e9499e1ec331a5440 /apt-pkg/orderlist.cc
parentfd8bb61d2945d2e2f19f0e0a753129235717a9f3 (diff)
parent3cf1e4b50a9bb439c4f54a631cfebbb6c4d1ea7d (diff)
merged from debian
Diffstat (limited to 'apt-pkg/orderlist.cc')
-rw-r--r--apt-pkg/orderlist.cc34
1 files changed, 27 insertions, 7 deletions
diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc
index 602b63d3b..a53854a26 100644
--- a/apt-pkg/orderlist.cc
+++ b/apt-pkg/orderlist.cc
@@ -967,13 +967,33 @@ bool pkgOrderList::DepRemove(DepIterator D)
// start again in the or group and find something which will serve as replacement
for (; F.end() == false && F != S; ++F)
{
- if (F.TargetPkg() == D.TargetPkg() ||
- IsFlag(F.TargetPkg(), InList) == false ||
- VisitNode(F.TargetPkg()) == false)
- continue;
- Flag(F.TargetPkg(), Immediate);
- tryFixDeps = false;
- break;
+ if (IsFlag(F.TargetPkg(), InList) == true &&
+ IsFlag(F.TargetPkg(), AddPending) == false &&
+ Cache[F.TargetPkg()].InstallVer != 0 &&
+ VisitNode(F.TargetPkg()) == true)
+ {
+ Flag(F.TargetPkg(), Immediate);
+ tryFixDeps = false;
+ break;
+ }
+ else if (F.TargetPkg()->ProvidesList != 0)
+ {
+ pkgCache::PrvIterator Prv = F.TargetPkg().ProvidesList();
+ for (; Prv.end() == false; ++Prv)
+ {
+ if (IsFlag(Prv.OwnerPkg(), InList) == true &&
+ IsFlag(Prv.OwnerPkg(), AddPending) == false &&
+ Cache[Prv.OwnerPkg()].InstallVer != 0 &&
+ VisitNode(Prv.OwnerPkg()) == true)
+ {
+ Flag(Prv.OwnerPkg(), Immediate);
+ tryFixDeps = false;
+ break;
+ }
+ }
+ if (Prv.end() == false)
+ break;
+ }
}
if (tryFixDeps == false)
break;