X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/be9b62f76406cf2546d21f3ca27587ee20e0fc37..0fffbc8ce4cb6357f59db63db5571f46a668a66b:/apt-pkg/algorithms.h diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index 42945a6f2..948fe1103 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -33,11 +33,10 @@ #include #include -#include #include -using std::ostream; +class pkgAcquireStatus; class pkgSimulate : public pkgPackageManager /*{{{*/ { @@ -63,13 +62,13 @@ class pkgSimulate : public pkgPackageManager /*{{{*/ pkgDepCache::ActionGroup group; // The Actuall installation implementation - virtual bool Install(PkgIterator Pkg,string File); + virtual bool Install(PkgIterator Pkg,std::string File); virtual bool Configure(PkgIterator Pkg); virtual bool Remove(PkgIterator Pkg,bool Purge); private: void ShortBreaks(); - void Describe(PkgIterator iPkg,ostream &out,bool Current,bool Candidate); + void Describe(PkgIterator iPkg,std::ostream &out,bool Current,bool Candidate); public: @@ -108,10 +107,16 @@ class pkgProblemResolver /*{{{*/ void MakeScores(); bool DoUpgrade(pkgCache::PkgIterator Pkg); + + bool ResolveInternal(bool const BrokenFix = false); + bool ResolveByKeepInternal(); + 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);};