X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/294a80209a0c6ea617a14fb2ae650d4fd329eab5..bccb344412a0e97afdf0aaaf41a31124c84f6eaa:/apt-pkg/depcache.h?ds=inline diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index a1be56bb2..03a2cb0a8 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -209,7 +209,7 @@ class pkgDepCache : protected pkgCache::Namespace struct StateCache { - // Epoch stripped text versions of the two version fields + // text versions of the two version fields const char *CandVersion; const char *CurVersion; @@ -240,7 +240,7 @@ class pkgDepCache : protected pkgCache::Namespace unsigned char DepState; // DepState Flags // Update of candidate version - const char *StripEpoch(const char *Ver) APT_PURE; + APT_DEPRECATED_MSG("Use the method of the same name in contrib/strutl.h instead if you must") const char *StripEpoch(const char *Ver) APT_PURE; void Update(PkgIterator Pkg,pkgCache &Cache); // Various test members for the current status of the package @@ -362,13 +362,14 @@ class pkgDepCache : protected pkgCache::Namespace inline pkgVersioningSystem &VS() {return *Cache->VS;}; // Policy implementation - APT_DEPRECATED inline VerIterator GetCandidateVer(PkgIterator const &Pkg) {return /* GetCandidateVersion(Pkg); but for API compat: */ LocalPolicy->GetCandidateVer(Pkg);}; + APT_DEPRECATED_MSG("Confusingly named method which returns the candidate as chosen by policy (NOT as chosen via .SetCandidateVersion!). You probably want to use .GetCandidateVersion instead.") inline VerIterator GetCandidateVer(PkgIterator const &Pkg) {return /* GetCandidateVersion(Pkg); but for API compat: */ LocalPolicy->GetCandidateVer(Pkg);}; inline bool IsImportantDep(DepIterator Dep) const {return LocalPolicy->IsImportantDep(Dep);}; inline Policy &GetPolicy() {return *LocalPolicy;}; // Accessors inline StateCache &operator [](PkgIterator const &I) {return PkgState[I->ID];}; + inline StateCache &operator [](PkgIterator const &I) const {return PkgState[I->ID];}; inline unsigned char &operator [](DepIterator const &I) {return DepState[I->ID];}; /** \return A function identifying packages in the root set other @@ -419,7 +420,7 @@ class pkgDepCache : protected pkgCache::Namespace * * The version returned is the version previously set explicitly via * SetCandidate* methods like #SetCandidateVersion or if there wasn't one - * set the version as choosen via #Policy. + * set the version as chosen via #Policy. * * @param Pkg is the package to return the candidate for */