aboutsummaryrefslogtreecommitdiff
path: root/paludis
diff options
context:
space:
mode:
Diffstat (limited to 'paludis')
-rw-r--r--paludis/elike_conditional_dep_spec.cc5
-rw-r--r--paludis/elike_use_requirement.cc5
-rw-r--r--paludis/repositories/e/required_use_verifier.cc2
3 files changed, 11 insertions, 1 deletions
diff --git a/paludis/elike_conditional_dep_spec.cc b/paludis/elike_conditional_dep_spec.cc
index dbb71eb18..4b9fe300d 100644
--- a/paludis/elike_conditional_dep_spec.cc
+++ b/paludis/elike_conditional_dep_spec.cc
@@ -58,7 +58,12 @@ namespace
auto choices(id.choices_key()->parse_value());
auto v(choices->find_by_name_with_prefix(f));
if (v)
+ {
+ if (co_special == v->origin())
+ Log::get_instance()->message("elike_conditional_dep_spec.query", ll_warning, lc_context) <<
+ "ID '" << id << "' flag '" << f << "' should not be used as a conditional";
return v->enabled();
+ }
if (! no_warning_for_unlisted)
if (! choices->has_matching_contains_every_value_prefix(f))
diff --git a/paludis/elike_use_requirement.cc b/paludis/elike_use_requirement.cc
index af891f440..1d2c30509 100644
--- a/paludis/elike_use_requirement.cc
+++ b/paludis/elike_use_requirement.cc
@@ -65,7 +65,12 @@ namespace
auto choices(id->choices_key()->parse_value());
auto v(choices->find_by_name_with_prefix(f));
if (v)
+ {
+ if (co_special == v->origin())
+ Log::get_instance()->message("elike_use_requirement.query", ll_warning, lc_context) <<
+ "ID '" << *id << "' flag '" << f << "' should not be used as a conditional";
return v->enabled();
+ }
if (default_value.is_indeterminate() && ! choices->has_matching_contains_every_value_prefix(f) && options[euro_missing_is_qa])
Log::get_instance()->message("elike_use_requirement.query", ll_qa, lc_context) <<
diff --git a/paludis/repositories/e/required_use_verifier.cc b/paludis/repositories/e/required_use_verifier.cc
index cdac1ca7a..b965a06b0 100644
--- a/paludis/repositories/e/required_use_verifier.cc
+++ b/paludis/repositories/e/required_use_verifier.cc
@@ -93,7 +93,7 @@ RequiredUseVerifier::matches(const std::string & s)
}
auto c(_imp->id->choices_key()->parse_value()->find_by_name_with_prefix(ChoiceNameWithPrefix(s)));
- if (! c)
+ if ((! c) || (co_special == c->origin()))
{
Log::get_instance()->message("e.required_use.no_choice", ll_warning, lc_context)
<< "ID '" << *_imp->id << "' has no choice named '" << s << "'', so cannot check that required use constraint '" << s << "' matches";