aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/cmd_execute_resolution.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/clients/cave/cmd_execute_resolution.cc')
-rw-r--r--src/clients/cave/cmd_execute_resolution.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/clients/cave/cmd_execute_resolution.cc b/src/clients/cave/cmd_execute_resolution.cc
index 1b5c59c..265b058 100644
--- a/src/clients/cave/cmd_execute_resolution.cc
+++ b/src/clients/cave/cmd_execute_resolution.cc
@@ -243,6 +243,33 @@ namespace
if (normal_only)
command.append(" --regulars-only");
+ if (cmdline.execution_options.a_skip_phase.specified() || cmdline.execution_options.a_abort_at_phase.specified()
+ || cmdline.execution_options.a_skip_until_phase.specified())
+ {
+ bool apply(false);
+
+ if (cmdline.execution_options.a_change_phases_for.argument() == "all")
+ apply = true;
+ else if (cmdline.execution_options.a_change_phases_for.argument() == "first")
+ apply = (x == 1);
+ else if (cmdline.execution_options.a_change_phases_for.argument() == "last")
+ apply = (x == y);
+ else
+ throw args::DoHelp("Don't understand argument '"
+ + cmdline.execution_options.a_change_phases_for.argument() + "' to '--"
+ + cmdline.execution_options.a_change_phases_for.long_name() + "'");
+
+ if (apply)
+ {
+ if (cmdline.execution_options.a_skip_phase.specified())
+ command.append(" " + cmdline.execution_options.a_skip_phase.forwardable_string());
+ if (cmdline.execution_options.a_abort_at_phase.specified())
+ command.append(" " + cmdline.execution_options.a_abort_at_phase.forwardable_string());
+ if (cmdline.execution_options.a_skip_until_phase.specified())
+ command.append(" " + cmdline.execution_options.a_skip_until_phase.forwardable_string());
+ }
+ }
+
if (cmdline.import_options.a_unpackaged_repository_params.specified())
{
for (args::StringSetArg::ConstIterator p(cmdline.import_options.a_unpackaged_repository_params.begin_args()),