From f6d7e21b7ba31f396d4e8c8e8a0b5b31562afb5b Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 6 May 2019 15:02:38 +0200 Subject: 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. --- apt-pkg/cacheset.cc | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'apt-pkg/cacheset.cc') 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) { -- cgit v1.2.3-70-g09d2