diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/cacheiterators.h | 10 | ||||
-rw-r--r-- | apt-pkg/pkgcache.cc | 40 |
2 files changed, 1 insertions, 49 deletions
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 20853061e..27daf4c43 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -164,9 +164,6 @@ class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> { // Accessors inline const char *Name() const { return Group().Name(); } - // Versions have sections - and packages can have different versions with different sections - // so this interface is broken by design. Run as fast as you can to Version.Section(). - APT_DEPRECATED_MSG("Use the .Section method of VerIterator instead") inline const char *Section() const; inline bool Purge() const {return S->CurrentState == pkgCache::State::Purge || (S->CurrentVer == 0 && S->CurrentState == pkgCache::State::NotInstalled);} inline const char *Arch() const {return S->Arch == 0?0:Owner->StrP + S->Arch;} @@ -177,7 +174,6 @@ class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> { inline DepIterator RevDependsList() const APT_PURE; inline PrvIterator ProvidesList() const APT_PURE; OkState State() const APT_PURE; - APT_DEPRECATED_MSG("This method does not respect apt_preferences! Use pkgDepCache::GetCandidateVersion(Pkg)") const char *CandVersion() const APT_PURE; const char *CurVersion() const APT_PURE; //Nice printable representation @@ -422,8 +418,6 @@ class pkgCache::RlsFileIterator : public Iterator<ReleaseFile, RlsFileIterator> inline const char *Site() const {return S->Site == 0?0:Owner->StrP + S->Site;} inline bool Flagged(pkgCache::Flag::ReleaseFileFlags const flag) const {return (S->Flags & flag) == flag; } - APT_DEPRECATED_MSG("Can be remove without replacement; it is a no-op") - bool IsOk(); std::string RelStr(); // Constructors @@ -458,8 +452,6 @@ class pkgCache::PkgFileIterator : public Iterator<PackageFile, PkgFileIterator> inline const char *Architecture() const {return S->Architecture == 0?0:Owner->StrP + S->Architecture;} inline const char *IndexType() const {return S->IndexType == 0?0:Owner->StrP + S->IndexType;} - APT_DEPRECATED_MSG("Can be remove without replacement; it is a no-op") - bool IsOk(); std::string RelStr(); // Constructors @@ -525,7 +517,5 @@ inline pkgCache::VerFileIterator pkgCache::VerIterator::FileList() const {return VerFileIterator(*Owner,Owner->VerFileP + S->FileList);} inline pkgCache::DescFileIterator pkgCache::DescIterator::FileList() const {return DescFileIterator(*Owner,Owner->DescFileP + S->FileList);} -APT_DEPRECATED_MSG("Use the .Section method of VerIterator instead") inline const char * pkgCache::PkgIterator::Section() const - {return S->VersionList == 0 ? 0 : VersionList().Section();} /*}}}*/ #endif diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 9af8d2d13..5819a9b4a 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -560,19 +560,6 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const return NeedsNothing; } /*}}}*/ -// PkgIterator::CandVersion - Returns the candidate version string /*{{{*/ -// --------------------------------------------------------------------- -/* Return string representing of the candidate version. */ -const char * -pkgCache::PkgIterator::CandVersion() const -{ - //TargetVer is empty, so don't use it. - VerIterator version = pkgPolicy(Owner).GetCandidateVer(*this); - if (version.IsGood()) - return version.VerStr(); - return 0; -} - /*}}}*/ // PkgIterator::CurVersion - Returns the current version string /*{{{*/ // --------------------------------------------------------------------- /* Return string representing of the current version. */ @@ -598,15 +585,10 @@ operator<<(std::ostream& out, pkgCache::PkgIterator Pkg) return out << "invalid package"; string current = string(Pkg.CurVersion() == 0 ? "none" : Pkg.CurVersion()); -APT_IGNORE_DEPRECATED_PUSH - string candidate = string(Pkg.CandVersion() == 0 ? "none" : Pkg.CandVersion()); -APT_IGNORE_DEPRECATED_POP string newest = string(Pkg.VersionList().end() ? "none" : Pkg.VersionList().VerStr()); out << Pkg.Name() << " [ " << Pkg.Arch() << " ] < " << current; - if (current != candidate) - out << " -> " << candidate; - if ( newest != "none" && candidate != newest) + if ( newest != "none") out << " | " << newest; if (Pkg->VersionList == 0) out << " > ( none )"; @@ -1007,16 +989,6 @@ const char * pkgCache::VerIterator::MultiArchType() const return "none"; } /*}}}*/ -// RlsFileIterator::IsOk - Checks if the cache is in sync with the file /*{{{*/ -// --------------------------------------------------------------------- -/* This stats the file and compares its stats with the ones that were - stored during generation. Date checks should probably also be - included here. */ -bool pkgCache::RlsFileIterator::IsOk() -{ - return true; -} - /*}}}*/ // RlsFileIterator::RelStr - Return the release string /*{{{*/ string pkgCache::RlsFileIterator::RelStr() { @@ -1034,16 +1006,6 @@ string pkgCache::RlsFileIterator::RelStr() return Res; } /*}}}*/ -// PkgFileIterator::IsOk - Checks if the cache is in sync with the file /*{{{*/ -// --------------------------------------------------------------------- -/* This stats the file and compares its stats with the ones that were - stored during generation. Date checks should probably also be - included here. */ -bool pkgCache::PkgFileIterator::IsOk() -{ - return true; -} - /*}}}*/ string pkgCache::PkgFileIterator::RelStr() /*{{{*/ { std::string Res; |