aboutsummaryrefslogtreecommitdiff
path: root/paludis/elike_conditional_dep_spec.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-08-06 22:53:19 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-08-06 22:53:19 +0100
commitf4136ef1d6b8bcb2bf1ce5c0a418b29961dc7948 (patch)
tree417de39a29d82a06b3f4e58b4f072106a296a286 /paludis/elike_conditional_dep_spec.cc
parent34329461d843a53ba011a13b23a524624920d6ae (diff)
downloadpaludis-f4136ef1d6b8bcb2bf1ce5c0a418b29961dc7948.tar.gz
paludis-f4136ef1d6b8bcb2bf1ce5c0a418b29961dc7948.tar.xz
Don't allow queries on co_special things
Diffstat (limited to 'paludis/elike_conditional_dep_spec.cc')
-rw-r--r--paludis/elike_conditional_dep_spec.cc5
1 files changed, 5 insertions, 0 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))