aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-04-28 19:40:29 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-04-28 19:40:29 +0100
commitd37e49b9dac955110cd9e2d5d7bd6beb0453a342 (patch)
tree021aea5186ab406d148aaeec4d4f96dfbecb9647
parent0b9cf3c9329eec20abf613de15d6277a24b3f5e4 (diff)
downloadpaludis-d37e49b9dac955110cd9e2d5d7bd6beb0453a342.tar.gz
paludis-d37e49b9dac955110cd9e2d5d7bd6beb0453a342.tar.xz
Support change-phases-for !first, !last
-rw-r--r--src/clients/cave/cmd_execute_resolution.cc4
-rw-r--r--src/clients/cave/resolve_cmdline.cc4
2 files changed, 7 insertions, 1 deletions
diff --git a/src/clients/cave/cmd_execute_resolution.cc b/src/clients/cave/cmd_execute_resolution.cc
index 3e6700c..06e8ed1 100644
--- a/src/clients/cave/cmd_execute_resolution.cc
+++ b/src/clients/cave/cmd_execute_resolution.cc
@@ -404,8 +404,12 @@ namespace
return true;
else if (cmdline.execution_options.a_change_phases_for.argument() == "first")
return (x == 1);
+ else if (cmdline.execution_options.a_change_phases_for.argument() == "!first")
+ return (x != 1);
else if (cmdline.execution_options.a_change_phases_for.argument() == "last")
return (x == y);
+ else if (cmdline.execution_options.a_change_phases_for.argument() == "!last")
+ return (x != y);
else
throw args::DoHelp("Don't understand argument '"
+ cmdline.execution_options.a_change_phases_for.argument() + "' to '--"
diff --git a/src/clients/cave/resolve_cmdline.cc b/src/clients/cave/resolve_cmdline.cc
index 82abf30..96178d2 100644
--- a/src/clients/cave/resolve_cmdline.cc
+++ b/src/clients/cave/resolve_cmdline.cc
@@ -395,7 +395,9 @@ ResolveCommandLineExecutionOptions::ResolveCommandLineExecutionOptions(args::Arg
args::EnumArg::EnumArgOptions
("all", "All packages")
("first", "Only the first package on the list")
- ("last", "Only the last package on the list"),
+ ("!first", "Everything except the first package on the list")
+ ("last", "Only the last package on the list")
+ ("!last", "Everything except the last package on the list"),
"all")
{
a_fetch_jobs.set_argument(-1);