diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2019-02-04 16:05:45 +0100 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2019-02-26 16:31:20 +0100 |
commit | 53414a347dbf42513c94b2cd475591d83983ee2b (patch) | |
tree | 30134b552c783f7df9e64c7437ed9af29d823f4c /apt-pkg/pkgcache.cc | |
parent | 10176f8b30568a1a5d21bb67ff2ca937c771dc61 (diff) |
cacheiterators: Cleanup deprecated code
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r-- | apt-pkg/pkgcache.cc | 40 |
1 files changed, 1 insertions, 39 deletions
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; |