diff options
author | 2010-10-05 21:47:25 +0100 | |
---|---|---|
committer | 2010-10-05 21:47:25 +0100 | |
commit | 25a81a622c7e11ed7358d720eb2deb02e6b6328a (patch) | |
tree | 85d95d32363b5034c2156071d8594c3770f33c6e | |
parent | 91545574ced81323755139e2b6b84bbb5cda0495 (diff) | |
download | paludis-25a81a622c7e11ed7358d720eb2deb02e6b6328a.tar.gz paludis-25a81a622c7e11ed7358d720eb2deb02e6b6328a.tar.xz |
cave resolve --ignore-{unable-decisions,unorderable-jobs}
Fixes: ticket:993
-rw-r--r-- | src/clients/cave/cmd_resolve_cmdline.cc | 9 | ||||
-rw-r--r-- | src/clients/cave/cmd_resolve_cmdline.hh | 4 | ||||
-rw-r--r-- | src/clients/cave/resolve_common.cc | 10 |
3 files changed, 19 insertions, 4 deletions
diff --git a/src/clients/cave/cmd_resolve_cmdline.cc b/src/clients/cave/cmd_resolve_cmdline.cc index 089bda484..e61e88ea4 100644 --- a/src/clients/cave/cmd_resolve_cmdline.cc +++ b/src/clients/cave/cmd_resolve_cmdline.cc @@ -269,6 +269,15 @@ ResolveCommandLineResolutionOptions::ResolveCommandLineResolutionOptions(args::A // "resolvent", true), // a_query_order(&g_query_options, "query-order", '\0', "Prompt for which jobs to order", true), + g_error_ignoring_options(this, "Error-ignoring Options", "Allow certain kinds of resolution errors to be ignored. " + "Highly dangerous; using these options will very likely result in your system becoming impressively or " + "subtly broken. Note that errors will still be shown, but the resolution will be allowed to proceed to " + "execution anyway."), + a_ignore_unable_decisions(&g_error_ignoring_options, "ignore-unable-decisions", '\0', "Ignore any resolvent for which " + "we were unable to make a decision. Specifying this will break your system.", true), + a_ignore_unorderable_jobs(&g_error_ignoring_options, "ignore-unorderable-jobs", '\0', "Ignore any job we were unable to " + "order. Specifying this will break your system.", true), + g_dump_options(this, "Dump Options", "Dump the resolver's state to stdout after completion, or when an " "error occurs. For debugging purposes; produces rather a lot of noise."), a_dump(&g_dump_options, "dump", '\0', "Dump debug output", true), diff --git a/src/clients/cave/cmd_resolve_cmdline.hh b/src/clients/cave/cmd_resolve_cmdline.hh index 01a22e048..5728d011a 100644 --- a/src/clients/cave/cmd_resolve_cmdline.hh +++ b/src/clients/cave/cmd_resolve_cmdline.hh @@ -106,6 +106,10 @@ namespace paludis // args::SwitchArg a_query_decisions; // args::SwitchArg a_query_order; + args::ArgsGroup g_error_ignoring_options; + args::SwitchArg a_ignore_unable_decisions; + args::SwitchArg a_ignore_unorderable_jobs; + args::ArgsGroup g_dump_options; args::SwitchArg a_dump; args::SwitchArg a_dump_restarts; diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc index 4dd3f5dcd..fc902c52d 100644 --- a/src/clients/cave/resolve_common.cc +++ b/src/clients/cave/resolve_common.cc @@ -983,14 +983,16 @@ paludis::cave::resolve_common( graph_jobs_options, program_options, keys_if_import, purge ? std::make_shared<const Sequence<std::pair<std::string, std::string> > >() : targets_if_not_purge); - if (! resolver->resolved()->taken_unable_to_make_decisions()->empty()) - retcode |= 1; + if (! resolution_options.a_ignore_unable_decisions.specified()) + if (! resolver->resolved()->taken_unable_to_make_decisions()->empty()) + retcode |= 1; if (! resolver->resolved()->taken_unconfirmed_decisions()->empty()) retcode |= 2; - if (! resolver->resolved()->taken_unorderable_decisions()->empty()) - retcode |= 4; + if (! resolution_options.a_ignore_unorderable_jobs.specified()) + if (! resolver->resolved()->taken_unorderable_decisions()->empty()) + retcode |= 4; if (0 == retcode) return perform_resolution(env, resolver->resolved(), resolution_options, |