X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/fa321bf3dbf363879cfc799b6c1cc4e5af50ffd8..35b55cbc1ccebe25a9e3cafd5f4fc1156bf79228:/apt-pkg/algorithms.h?ds=inline diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index defaed57d..99501bed1 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); } @@ -60,6 +60,7 @@ class pkgSimulate : public pkgPackageManager Policy iPolicy; pkgDepCache Sim; + pkgDepCache::ActionGroup group; // The Actuall installation implementation virtual bool Install(PkgIterator Pkg,string File); @@ -74,8 +75,8 @@ private: pkgSimulate(pkgDepCache *Cache); }; - -class pkgProblemResolver + /*}}}*/ +class pkgProblemResolver /*{{{*/ { pkgDepCache &Cache; typedef pkgCache::PkgIterator PkgIterator; @@ -105,9 +106,12 @@ class pkgProblemResolver void MakeScores(); bool DoUpgrade(pkgCache::PkgIterator Pkg); + protected: + bool InstOrNewPolicyBroken(pkgCache::PkgIterator Pkg); + 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);}; @@ -123,7 +127,7 @@ class pkgProblemResolver pkgProblemResolver(pkgDepCache *Cache); ~pkgProblemResolver(); }; - + /*}}}*/ bool pkgDistUpgrade(pkgDepCache &Cache); bool pkgApplyStatus(pkgDepCache &Cache); bool pkgFixBroken(pkgDepCache &Cache);