aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-04 00:38:59 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-04 00:38:59 +0000
commit8fc63f607d2dcf6a41dc02532a90c52e898c4c10 (patch)
tree6f08d0fa5cb82bcab472258a53ddf95bd71d079e
parent87d5f5740bff547dbdd17f6d03498774fb65beb3 (diff)
downloadpaludis-8fc63f607d2dcf6a41dc02532a90c52e898c4c10.tar.gz
paludis-8fc63f607d2dcf6a41dc02532a90c52e898c4c10.tar.xz
Warn if adjutrix -w doesn't need anything stabled
-rw-r--r--src/clients/adjutrix/what_needs_keywording.cc21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/clients/adjutrix/what_needs_keywording.cc b/src/clients/adjutrix/what_needs_keywording.cc
index 4f89c7b..d064eee 100644
--- a/src/clients/adjutrix/what_needs_keywording.cc
+++ b/src/clients/adjutrix/what_needs_keywording.cc
@@ -62,6 +62,16 @@ int do_what_needs_keywording(NoConfigEnvironment & env)
DepList d(&env, d_options);
+ for (CommandLine::ParametersIterator p(next(CommandLine::get_instance()->begin_parameters())),
+ p_end(CommandLine::get_instance()->end_parameters()) ; p != p_end ; ++p)
+ {
+ if (std::string::npos == p->find('/'))
+ d.add(std::tr1::shared_ptr<PackageDepAtom>(new PackageDepAtom(
+ env.package_database()->fetch_unique_qualified_package_name(PackageNamePart(*p)))));
+ else
+ d.add(std::tr1::shared_ptr<PackageDepAtom>(new PackageDepAtom(*p)));
+ }
+
cout << std::setw(30) << std::left << "Package";
cout << std::setw(20) << std::left << "Version";
cout << std::setw(18) << std::left << "Current Keywords";
@@ -71,14 +81,11 @@ int do_what_needs_keywording(NoConfigEnvironment & env)
cout << std::string(29, '=') << " " << std::string(19, '=') << " "
<< std::string(17, '=') << " " << std::string(9, '=') << endl;
- for (CommandLine::ParametersIterator p(next(CommandLine::get_instance()->begin_parameters())),
- p_end(CommandLine::get_instance()->end_parameters()) ; p != p_end ; ++p)
+ if (d.begin() == d.end())
{
- if (std::string::npos == p->find('/'))
- d.add(std::tr1::shared_ptr<PackageDepAtom>(new PackageDepAtom(
- env.package_database()->fetch_unique_qualified_package_name(PackageNamePart(*p)))));
- else
- d.add(std::tr1::shared_ptr<PackageDepAtom>(new PackageDepAtom(*p)));
+ 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;
}
for (DepList::Iterator p(d.begin()), p_end(d.end()) ; p != p_end ; ++p)