X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b51ff02a550881118ce4c677a6f2ce1d0aff9cd8..02e8ba352f71b82a936f5034059251425ab183d5:/apt-pkg/depcache.h diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index b2bcfb58a..10f9c1091 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -45,6 +45,7 @@ #include #include +#include class pkgDepCache : protected pkgCache::Namespace { @@ -91,7 +92,7 @@ class pkgDepCache : protected pkgCache::Namespace * \param rootFunc A callback that can be used to add extra * packages to the root set. * - * \return \b false if an error occured. + * \return \b false if an error occurred. */ bool MarkRequired(InRootSetFunc &rootFunc); @@ -102,7 +103,7 @@ class pkgDepCache : protected pkgCache::Namespace * are tested to see whether they are actually garbage. If so, * they are marked as such. * - * \return \b false if an error occured. + * \return \b false if an error occurred. */ bool Sweep(); @@ -293,7 +294,10 @@ class pkgDepCache : protected pkgCache::Namespace unsigned long iBrokenCount; unsigned long iPolicyBrokenCount; unsigned long iBadCount; - + + bool DebugMarker; + bool DebugAutoInstall; + Policy *delLocalPolicy; // For memory clean up.. Policy *LocalPolicy; @@ -359,6 +363,20 @@ class pkgDepCache : protected pkgCache::Namespace */ virtual bool MarkFollowsSuggests(); + /** \return \b true if it's OK for MarkInstall to recursively + * install the given version of the given package. + * + * \param p the package that MarkInstall wants to install. + * \param v the version being installed, or an end iterator + * if p is being removed. + * \param d the dependency being fixed. + * + * The default implementation unconditionally returns \b true. + */ + virtual bool AutoInstOk(const PkgIterator &p, + const VerIterator &v, + const DepIterator &d); + /** \brief Update the Marked and Garbage fields of all packages. * * This routine is implicitly invoked after all state manipulators @@ -386,11 +404,13 @@ class pkgDepCache : protected pkgCache::Namespace */ // @{ void MarkKeep(PkgIterator const &Pkg, bool Soft = false, - bool FromUser = true); - void MarkDelete(PkgIterator const &Pkg,bool Purge = false); + bool FromUser = true, unsigned long Depth = 0); + void MarkDelete(PkgIterator const &Pkg, bool Purge = false, + unsigned long Depth = 0); void MarkInstall(PkgIterator const &Pkg,bool AutoInst = true, unsigned long Depth = 0, bool FromUser = true, bool ForceImportantDeps = false); + void SetReInstall(PkgIterator const &Pkg,bool To); void SetCandidateVersion(VerIterator TargetVer); @@ -403,7 +423,7 @@ class pkgDepCache : protected pkgCache::Namespace // read persistent states bool readStateFile(OpProgress *prog); - bool writeStateFile(OpProgress *prog); + bool writeStateFile(OpProgress *prog, bool InstalledOnly=false); // Size queries inline double UsrSize() {return iUsrSize;};