aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-27 15:42:24 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-27 15:42:24 +0000
commit47f5b5eea8d70abe34983f15288fa751a2e26e6c (patch)
treeed72b61ce50581fe6fe30c3e09979dd42680dcdf
parentc21daf2037bd6b4e00094a3a7df4c865d562f0ff (diff)
downloadpaludis-47f5b5eea8d70abe34983f15288fa751a2e26e6c.tar.gz
paludis-47f5b5eea8d70abe34983f15288fa751a2e26e6c.tar.xz
Fix accept_unstable
-rw-r--r--paludis/environments/no_config/no_config_environment.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/paludis/environments/no_config/no_config_environment.cc b/paludis/environments/no_config/no_config_environment.cc
index 131cd98..64c4b32 100644
--- a/paludis/environments/no_config/no_config_environment.cc
+++ b/paludis/environments/no_config/no_config_environment.cc
@@ -280,6 +280,9 @@ NoConfigEnvironment::accept_keywords(std::tr1::shared_ptr<const KeywordNameColle
std::string arch(_imp->main_repo->portage_interface->profile_variable("ARCH"));
if (keywords->end() != keywords->find(KeywordName(arch)))
return true;
+
+ if (_imp->accept_unstable && keywords->end() != keywords->find(KeywordName("~" + arch)))
+ return true;
}
else
{
@@ -289,8 +292,14 @@ NoConfigEnvironment::accept_keywords(std::tr1::shared_ptr<const KeywordNameColle
for (KeywordNameCollection::Iterator k(keywords->begin()), k_end(keywords->end()) ;
k != k_end ; ++k)
+ {
if (accepted.end() != std::find(accepted.begin(), accepted.end(), *k))
return true;
+
+ if (_imp->accept_unstable && stringify(*k).at(0) == '~')
+ if (accepted.end() != std::find(accepted.begin(), accepted.end(), KeywordName(stringify(*k).substr(1))))
+ return true;
+ }
}
return false;