aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-06 17:54:45 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-06 17:54:45 +0000
commit68ff0405aa02cec158ea76f10d017c7bb51fc55f (patch)
treeefd6c82350a83442021b4c864ec12f2b84545bee
parent31cf2708ffa8030a689ad9e5aa821267f9941dd6 (diff)
downloadpaludis-68ff0405aa02cec158ea76f10d017c7bb51fc55f.tar.gz
paludis-68ff0405aa02cec158ea76f10d017c7bb51fc55f.tar.xz
Allow * in keywords.conf to accept ebuilds with broken keywords (really this time. hopefully...)
-rw-r--r--paludis/environment/default/default_environment.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/paludis/environment/default/default_environment.cc b/paludis/environment/default/default_environment.cc
index a0679e0..342120d 100644
--- a/paludis/environment/default/default_environment.cc
+++ b/paludis/environment/default/default_environment.cc
@@ -363,10 +363,10 @@ DefaultEnvironment::query_use(const UseFlagName & f, const PackageDatabaseEntry
bool
DefaultEnvironment::accept_keyword(const KeywordName & keyword, const PackageDatabaseEntry * const d) const
{
- if (keyword == KeywordName("*"))
+ static KeywordName star_keyword(KeywordName("*"));
+
+ if (keyword == star_keyword)
return true;
- if (keyword == KeywordName("-*"))
- return false;
Context context("When checking accept_keyword of '" + stringify(keyword) +
(d ? "' for " + stringify(*d) : stringify("'")) + ":");
@@ -381,7 +381,7 @@ DefaultEnvironment::accept_keyword(const KeywordName & keyword, const PackageDat
result |= DefaultConfig::get_instance()->end_default_keywords() !=
std::find(DefaultConfig::get_instance()->begin_default_keywords(),
DefaultConfig::get_instance()->end_default_keywords(),
- KeywordName("*"));
+ star_keyword);
if (d)
{
@@ -393,12 +393,12 @@ DefaultEnvironment::accept_keyword(const KeywordName & keyword, const PackageDat
if (! match_package(this, k->first, d))
continue;
- if (k->second == KeywordName("-*"))
+ if (k->second == star_keyword)
result = false;
else
{
result |= k->second == keyword;
- result |= k->second == KeywordName("*");
+ result |= k->second == star_keyword;
}
}
@@ -416,7 +416,7 @@ DefaultEnvironment::accept_keyword(const KeywordName & keyword, const PackageDat
else
{
result |= k->keyword == keyword;
- result |= k->keyword == KeywordName("*");
+ result |= k->keyword == star_keyword;
}
}
}