aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Michał Górny <mgorny@gentoo.org> 2011-06-21 19:37:59 +0200
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-21 20:37:18 +0100
commit029999d6b31dce81b5ea73b5266dd7ed9cd282a3 (patch)
treea6741b645ccaef9af066d68586e974f4fc7af620
parent222a464fd7f6b0ba611fc87420804778630e9ac6 (diff)
downloadpaludis-029999d6b31dce81b5ea73b5266dd7ed9cd282a3.tar.gz
paludis-029999d6b31dce81b5ea73b5266dd7ed9cd282a3.tar.xz
Support loading config from /etc/portage/make.conf as well.
-rw-r--r--paludis/environments/portage/portage_environment.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index eed7857..d4c03f0 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -252,6 +252,11 @@ PortageEnvironment::PortageEnvironment(const std::string & s) :
kvcfo_disallow_space_inside_unquoted_values + kvcfo_allow_inline_comments + kvcfo_allow_multiple_assigns_per_line,
std::bind(&predefined, _imp->vars, std::placeholders::_1, std::placeholders::_2),
&do_incremental);
+ if ((_imp->conf_dir / "portage" / "make.conf").stat().exists())
+ _imp->vars = std::make_shared<KeyValueConfigFile>(_imp->conf_dir / "portage" / "make.conf", KeyValueConfigFileOptions() +
+ kvcfo_disallow_space_inside_unquoted_values + kvcfo_allow_inline_comments + kvcfo_allow_multiple_assigns_per_line,
+ std::bind(&predefined, _imp->vars, std::placeholders::_1, std::placeholders::_2),
+ &do_incremental);
{
std::string fixed_root_var(_imp->vars->get("ROOT"));
@@ -705,6 +710,7 @@ PortageEnvironment::bashrc_files() const
result->push_back(FSPath(LIBEXECDIR) / "paludis" / "environments" / "portage" / "bashrc");
result->push_back(_imp->conf_dir / "make.globals");
result->push_back(_imp->conf_dir / "make.conf");
+ result->push_back(_imp->conf_dir / "portage" / "make.conf");
return result;
}