diff options
author | Michael Vogt <mvo@debian.org> | 2010-11-10 19:39:12 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2010-11-10 19:39:12 +0100 |
commit | 88b62c5b3d55fa2ac0c4e0f4f0a595c60101db59 (patch) | |
tree | 8ca43482d477b2a437d368e4ab1fa1c6ff6aaad8 /apt-pkg/orderlist.cc | |
parent | c1c49795f4ba33e56b5b741f07bba362f4d54c2e (diff) | |
parent | edbda33bdef6a480fcfcb5d6b9a219c10cbeaaba (diff) |
merged from donkult
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; |