summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-15 18:54:48 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-15 18:54:48 -0700
commitd493a029add855e6ade95d60b57ec7b8f5aba067 (patch)
treea926b844dafa65a78857deb823abbdc729b3696e /pym
parent9f6ad12cbbea42c06b92d08e336ce5c7091a9227 (diff)
downloadportage-d493a029add855e6ade95d60b57ec7b8f5aba067.tar.gz
portage-d493a029add855e6ade95d60b57ec7b8f5aba067.tar.bz2
portage-d493a029add855e6ade95d60b57ec7b8f5aba067.zip
Add support for /etc/portage/make.conf. If present, this file will
override settings from /etc/make.conf.
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/package/ebuild/config.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index cdfbdc28a..d01f7aeab 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -447,6 +447,7 @@ class config(object):
config_root)).rstrip(os.path.sep) + os.path.sep
check_var_directory("PORTAGE_CONFIGROOT", config_root)
+ abs_user_config = os.path.join(config_root, USER_CONFIG_PATH)
self.depcachedir = DEPCACHE_PATH
@@ -619,8 +620,11 @@ class config(object):
make_conf = getconfig(
os.path.join(config_root, MAKE_CONF_FILE),
tolerant=tolerant, allow_sourcing=True)
- if make_conf is None:
- make_conf = {}
+
+ make_conf.update(getconfig(
+ os.path.join(abs_user_config, 'make.conf'),
+ tolerant=tolerant, allow_sourcing=True,
+ expand=make_conf))
# Allow ROOT setting to come from make.conf if it's not overridden
# by the constructor argument (from the calling environment).
@@ -723,8 +727,10 @@ class config(object):
self.mygcfg = getconfig(
os.path.join(config_root, MAKE_CONF_FILE),
tolerant=tolerant, allow_sourcing=True, expand=expand_map)
- if self.mygcfg is None:
- self.mygcfg = {}
+
+ self.mygcfg.update(getconfig(
+ os.path.join(abs_user_config, 'make.conf'),
+ tolerant=tolerant, allow_sourcing=True, expand=expand_map))
# Don't allow the user to override certain variables in make.conf
profile_only_variables = self.configdict["defaults"].get(
@@ -778,7 +784,6 @@ class config(object):
self._plicensedict = portage.dep.ExtendedAtomDict(dict)
self._ppropertiesdict = portage.dep.ExtendedAtomDict(dict)
self.punmaskdict = portage.dep.ExtendedAtomDict(list)
- abs_user_config = os.path.join(config_root, USER_CONFIG_PATH)
# locations for "categories" and "arch.list" files
locations = [os.path.join(self["PORTDIR"], "profiles")]