X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/966640d8fd2feac29909a22415955b3ce5779dcd..3c54407f8783d5e27363eabf41dbc3d031526ffe:/apt-pkg/orderlist.cc diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc index cb55147c3..a53854a26 100644 --- a/apt-pkg/orderlist.cc +++ b/apt-pkg/orderlist.cc @@ -936,6 +936,7 @@ bool pkgOrderList::DepRemove(DepIterator D) Cache[P].InstallVer != 0 && VisitNode(P) == true) { + Flag(P, Immediate); tryFixDeps = false; break; } @@ -966,12 +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; - 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;