diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2019-05-06 15:02:38 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2019-05-06 15:02:38 +0200 |
commit | f6d7e21b7ba31f396d4e8c8e8a0b5b31562afb5b (patch) | |
tree | 78c02ae1e5ecf1c6aaf1ffd64217075d6169fbe1 /apt-pkg/cacheset.cc | |
parent | db36c35a351a76825ae00628b74c160bc418683c (diff) |
cacheset: Remove simple cases of deprecated code
This is missing the ones that are still actively used in
cacheset.cc, we need to clean those up too, but they are
obviously more tricky.
Diffstat (limited to 'apt-pkg/cacheset.cc')
-rw-r--r-- | apt-pkg/cacheset.cc | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc index 670cdba3a..0c0f213b7 100644 --- a/apt-pkg/cacheset.cc +++ b/apt-pkg/cacheset.cc @@ -231,33 +231,6 @@ bool CacheSetHelper::PackageFromFnmatch(PackageContainerInterface * const pci, return true; } /*}}}*/ -// PackageFromName - Returns the package defined by this string /*{{{*/ -pkgCache::PkgIterator CacheSetHelper::PackageFromName(pkgCacheFile &Cache, - std::string const &str) { - std::string pkg = str; - size_t archfound = pkg.find_last_of(':'); - std::string arch; - if (archfound != std::string::npos) { - arch = pkg.substr(archfound+1); - pkg.erase(archfound); - } - - if (Cache.GetPkgCache() == 0) - return pkgCache::PkgIterator(Cache, 0); - - pkgCache::PkgIterator Pkg(Cache, 0); - if (arch.empty() == true) { - pkgCache::GrpIterator Grp = Cache.GetPkgCache()->FindGrp(pkg); - if (Grp.end() == false) - Pkg = Grp.FindPreferredPkg(); - } else - Pkg = Cache.GetPkgCache()->FindPkg(pkg, arch); - - if (Pkg.end() == true) - return canNotFindPkgName(Cache, str); - return Pkg; -} - /*}}}*/ // PackageFromPackageName - Returns the package defined by this string /*{{{*/ bool CacheSetHelper::PackageFromPackageName(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pkg) { |