summaryrefslogtreecommitdiff
path: root/cmdline/cacheset.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-06-28 22:13:17 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-06-28 22:13:17 +0200
commitbd631595620ca5b3c53ede4ef46c89399c26c5f3 (patch)
tree2f331a66ba0531aea2546bf574a1adfed1bdeecb /cmdline/cacheset.h
parent48c39e3246b72802a6f723eef1ce0c30e06be33d (diff)
- factor out code to get a single package FromName()
- check in Grouped* first without modifier interpretation
Diffstat (limited to 'cmdline/cacheset.h')
-rw-r--r--cmdline/cacheset.h15
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;