diff options
Diffstat (limited to 'cmdline/cacheset.h')
-rw-r--r-- | cmdline/cacheset.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/cmdline/cacheset.h b/cmdline/cacheset.h index 9c9491020..21c42c511 100644 --- a/cmdline/cacheset.h +++ b/cmdline/cacheset.h @@ -40,6 +40,7 @@ public: /*{{{*/ virtual void showSelectedVersion(pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const Ver, string const &ver, bool const &verIsRel) {}; + virtual pkgCache::PkgIterator canNotFindPkgName(pkgCacheFile &Cache, std::string const &str); virtual PackageSet canNotFindTask(pkgCacheFile &Cache, std::string pattern); virtual PackageSet canNotFindRegEx(pkgCacheFile &Cache, std::string pattern); virtual PackageSet canNotFindPackage(pkgCacheFile &Cache, std::string const &str); @@ -146,6 +147,17 @@ public: /*{{{*/ return APT::PackageSet::FromString(Cache, string, helper); } + /** \brief returns a package specified by a string + + \param Cache the package is in + \param string String the package name should be extracted from + \param out stream to print various notices to */ + static pkgCache::PkgIterator FromName(pkgCacheFile &Cache, std::string const &string, CacheSetHelper &helper); + static pkgCache::PkgIterator FromName(pkgCacheFile &Cache, std::string const &string) { + CacheSetHelper helper; + return APT::PackageSet::FromName(Cache, string, helper); + } + /** \brief returns all packages specified on the commandline Get all package names from the commandline and executes regex's if needed. @@ -268,7 +280,8 @@ public: /*{{{*/ } static APT::VersionSet FromString(pkgCacheFile &Cache, std::string pkg, - APT::VersionSet::Version const &fallback, CacheSetHelper &helper); + APT::VersionSet::Version const &fallback, CacheSetHelper &helper, + bool const &onlyFromName = false); static APT::VersionSet FromString(pkgCacheFile &Cache, std::string pkg, APT::VersionSet::Version const &fallback) { CacheSetHelper helper; |