diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-06-29 19:10:47 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-06-29 19:10:47 +0200 |
commit | fb83c1d078b9f5e2e28a828c325dc62dcf060f2b (patch) | |
tree | f09332a681ad64e9b793cc2a45b964388193af0a /cmdline/cacheset.cc | |
parent | e67c08344dbb9ecd827658d74121fa9b66b28961 (diff) |
rename AddSelectedVersion() to a better public FromPackage()
Diffstat (limited to 'cmdline/cacheset.cc')
-rw-r--r-- | cmdline/cacheset.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cmdline/cacheset.cc b/cmdline/cacheset.cc index 42bc79693..35ef74f9a 100644 --- a/cmdline/cacheset.cc +++ b/cmdline/cacheset.cc @@ -321,7 +321,7 @@ APT::VersionSet VersionSet::FromString(pkgCacheFile &Cache, std::string pkg, for (PackageSet::const_iterator P = pkgset.begin(); P != pkgset.end(); ++P) { if (vertag == string::npos) { - AddSelectedVersion(Cache, verset, P, fallback, helper); + verset.insert(VersionSet::FromPackage(Cache, P, fallback, helper)); continue; } pkgCache::VerIterator V; @@ -351,10 +351,10 @@ APT::VersionSet VersionSet::FromString(pkgCacheFile &Cache, std::string pkg, return verset; } /*}}}*/ -// AddSelectedVersion - add version from package based on fallback /*{{{*/ -void VersionSet::AddSelectedVersion(pkgCacheFile &Cache, VersionSet &verset, - pkgCache::PkgIterator const &P, VersionSet::Version const &fallback, - CacheSetHelper &helper) { +// FromPackage - versions from package based on fallback /*{{{*/ +VersionSet VersionSet::FromPackage(pkgCacheFile &Cache, pkgCache::PkgIterator const &P, + VersionSet::Version const &fallback, CacheSetHelper &helper) { + VersionSet verset; pkgCache::VerIterator V; bool showErrors; switch(fallback) { @@ -404,6 +404,7 @@ void VersionSet::AddSelectedVersion(pkgCacheFile &Cache, VersionSet &verset, verset.insert(helper.canNotFindNewestVer(Cache, P)); break; } + return verset; } /*}}}*/ // getCandidateVer - Returns the candidate version of the given package /*{{{*/ |