aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-27 17:44:26 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-27 17:44:26 +0000
commit0be73fb20a514eaa4c0cb74b650bbda6f78b6bda (patch)
treeed441c56f41e134e5be31d2c9280efedeb31474d
parent9784b1a69caee4cd9d9f59ab00f11b1dbf23780e (diff)
downloadpaludis-0be73fb20a514eaa4c0cb74b650bbda6f78b6bda.tar.gz
paludis-0be73fb20a514eaa4c0cb74b650bbda6f78b6bda.tar.xz
Allow forcing symbols value
-rw-r--r--paludis/elike_choices.cc6
-rw-r--r--paludis/elike_choices.hh3
2 files changed, 5 insertions, 4 deletions
diff --git a/paludis/elike_choices.cc b/paludis/elike_choices.cc
index 14e9705..e012f45 100644
--- a/paludis/elike_choices.cc
+++ b/paludis/elike_choices.cc
@@ -734,9 +734,9 @@ namespace
}
ELikeSymbolsChoiceValue::ELikeSymbolsChoiceValue(const std::shared_ptr<const PackageID> & id,
- const Environment * const env, const std::shared_ptr<const Choice> & choice) :
- _enabled(env->want_choice_enabled(id, choice, canonical_unprefixed_name()).is_true()),
- _param(get_symbols(id, env->value_for_choice_parameter(id, choice, canonical_unprefixed_name())))
+ const Environment * const env, const std::shared_ptr<const Choice> & choice, const ELikeSymbolsChoiceValueParameter _force) :
+ _enabled(! env->want_choice_enabled(id, choice, canonical_unprefixed_name()).is_false()),
+ _param(_force != last_escvp ? _force : get_symbols(id, env->value_for_choice_parameter(id, choice, canonical_unprefixed_name())))
{
}
diff --git a/paludis/elike_choices.hh b/paludis/elike_choices.hh
index 2ed206c..00cad94 100644
--- a/paludis/elike_choices.hh
+++ b/paludis/elike_choices.hh
@@ -254,7 +254,8 @@ namespace paludis
public:
ELikeSymbolsChoiceValue(const std::shared_ptr<const PackageID> &,
- const Environment * const env, const std::shared_ptr<const Choice> &);
+ const Environment * const env, const std::shared_ptr<const Choice> &,
+ const ELikeSymbolsChoiceValueParameter _force);
virtual const UnprefixedChoiceName unprefixed_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const ChoiceNameWithPrefix name_with_prefix() const PALUDIS_ATTRIBUTE((warn_unused_result));