diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-11-25 18:56:54 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-11-25 18:57:18 -0800 |
commit | 917e70d1009727115afbe90e297711d54b7e5374 (patch) | |
tree | 1e896a5d64ff534771e93dc485ac4f567a120a8b | |
parent | 1d4ac47c28706094230cb2c4e6ee1c1c71629aa0 (diff) | |
download | portage-917e70d1009727115afbe90e297711d54b7e5374.tar.gz portage-917e70d1009727115afbe90e297711d54b7e5374.tar.bz2 portage-917e70d1009727115afbe90e297711d54b7e5374.zip |
config: fix make.defaults inherit of make.globalsv2.2.0_alpha78
Since commit e544ee13527a0568de2b556510280ed96fc1b3ff, make.defaults
inheritance of variables from make.globals has been broke, since that
commit excluded make.globals from expand_map. This broke settings like
PORTAGE_ELOG_CLASSES="${PORTAGE_ELOG_CLASSES} qa" from the developer
profile, as reported in bug #391323, comment #4.
-rw-r--r-- | pym/portage/package/ebuild/config.py | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 835cd2385..2995740bc 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -297,7 +297,29 @@ class config(object): eroot = locations_manager.eroot self.global_config_path = locations_manager.global_config_path - make_globals = getconfig(os.path.join(self.global_config_path, 'make.globals')) + # The expand_map is used for variable substitution + # in getconfig() calls, and the getconfig() calls + # update expand_map with the value of each variable + # assignment that occurs. Variable substitution occurs + # in the following order, which corresponds to the + # order of appearance in self.lookuplist: + # + # * env.d + # * make.globals + # * make.defaults + # * make.conf + # + # Notably absent is "env", since we want to avoid any + # interaction with the calling environment that might + # lead to unexpected results. + expand_map = {} + self._expand_map = expand_map + + env_d = getconfig(os.path.join(eroot, "etc", "profile.env"), + expand=expand_map) + + make_globals = getconfig(os.path.join( + self.global_config_path, 'make.globals'), expand=expand_map) if make_globals is None: make_globals = {} @@ -345,30 +367,9 @@ class config(object): self.configlist.append({}) self.configdict["pkginternal"] = self.configlist[-1] - # The expand_map is used for variable substitution - # in getconfig() calls, and the getconfig() calls - # update expand_map with the value of each variable - # assignment that occurs. Variable substitution occurs - # in the following order, which corresponds to the - # order of appearance in self.lookuplist: - # - # * env.d - # * make.globals - # * make.defaults - # * make.conf - # - # Notably absent is "env", since we want to avoid any - # interaction with the calling environment that might - # lead to unexpected results. - expand_map = {} - self._expand_map = expand_map - - env_d = getconfig(os.path.join(eroot, "etc", "profile.env"), - expand=expand_map) # env_d will be None if profile.env doesn't exist. if env_d: self.configdict["env.d"].update(env_d) - expand_map.update(env_d) # backupenv is used for calculating incremental variables. if env is None: |