aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-11 10:48:04 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-11 10:48:04 +0000
commita954d4bc953d720c47a8d8cfa8b79f0eaed70356 (patch)
tree3c182125518a78d05aa80e4e57146e38b9fe1ed5
parentef7485e4170017907eb82a28d7f60779b5578c63 (diff)
downloadpaludis-a954d4bc953d720c47a8d8cfa8b79f0eaed70356.tar.gz
paludis-a954d4bc953d720c47a8d8cfa8b79f0eaed70356.tar.xz
Allow overriding of selected masks as necessary
-rw-r--r--src/clients/paludis/command_line.cc7
-rw-r--r--src/clients/paludis/command_line.hh1
-rw-r--r--src/clients/paludis/install.cc18
3 files changed, 26 insertions, 0 deletions
diff --git a/src/clients/paludis/command_line.cc b/src/clients/paludis/command_line.cc
index d7500e4..18de6a1 100644
--- a/src/clients/paludis/command_line.cc
+++ b/src/clients/paludis/command_line.cc
@@ -169,6 +169,13 @@ CommandLine::CommandLine() :
("error", "Error straight away")
("discard", "Discard (dangerous)"),
"error"),
+ dl_override_masks(&dl_args, "dl-override-masks", '\0',
+ "Zero or more mask kinds that can be overridden as necessary",
+ args::StringSetArg::StringSetArgOptions
+ ("keyword", "Keyword masks")
+ ("profile", "Profile masks")
+ ("repository", "Repository masks")
+ ("license", "License masks")),
dl_fall_back(&dl_args, "dl-fall-back", '\0', "When to fall back to installed packages",
args::EnumArg::EnumArgOptions
diff --git a/src/clients/paludis/command_line.hh b/src/clients/paludis/command_line.hh
index bc2fdbf..d4c1ff1 100644
--- a/src/clients/paludis/command_line.hh
+++ b/src/clients/paludis/command_line.hh
@@ -253,6 +253,7 @@ class CommandLine :
paludis::args::EnumArg dl_circular;
paludis::args::EnumArg dl_blocks;
+ paludis::args::StringSetArg dl_override_masks;
paludis::args::EnumArg dl_fall_back;
diff --git a/src/clients/paludis/install.cc b/src/clients/paludis/install.cc
index 7e78414..795b343 100644
--- a/src/clients/paludis/install.cc
+++ b/src/clients/paludis/install.cc
@@ -364,6 +364,24 @@ do_install()
throw args::DoHelp("bad value for --dl-blocks");
}
+ if (CommandLine::get_instance()->dl_override_masks.specified())
+ {
+ for (args::StringSetArg::Iterator a(CommandLine::get_instance()->dl_override_masks.args_begin()),
+ a_end(CommandLine::get_instance()->dl_override_masks.args_end()) ; a != a_end ; ++a)
+ {
+ if (*a == "keyword")
+ options.override_mask_reasons.set(mr_keyword);
+ else if (*a == "profile")
+ options.override_mask_reasons.set(mr_profile_mask);
+ else if (*a == "repository")
+ options.override_mask_reasons.set(mr_repository_mask);
+ else if (*a == "license")
+ options.override_mask_reasons.set(mr_license);
+ else
+ throw args::DoHelp("bad value for --dl-override-masks");
+ }
+ }
+
if (CommandLine::get_instance()->dl_fall_back.specified())
{
if (CommandLine::get_instance()->dl_fall_back.argument() == "as-needed-except-targets")