diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-11-15 10:28:27 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-11-15 10:28:27 +0100 |
commit | 58a642755c63cde3cf377d3719d66add27b13d65 (patch) | |
tree | 92719b94ccca55b5e128f28e9499e1ec331a5440 /apt-pkg/orderlist.cc | |
parent | fd8bb61d2945d2e2f19f0e0a753129235717a9f3 (diff) | |
parent | 3cf1e4b50a9bb439c4f54a631cfebbb6c4d1ea7d (diff) |
merged from debian
Diffstat (limited to 'apt-pkg/orderlist.cc')
-rw-r--r-- | apt-pkg/orderlist.cc | 34 |
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; |