aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-04 00:45:40 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-04 00:45:40 +0000
commitb4bc601c5a7618bdb27dfa6eef5ebab2434ef338 (patch)
tree3d263981f305b1100be9f9940d3c5db245a595ac
parent217c8c0afa539424d4cd7b713f27737544e9839c (diff)
downloadpaludis-b4bc601c5a7618bdb27dfa6eef5ebab2434ef338.tar.gz
paludis-b4bc601c5a7618bdb27dfa6eef5ebab2434ef338.tar.xz
Warn if adjutrix -w doesn't need anything stabled (really)
-rw-r--r--src/clients/adjutrix/what_needs_keywording.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/clients/adjutrix/what_needs_keywording.cc b/src/clients/adjutrix/what_needs_keywording.cc
index d064eee..62108ee 100644
--- a/src/clients/adjutrix/what_needs_keywording.cc
+++ b/src/clients/adjutrix/what_needs_keywording.cc
@@ -81,16 +81,11 @@ int do_what_needs_keywording(NoConfigEnvironment & env)
cout << std::string(29, '=') << " " << std::string(19, '=') << " "
<< std::string(17, '=') << " " << std::string(9, '=') << endl;
- if (d.begin() == d.end())
- {
- cerr << "The specified package is already at the target keyword level. Perhaps" << endl;
- cerr << "you need to specify a versioned target ('>=cat/pkg-1.23')." << endl;
- return 4;
- }
-
+ bool none(true);
for (DepList::Iterator p(d.begin()), p_end(d.end()) ; p != p_end ; ++p)
if (dlk_masked == p->kind)
{
+ none = false;
cout << std::setw(30) << std::left << stringify(p->package.name);
cout << std::setw(20) << std::left << stringify(p->package.version);
@@ -127,6 +122,14 @@ int do_what_needs_keywording(NoConfigEnvironment & env)
cout << endl;
}
+ if (none)
+ {
+ cerr << "The specified package is already at the target keyword level. Perhaps" << endl;
+ cerr << "you need to specify a versioned target ('>=cat/pkg-1.23')." << endl;
+ return 4;
+ }
+
+
return return_code;
}