diff options
author | Michael Vogt <mvo@debian.org> | 2014-02-20 16:32:48 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-02-20 16:32:48 +0100 |
commit | bef425ae689899d3add1f6a26b888012803a7308 (patch) | |
tree | 79ba0268c02129fbaaa1fb32c58904cb37ca1167 /apt-pkg/cacheset.cc | |
parent | 74ac981563c6ccfd5291b6b6b83e193afa8aa40b (diff) | |
parent | 1c93747533dcf1cbbb2c743d0028ad157a7684a4 (diff) |
Merge branch 'debian/sid' into ubuntu/master
Conflicts:
configure.ac
debian/changelog
test/integration/test-kernel-helper-autoremove
Diffstat (limited to 'apt-pkg/cacheset.cc')
-rw-r--r-- | apt-pkg/cacheset.cc | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc index 29281aab9..6b6fdb5ad 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; } @@ -304,7 +312,9 @@ bool PackageContainerInterface::FromString(PackageContainerInterface * const pci if (FromGroup(pci, Cache, str, helper) == false && FromTask(pci, Cache, str, helper) == false && - FromFnmatch(pci, Cache, str, helper) == false && +#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13) + FromFnmatch(pci, Cache, str, helper) == false) +#endif FromRegEx(pci, Cache, str, helper) == false) { helper.canNotFindPackage(pci, Cache, str); @@ -588,7 +598,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 +664,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, |