summaryrefslogtreecommitdiff
path: root/apt-pkg/orderlist.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-11-06 15:02:27 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-11-06 15:02:27 +0100
commit543b0abfa5466274f5dcbe943b63633189acd887 (patch)
tree084b4d0a3b6e3917fdc269be30ce8a893881909e /apt-pkg/orderlist.cc
parent037454791fe7e59b33531b640ac0aced3b2ba6d7 (diff)
* apt-pkg/orderlist.cc:
- try fixing before removing even if the fix is hidden in a provides, hidden in the #590438 testcase
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;