aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-24 14:34:52 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-24 14:34:52 +0100
commit58d424cd623042b936becf057cc696f99815f905 (patch)
treec86f15950368c69da36b144abf3198ed7b2a432d
parentad4a15a05f8714c73a44b7127f310f1614c63d8a (diff)
downloadpaludis-58d424cd623042b936becf057cc696f99815f905.tar.gz
paludis-58d424cd623042b936becf057cc696f99815f905.tar.xz
cave resolve --no-override-masks
-rw-r--r--src/clients/cave/cmd_resolve_cmdline.cc3
-rw-r--r--src/clients/cave/cmd_resolve_cmdline.hh1
-rw-r--r--src/clients/cave/resolve_common.cc7
3 files changed, 9 insertions, 2 deletions
diff --git a/src/clients/cave/cmd_resolve_cmdline.cc b/src/clients/cave/cmd_resolve_cmdline.cc
index 4d9734a..16b8da4 100644
--- a/src/clients/cave/cmd_resolve_cmdline.cc
+++ b/src/clients/cave/cmd_resolve_cmdline.cc
@@ -70,6 +70,9 @@ ResolveCommandLineResolutionOptions::ResolveCommandLineResolutionOptions(args::A
"Purge packages matching the given specification, if they will no longer be used after "
"a resolution. Use '*/*' to accept all purges, but note that by doing so you are putting "
"a great deal of trust in package authors to get dependencies right."),
+ a_no_override_masks(&g_resolution_options, "no-override-masks", '\0',
+ "If otherwise unable to make a decision, unless this option is specified the resolver "
+ "will try packages that are weakly masked too.", true),
g_dependent_options(this, "Dependent Options", "Dependent options. A package is dependent if it "
"requires (or looks like it might require) a package which is being removed. By default, "
diff --git a/src/clients/cave/cmd_resolve_cmdline.hh b/src/clients/cave/cmd_resolve_cmdline.hh
index ae44a03..e23b337 100644
--- a/src/clients/cave/cmd_resolve_cmdline.hh
+++ b/src/clients/cave/cmd_resolve_cmdline.hh
@@ -48,6 +48,7 @@ namespace paludis
args::StringSetArg a_permit_downgrade;
args::StringSetArg a_permit_old_version;
args::StringSetArg a_purge;
+ args::SwitchArg a_no_override_masks;
args::ArgsGroup g_dependent_options;
args::StringSetArg a_uninstalls_may_break;
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 2ec8bbc..06a0c39 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -285,10 +285,13 @@ namespace
Filter make_unmaskable_filter_fn(
const Environment * const,
- const ResolveCommandLineResolutionOptions &,
+ const ResolveCommandLineResolutionOptions & cmdline,
const std::shared_ptr<const Resolution> &)
{
- return UnmaskableFilter();
+ if (cmdline.a_no_override_masks.specified())
+ return filter::NotMasked();
+ else
+ return UnmaskableFilter();
}
const std::shared_ptr<const Sequence<std::string> > add_resolver_targets(