X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/cfb776e816dc21c27f422216a9aff8700b28f30b..2b82aa5553eef0cd16b5803047a6b60450bee92f:/apt-pkg/algorithms.h diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index d183cd213..582cbc527 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -39,7 +39,7 @@ using std::ostream; -class pkgSimulate : public pkgPackageManager +class pkgSimulate : public pkgPackageManager /*{{{*/ { protected: @@ -48,7 +48,7 @@ class pkgSimulate : public pkgPackageManager pkgDepCache *Cache; public: - virtual VerIterator GetCandidateVer(PkgIterator Pkg) + virtual VerIterator GetCandidateVer(PkgIterator const &Pkg) { return (*Cache)[Pkg].CandidateVerIter(*Cache); } @@ -75,8 +75,8 @@ private: pkgSimulate(pkgDepCache *Cache); }; - -class pkgProblemResolver + /*}}}*/ +class pkgProblemResolver /*{{{*/ { pkgDepCache &Cache; typedef pkgCache::PkgIterator PkgIterator; @@ -105,10 +105,13 @@ class pkgProblemResolver void MakeScores(); bool DoUpgrade(pkgCache::PkgIterator Pkg); + + bool ResolveInternal(bool const BrokenFix = false); + bool ResolveByKeepInternal(); public: - inline void Protect(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] |= Protected;}; + inline void Protect(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] |= Protected; Cache.MarkProtected(Pkg);}; inline void Remove(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] |= ToRemove;}; inline void Clear(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] &= ~(Protected | ToRemove);}; @@ -124,7 +127,7 @@ class pkgProblemResolver pkgProblemResolver(pkgDepCache *Cache); ~pkgProblemResolver(); }; - + /*}}}*/ bool pkgDistUpgrade(pkgDepCache &Cache); bool pkgApplyStatus(pkgDepCache &Cache); bool pkgFixBroken(pkgDepCache &Cache);