summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheset.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-02-14 19:40:58 +0100
committerMichael Vogt <mvo@debian.org>2014-02-14 19:40:58 +0100
commit16724b66fef02208ef050a36f732991941e39025 (patch)
treeb73fde14ff6634370e5ca7bb0a95f3c28a60465a /apt-pkg/cacheset.cc
parent889b0072a93a5afe9ffec93ab791d584c64754a0 (diff)
add missing canNotFindFnmatch/showFnmatchSelection (for the next ABI break)
Diffstat (limited to 'apt-pkg/cacheset.cc')
-rw-r--r--apt-pkg/cacheset.cc25
1 files changed, 23 insertions, 2 deletions
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc
index 29281aab9..1b1e6d595 100644
--- a/apt-pkg/cacheset.cc
+++ b/apt-pkg/cacheset.cc
@@ -204,12 +204,20 @@ PackageContainerInterface::FromFnmatch(PackageContainerInterface * const pci,
}
pci->insert(Pkg);
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
+ helper.showFnmatchSelection(Pkg, pattern);
+#else
helper.showRegExSelection(Pkg, pattern);
+#endif
found = true;
}
if (found == false) {
- helper.canNotFindRegEx(pci, Cache, pattern);
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
+ helper.canNotFindFnmatch(pci, Cache, pattern);
+#else
+ helper.canNotFindRegEx(pci, Cache, pattern);
+#endif
pci->setConstructor(UNKNOWN);
return false;
}
@@ -588,7 +596,13 @@ void CacheSetHelper::canNotFindRegEx(PackageContainerInterface * const pci, pkgC
if (ShowError == true)
_error->Insert(ErrorType, _("Couldn't find any package by regex '%s'"), pattern.c_str());
}
- /*}}}*/
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
+// canNotFindFnmatch - handle the case no package is found by a fnmatch /*{{{*/
+void CacheSetHelper::canNotFindFnmatch(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern) {
+ if (ShowError == true)
+ _error->Insert(ErrorType, _("Couldn't find any package by glob '%s'"), pattern.c_str());
+}
+#endif /*}}}*/
// canNotFindPackage - handle the case no package is found from a string/*{{{*/
void CacheSetHelper::canNotFindPackage(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string const &str) {
}
@@ -648,6 +662,13 @@ void CacheSetHelper::showRegExSelection(pkgCache::PkgIterator const &pkg,
std::string const &pattern) {
}
/*}}}*/
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
+// showFnmatchSelection /*{{{*/
+void CacheSetHelper::showFnmatchSelection(pkgCache::PkgIterator const &pkg,
+ std::string const &pattern) {
+}
+ /*}}}*/
+#endif
// showSelectedVersion /*{{{*/
void CacheSetHelper::showSelectedVersion(pkgCache::PkgIterator const &Pkg,
pkgCache::VerIterator const Ver,