aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-05 18:57:20 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-05 22:05:31 +0000
commitfc338af48d1e121327ce9739508d6a82ad9b6927 (patch)
treefc357d72e8ce5b68baa923baa80c010fe2b1bdff
parent42248943d543fe6ec9226358ccd8a6887ebee251 (diff)
downloadpaludis-fc338af48d1e121327ce9739508d6a82ad9b6927.tar.gz
paludis-fc338af48d1e121327ce9739508d6a82ad9b6927.tar.xz
Can specify blocks and non-blocks at the same time
-rw-r--r--src/clients/cave/resolve_common.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index bb7b462..0a40a9a 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -422,7 +422,7 @@ namespace
if (targets->empty())
throw args::DoHelp("Must specify at least one target");
- bool seen_sets(false), seen_packages(false), seen_blockers(false);
+ bool seen_sets(false), seen_packages(false);
for (Sequence<std::string>::ConstIterator p(targets->begin()), p_end(targets->end()) ;
p != p_end ; ++p)
{
@@ -433,7 +433,7 @@ namespace
{
if ('!' == p->at(0))
{
- seen_blockers = true;
+ seen_packages = true;
PackageDepSpec s(parse_user_package_dep_spec(p->substr(1), env.get(), UserPackageDepSpecOptions()));
resolver->add_target(BlockDepSpec(*p, s, false));
allowed_to_remove_specs.push_back(s);
@@ -455,8 +455,8 @@ namespace
}
}
- if (seen_sets + seen_packages + seen_blockers > 1)
- throw args::DoHelp("Targets must be either packages or blockers or a single set");
+ if (seen_sets + seen_packages > 1)
+ throw args::DoHelp("Cannot specify set and non-set targets simultaneously");
if (seen_sets)
is_set = true;