aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-06 18:14:17 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-06 18:14:17 +0000
commit21c2e7184a172f4ce049d99fd5dcee0a77824828 (patch)
treefa62d9b20f10a6c9a8787bfa5bf27a385683bbc6
parent68ff0405aa02cec158ea76f10d017c7bb51fc55f (diff)
downloadpaludis-21c2e7184a172f4ce049d99fd5dcee0a77824828.tar.gz
paludis-21c2e7184a172f4ce049d99fd5dcee0a77824828.tar.xz
Allow * in keywords.conf to accept ebuilds with broken keywords (really really this time. hopefully...)
-rw-r--r--paludis/environment/default/default_environment.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/paludis/environment/default/default_environment.cc b/paludis/environment/default/default_environment.cc
index 342120d..0fe5d04 100644
--- a/paludis/environment/default/default_environment.cc
+++ b/paludis/environment/default/default_environment.cc
@@ -364,6 +364,7 @@ bool
DefaultEnvironment::accept_keyword(const KeywordName & keyword, const PackageDatabaseEntry * const d) const
{
static KeywordName star_keyword(KeywordName("*"));
+ static KeywordName minus_star_keyword(KeywordName("-*"));
if (keyword == star_keyword)
return true;
@@ -373,10 +374,13 @@ DefaultEnvironment::accept_keyword(const KeywordName & keyword, const PackageDat
bool result(false);
- result |= DefaultConfig::get_instance()->end_default_keywords() !=
- std::find(DefaultConfig::get_instance()->begin_default_keywords(),
- DefaultConfig::get_instance()->end_default_keywords(),
- keyword);
+ if (keyword != minus_star_keyword)
+ {
+ result |= DefaultConfig::get_instance()->end_default_keywords() !=
+ std::find(DefaultConfig::get_instance()->begin_default_keywords(),
+ DefaultConfig::get_instance()->end_default_keywords(),
+ keyword);
+ }
result |= DefaultConfig::get_instance()->end_default_keywords() !=
std::find(DefaultConfig::get_instance()->begin_default_keywords(),
@@ -393,7 +397,7 @@ DefaultEnvironment::accept_keyword(const KeywordName & keyword, const PackageDat
if (! match_package(this, k->first, d))
continue;
- if (k->second == star_keyword)
+ if (k->second == minus_star_keyword)
result = false;
else
{
@@ -411,7 +415,7 @@ DefaultEnvironment::accept_keyword(const KeywordName & keyword, const PackageDat
if (! q(*d))
continue;
- if (k->keyword == KeywordName("-*"))
+ if (k->keyword == minus_star_keyword)
result = false;
else
{