X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/c5532863dca175819e823b3f9f228067a74ae0f8..d993b35da2160e36a723bfafb6aa266000199a69:/apt-pkg/algorithms.cc diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index c28317b72..aa3e86568 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.39 2002/04/02 05:55:24 jgg Exp $ +// $Id: algorithms.cc,v 1.41 2002/04/26 05:36:20 jgg Exp $ /* ###################################################################### Algorithms - A set of misc algorithms @@ -558,6 +558,8 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg) { if ((Flags[Pkg->ID] & Upgradable) == 0 || Cache[Pkg].Upgradable() == false) return false; + if ((Flags[Pkg->ID] & Protected) == Protected) + return false; Flags[Pkg->ID] &= ~Upgradable; @@ -800,6 +802,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if (Debug == true) clog << " Or group remove for " << I.Name() << endl; Cache.MarkDelete(I); + Change = true; } } if (OldEnd == LEnd && OrOp == OrKeep) @@ -807,6 +810,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if (Debug == true) clog << " Or group keep for " << I.Name() << endl; Cache.MarkKeep(I); + Change = true; } } @@ -817,21 +821,24 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) D.GlobOr(Start,End); if (Start.end() == true) break; - + // We only worry about critical deps. if (End.IsCritical() != true) continue; - + InOr = Start != End; OldEnd = LEnd; - } + } else Start++; - + // Dep is ok if ((Cache[End] & pkgDepCache::DepGInstall) == pkgDepCache::DepGInstall) + { + InOr = false; continue; - + } + if (Debug == true) clog << "Package " << I.Name() << " has broken dep on " << Start.TargetPkg().Name() << endl;