aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-07-06 22:27:27 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-07-06 22:27:27 +0100
commit9d141ce65f46cc7477f9d6d00521bca8455919cd (patch)
tree3cfc909721ac9583f436917100ee8a34dfeeaaf1
parent3af91940a0b913d12bf8870a6fea989092fc0d10 (diff)
downloadpaludis-9d141ce65f46cc7477f9d6d00521bca8455919cd.tar.gz
paludis-9d141ce65f46cc7477f9d6d00521bca8455919cd.tar.xz
Match Portage behaviour for incrementals
-rw-r--r--paludis/environments/portage/portage_environment.cc25
-rw-r--r--paludis/repositories/e/e_repository_profile.cc7
2 files changed, 3 insertions, 29 deletions
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index 8248c1d..53e2243 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -167,26 +167,13 @@ namespace paludis
namespace
{
- bool is_incremental_excluding_use_expand(const KeyValueConfigFile &, const std::string & s)
+ bool is_incremental(const KeyValueConfigFile &, const std::string & s)
{
return (s == "USE" || s == "USE_EXPAND" || s == "USE_EXPAND_HIDDEN" ||
s == "CONFIG_PROTECT" || s == "CONFIG_PROTECT_MASK" || s == "FEATURES"
|| s == "ACCEPT_KEYWORDS");
}
- bool is_incremental(const KeyValueConfigFile & k, const std::string & s)
- {
- if (is_incremental_excluding_use_expand(k, s))
- return true;
-
- std::set<std::string> use_expand;
- tokenise_whitespace(k.get("USE_EXPAND"), std::inserter(use_expand, use_expand.begin()));
- if (use_expand.end() != use_expand.find(s))
- return true;
-
- return false;
- }
-
std::string predefined(const std::tr1::shared_ptr<const KeyValueConfigFile> & k,
const KeyValueConfigFile &, const std::string & s)
{
@@ -225,14 +212,6 @@ namespace
return make_incremental(k, var, before, value);
}
- std::string do_incremental_excluding_use_expand(
- const KeyValueConfigFile & k, const std::string & var, const std::string & before, const std::string & value)
- {
- if (! is_incremental_excluding_use_expand(k, var))
- return value;
- return make_incremental(k, var, before, value);
- }
-
std::string from_keys(const std::tr1::shared_ptr<const Map<std::string, std::string> > & m,
const std::string & k)
{
@@ -270,7 +249,7 @@ PortageEnvironment::PortageEnvironment(const std::string & s) :
_imp->vars.reset(new KeyValueConfigFile(_imp->conf_dir / "make.conf", KeyValueConfigFileOptions() +
kvcfo_disallow_space_inside_unquoted_values + kvcfo_allow_inline_comments + kvcfo_allow_multiple_assigns_per_line,
std::tr1::bind(&predefined, _imp->vars, std::tr1::placeholders::_1, std::tr1::placeholders::_2),
- &do_incremental_excluding_use_expand));
+ &do_incremental));
/* TODO: load USE etc from env? */
diff --git a/paludis/repositories/e/e_repository_profile.cc b/paludis/repositories/e/e_repository_profile.cc
index 0ceeacd..0cc261e 100644
--- a/paludis/repositories/e/e_repository_profile.cc
+++ b/paludis/repositories/e/e_repository_profile.cc
@@ -550,8 +550,6 @@ Implementation<ERepositoryProfile>::is_incremental(const EAPI & e, const std::st
{
Context c("When checking whether '" + s + "' is incremental:");
- std::string uevp_var(e.supported()->ebuild_environment_variables()->env_use_expand_values_part());
-
return (! s.empty()) && (
(s == e.supported()->ebuild_environment_variables()->env_use())
|| (s == e.supported()->ebuild_environment_variables()->env_use_expand())
@@ -560,10 +558,7 @@ Implementation<ERepositoryProfile>::is_incremental(const EAPI & e, const std::st
|| (s == e.supported()->ebuild_environment_variables()->env_use_expand_implicit())
|| (s == e.supported()->ebuild_environment_variables()->env_iuse_implicit())
|| s == "CONFIG_PROTECT"
- || s == "CONFIG_PROTECT_MASK"
- || use_expand->end() != use_expand->find(s)
- || ((! uevp_var.empty()) && (s.length() > uevp_var.length()) && (0 == s.compare(0, uevp_var.length(), s)) &&
- use_expand_implicit->end() != use_expand_implicit->find(s.substr(uevp_var.length() + 1))));
+ || s == "CONFIG_PROTECT_MASK");
}
void