aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/e_choices_key.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/e_choices_key.cc')
-rw-r--r--paludis/repositories/e/e_choices_key.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/paludis/repositories/e/e_choices_key.cc b/paludis/repositories/e/e_choices_key.cc
index 49db72f32..769f3ebb1 100644
--- a/paludis/repositories/e/e_choices_key.cc
+++ b/paludis/repositories/e/e_choices_key.cc
@@ -149,6 +149,9 @@ namespace
p = prefixes.insert(std::make_pair(*current_prefix_stack.begin(), Values())).first;
UnprefixedChoiceName n(parse_myoption(node.spec()->text()).first);
+ if (std::string::npos != stringify(n).find(':'))
+ throw MyOptionsError("Flag '" + stringify(n) + "' must not contain a ':'");
+
Values::iterator v(p->second.find(n));
if (v == p->second.end())
v = p->second.insert(std::make_pair(n, Annotations())).first;
@@ -175,6 +178,9 @@ namespace
void visit(const PlainTextSpecTree::NodeType<PlainTextLabelDepSpec>::Type & node)
{
+ if (node.spec()->label() == "build_options")
+ throw MyOptionsError("Label 'build_options' is not for package use");
+
*current_prefix_stack.begin() = ChoicePrefixName(node.spec()->label());
}