aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-07 19:26:07 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-07 19:26:07 +0100
commitf4af49b232693d71caf264c03e9d340c586d74fd (patch)
treeb20139a096bc78dbef7ba7f36ea0ce76abd9b94e
parent25a81a622c7e11ed7358d720eb2deb02e6b6328a (diff)
downloadpaludis-f4af49b232693d71caf264c03e9d340c586d74fd.tar.gz
paludis-f4af49b232693d71caf264c03e9d340c586d74fd.tar.xz
Be more clear when given non-existing package names
Fixes: ticket:1004
-rw-r--r--src/clients/cave/cmd_display_resolution-fmt.hh3
-rwxr-xr-xsrc/clients/cave/cmd_display_resolution.cc9
2 files changed, 11 insertions, 1 deletions
diff --git a/src/clients/cave/cmd_display_resolution-fmt.hh b/src/clients/cave/cmd_display_resolution-fmt.hh
index c3fa79e..efc8238 100644
--- a/src/clients/cave/cmd_display_resolution-fmt.hh
+++ b/src/clients/cave/cmd_display_resolution-fmt.hh
@@ -194,6 +194,9 @@ const auto fs_unable_taken = make_format_string_fetcher("display-resolution/unab
const auto fs_unable_unsuitable_header = make_format_string_fetcher("display-resolution/unable_unsuitable_header", 1)
<< " Unsuitable candidates:" << "\\n";
+const auto fs_unable_unsuitable_nothing = make_format_string_fetcher("display-resolution/unable_unsuitable_nothing", 1)
+ << " * Found no packages for resolvent " << param<'r'>() << "\\n";
+
const auto fs_unable_unsuitable_id = make_format_string_fetcher("display-resolution/unable_unsuitable_id", 1)
<< " * " << param<'c'>() << param<'i'>() << c::normal() << "\\n";
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index bd2bc73..7d27d60 100755
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -1288,10 +1288,17 @@ namespace
display_reasons(resolution, true);
- if (untaken || d.unsuitable_candidates()->empty())
+ if (untaken)
return;
cout << fuc(fs_unable_unsuitable_header());
+
+ if (d.unsuitable_candidates()->empty())
+ {
+ cout << fuc(fs_unable_unsuitable_nothing(), fv<'r'>(stringify(resolution->resolvent())));
+ return;
+ }
+
for (UnsuitableCandidates::ConstIterator u(d.unsuitable_candidates()->begin()),
u_end(d.unsuitable_candidates()->end()) ;
u != u_end ; ++u)