diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-06-26 21:17:34 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-06-26 21:17:34 +0200 |
commit | 48c39e3246b72802a6f723eef1ce0c30e06be33d (patch) | |
tree | 4b1475b2c66a985a107946c8a6c824974522ee6b | |
parent | 5c640e864f8b5f1c175682a94f6c6d0dff42d4bc (diff) |
- only print errors if all tries to get a package by string failed
*
-rw-r--r-- | cmdline/cacheset.cc | 18 | ||||
-rw-r--r-- | debian/changelog | 4 |
2 files changed, 15 insertions, 7 deletions
diff --git a/cmdline/cacheset.cc b/cmdline/cacheset.cc index 88a98fdbe..2b00187d8 100644 --- a/cmdline/cacheset.cc +++ b/cmdline/cacheset.cc @@ -200,15 +200,21 @@ PackageSet PackageSet::FromString(pkgCacheFile &Cache, std::string const &str, C pkgset.insert(Pkg); return pkgset; } + + _error->PushToStack(); + PackageSet pset = FromTask(Cache, str, helper); - if (pset.empty() == false) - return pset; + if (pset.empty() == true) { + pset = FromRegEx(Cache, str, helper); + if (pset.empty() == true) + pset = helper.canNotFindPackage(Cache, str); + } - pset = FromRegEx(Cache, str, helper); if (pset.empty() == false) - return pset; - - return helper.canNotFindPackage(Cache, str); + _error->RevertToStack(); + else + _error->MergeWithStack(); + return pset; } /*}}}*/ // GroupedFromCommandLine - Return all versions specified on commandline/*{{{*/ diff --git a/debian/changelog b/debian/changelog index fbe814d84..32a18cf59 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ apt (0.7.26~exp8) UNRELEASED; urgency=low - get the candidate either from an already built depcache or use the policy which is a bit faster than depcache generation - get packages by task^ with FromTask() + - only print errors if all tries to get a package by string failed * cmdline/apt-get.cc: - use the cachsets in the install commands * apt-pkg/orderlist.cc: @@ -29,8 +30,9 @@ apt (0.7.26~exp8) UNRELEASED; urgency=low * apt-pkg/contrib/fileutl.cc: - show notice about ignored file instead of being always silent - add a Dir::Ignore-Files-Silently list option to control the notice + * - -- David Kalnischkies <kalnischkies@gmail.com> Sat, 26 Jun 2010 20:43:09 +0200 + -- David Kalnischkies <kalnischkies@gmail.com> Sat, 26 Jun 2010 21:17:08 +0200 apt (0.7.26~exp7) experimental; urgency=low |