aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-11-07 21:46:10 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-11-07 21:46:10 +0000
commitad5e8bbe4ebc5c5d7bb094caa0590b86d6c0603c (patch)
tree1244c6a30a121fad52f8f9771ee406779c2b35f5
parent2366036ad5da4e31aa706e8f8a70a232b517e9e3 (diff)
downloadpaludis-ad5e8bbe4ebc5c5d7bb094caa0590b86d6c0603c.tar.gz
paludis-ad5e8bbe4ebc5c5d7bb094caa0590b86d6c0603c.tar.xz
Pick up the test flag from the VDB for installed packages.
-rw-r--r--paludis/repositories/e/e_key.cc18
1 files changed, 13 insertions, 5 deletions
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc
index 4064aab..7f01a9e 100644
--- a/paludis/repositories/e/e_key.cc
+++ b/paludis/repositories/e/e_key.cc
@@ -1049,6 +1049,7 @@ EChoicesKey::value() const
_imp->value->add(use);
bool has_fancy_test_flag(false);
+ std::tr1::shared_ptr<const ChoiceValue> unfancy_test_choice;
std::tr1::shared_ptr<const Set<std::string> > hidden;
if (_imp->id->raw_use_expand_hidden_key())
@@ -1122,13 +1123,18 @@ EChoicesKey::value() const
_imp->id->raw_use_expand_key()->value()->end(),
IsExpand(flag.first, delim)))
i_values.insert(flag);
- else if (stringify(flag.first) == _imp->id->eapi()->supported()->choices_options()->fancy_test_flag())
+ else
{
- /* have to add this right at the end, after build_options is there */
- has_fancy_test_flag = true;
+ std::tr1::shared_ptr<const ChoiceValue> choice(_imp->id->make_choice_value(use, UnprefixedChoiceName(stringify(flag.first)), flag.second, true, "", false));
+ if (stringify(flag.first) == _imp->id->eapi()->supported()->choices_options()->fancy_test_flag())
+ {
+ /* have to add this right at the end, after build_options is there */
+ has_fancy_test_flag = true;
+ unfancy_test_choice = choice;
+ }
+ else
+ use->add(choice);
}
- else
- use->add(_imp->id->make_choice_value(use, UnprefixedChoiceName(stringify(flag.first)), flag.second, true, "", false));
}
/* pain in the ass: installed packages with DEPEND="x86? ( blah )" need to work,
@@ -1241,6 +1247,8 @@ EChoicesKey::value() const
if (choice)
use->add(_imp->id->make_choice_value(use, UnprefixedChoiceName(_imp->id->eapi()->supported()->choices_options()->fancy_test_flag()),
choice->enabled(), true, "", true));
+ else if (unfancy_test_choice)
+ use->add(unfancy_test_choice);
}
return _imp->value;