X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/648e3cb48955f82ce2e34c67eb9eefb76138a3b3..b024fa2565b194e9848a1714342a81d9744e20ec:/apt-pkg/algorithms.cc?ds=sidebyside diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 596473a65..adcbbd40c 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: algorithms.cc,v 1.26 1999/10/22 04:05:47 jgg Exp $ +// $Id: algorithms.cc,v 1.30 2000/05/10 05:56:23 jgg Exp $ /* ###################################################################### Algorithms - A set of misc algorithms @@ -284,7 +284,7 @@ bool pkgDistUpgrade(pkgDepCache &Cache) pkgProblemResolver Fix(Cache); // Hold back held packages. - if (_config->FindB("APT::Ingore-Hold",false) == false) + if (_config->FindB("APT::Ignore-Hold",false) == false) { for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) { @@ -574,7 +574,7 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg) /* We let the algorithm deal with conflicts on its next iteration, it is much smarter than us */ if (Start->Type == pkgCache::Dep::Conflicts) - continue; + break; if (Debug == true) clog << " Reinst Failed early because of " << Start.TargetPkg().Name() << endl; @@ -738,7 +738,10 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if (InOr == true) { if (OldEnd == LEnd && OrOp == OrRemove) - Cache.MarkDelete(I); + { + if ((Flags[I->ID] & Protected) != Protected) + Cache.MarkDelete(I); + } if (OldEnd == LEnd && OrOp == OrKeep) Cache.MarkKeep(I); } @@ -799,7 +802,11 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if ((Flags[I->ID] & Protected) == Protected) { if (DoUpgrade(Pkg) == true) + { Scores[Pkg->ID] = Scores[I->ID]; + break; + } + continue; }