summaryrefslogtreecommitdiff
path: root/apt-pkg/orderlist.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-11-18 09:51:50 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-11-18 09:51:50 +0100
commitee7077b0133711c879312f74303e8486a2bb865d (patch)
tree1c9c74017fe14c9f92abade0a3b679e01e6c53c1 /apt-pkg/orderlist.cc
parent19a9616d1c19c4a053826585f969459d166e44f2 (diff)
parent5c246b99204e8ef32243ae42c5ca3a2dee54e59b (diff)
merged from debian-sid
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;