X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/90a88b83020eb9526951eec83e3075b54653fa33..02e8ba352f71b82a936f5034059251425ab183d5:/apt-pkg/depcache.h diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 84fed7f37..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);