aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-30 21:13:43 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-30 21:13:43 +0100
commitffecab5cedad6ee5eaa70fbb03f1bf1637fc70ee (patch)
tree33398e903075ac9848582efbc355ff79eb6e4a9c
parent24d6dabbfffa35287fb75b18b2110a1b999bf4a1 (diff)
downloadpaludis-ffecab5cedad6ee5eaa70fbb03f1bf1637fc70ee.tar.gz
paludis-ffecab5cedad6ee5eaa70fbb03f1bf1637fc70ee.tar.xz
Better nothing matching for cave resolve
-rw-r--r--src/clients/cave/resolve_common.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 5bc23a5..be08186 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -135,10 +135,13 @@ namespace
if (p->first.empty())
continue;
+ std::string p_suggesion(p->first);
try
{
+
if ('!' == p->first.at(0))
{
+ p_suggesion.erase(0, 1);
seen_packages = true;
PackageDepSpec s(parse_user_package_dep_spec(p->first.substr(1), env.get(), { }));
BlockDepSpec bs("!" + stringify(s), s, bk_weak);
@@ -163,6 +166,10 @@ namespace
result->push_back(p->first);
seen_sets = true;
}
+ catch (const NoSuchPackageError &)
+ {
+ nothing_matching_error(env.get(), p_suggesion, filter::All());
+ }
}
if (seen_sets + seen_packages > 1)