aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/e_choices_key.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-08-06 19:23:28 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-08-07 14:51:14 +0100
commit25215485622ceb2992cc3f831eafba5744770f33 (patch)
tree58b4593edd3aa8edc7c4a20d40f18a3cf681ca63 /paludis/repositories/e/e_choices_key.cc
parente68ba8a3313e0d14ad9a978a57fd29c472b4953e (diff)
downloadpaludis-25215485622ceb2992cc3f831eafba5744770f33.tar.gz
paludis-25215485622ceb2992cc3f831eafba5744770f33.tar.xz
Explicit choices
Diffstat (limited to 'paludis/repositories/e/e_choices_key.cc')
-rw-r--r--paludis/repositories/e/e_choices_key.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/paludis/repositories/e/e_choices_key.cc b/paludis/repositories/e/e_choices_key.cc
index 9f75658be..8ec98e13f 100644
--- a/paludis/repositories/e/e_choices_key.cc
+++ b/paludis/repositories/e/e_choices_key.cc
@@ -191,9 +191,10 @@ namespace
const UnprefixedChoiceName & unprefixed,
const std::string & description,
const Tribool s,
- const ChoiceOrigin o)
+ const ChoiceOrigin o,
+ const bool presumed)
{
- return id->make_choice_value(choice, unprefixed, s, false, o, description, false);
+ return id->make_choice_value(choice, unprefixed, s, false, o, description, false, presumed);
}
std::string get_maybe_description(const std::shared_ptr<const Map<ChoiceNameWithPrefix, std::string> > & m,
@@ -327,7 +328,7 @@ EChoicesKey::populate_myoptions() const
{
for (MyOptionsFinder::Descriptions::const_iterator v(p->second.begin()), v_end(p->second.end()) ;
v != v_end ; ++v)
- exp->add(make_myoption(_imp->id, exp, v->first, v->second, indeterminate, co_explicit));
+ exp->add(make_myoption(_imp->id, exp, v->first, v->second, indeterminate, co_explicit, false));
myoptions.prefixes.erase(p);
}
}
@@ -339,7 +340,7 @@ EChoicesKey::populate_myoptions() const
Context local_local_context("When using empty prefix to populate choices:");
for (MyOptionsFinder::Descriptions::const_iterator v(p->second.begin()), v_end(p->second.end()) ;
v != v_end ; ++v)
- options->add(make_myoption(_imp->id, options, v->first, v->second, indeterminate, co_explicit));
+ options->add(make_myoption(_imp->id, options, v->first, v->second, indeterminate, co_explicit, false));
myoptions.prefixes.erase(p);
}
@@ -438,7 +439,7 @@ EChoicesKey::populate_iuse(const std::shared_ptr<const Map<ChoiceNameWithPrefix,
{
std::shared_ptr<const ChoiceValue> choice(_imp->id->make_choice_value(
use, UnprefixedChoiceName(stringify(it->first)), it->second.default_value(), false,
- it->second.implicit() ? co_implicit : co_explicit, get_maybe_description(d, it->first), false));
+ it->second.implicit() ? co_implicit : co_explicit, get_maybe_description(d, it->first), false, false));
use->add(choice);
}
@@ -473,7 +474,7 @@ EChoicesKey::populate_iuse(const std::shared_ptr<const Map<ChoiceNameWithPrefix,
}
else
use->add(_imp->id->make_choice_value(use, UnprefixedChoiceName(stringify(flag.first)), flag.second, false, co_implicit,
- get_maybe_description(d, flag.first), false));
+ get_maybe_description(d, flag.first), false, false));
}
}
}
@@ -494,7 +495,7 @@ EChoicesKey::populate_iuse(const std::shared_ptr<const Map<ChoiceNameWithPrefix,
for (Set<UnprefixedChoiceName>::ConstIterator a(_imp->maybe_e_repository->arch_flags()->begin()), a_end(_imp->maybe_e_repository->arch_flags()->end()) ;
a != a_end ; ++a)
- arch->add(_imp->id->make_choice_value(arch, *a, indeterminate, false, co_implicit, "", false));
+ arch->add(_imp->id->make_choice_value(arch, *a, indeterminate, false, co_implicit, "", false, false));
}
if (_imp->id->raw_use_expand_key())
@@ -552,9 +553,9 @@ EChoicesKey::populate_iuse(const std::shared_ptr<const Map<ChoiceNameWithPrefix,
std::map<ChoiceNameWithPrefix, ChoiceOptions>::const_iterator i(i_values.find(ChoiceNameWithPrefix(lower_u + delim + stringify(*v))));
if (i_values.end() != i)
exp->add(_imp->id->make_choice_value(exp, *v, i->second.default_value(), false, i->second.implicit() ? co_implicit : co_explicit,
- get_maybe_description(d, i->first), false));
+ get_maybe_description(d, i->first), false, false));
else
- exp->add(_imp->id->make_choice_value(exp, *v, indeterminate, false, co_implicit, "", false));
+ exp->add(_imp->id->make_choice_value(exp, *v, indeterminate, false, co_implicit, "", false, false));
}
}
}
@@ -570,13 +571,13 @@ EChoicesKey::populate_iuse(const std::shared_ptr<const Map<ChoiceNameWithPrefix,
choice = _imp->value->find_by_name_with_prefix(ELikeOptionalTestsChoiceValue::canonical_name_with_prefix());
if (choice)
use->add(_imp->id->make_choice_value(use, UnprefixedChoiceName(_imp->id->eapi()->supported()->choices_options()->fancy_test_flag()),
- choice->enabled(), true, co_explicit, "", true));
+ choice->enabled(), true, co_explicit, "", true, false));
else
{
std::string name(_imp->id->eapi()->supported()->choices_options()->fancy_test_flag());
choice = _imp->id->make_choice_value(
use, UnprefixedChoiceName(name), indeterminate, true, co_explicit,
- get_maybe_description(d, ChoiceNameWithPrefix(name)), false);
+ get_maybe_description(d, ChoiceNameWithPrefix(name)), false, false);
use->add(choice);
}
}