config: populate expand map with profile.env
authorZac Medico <zmedico@gentoo.org>
Thu, 5 Apr 2012 19:54:28 +0000 (12:54 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 5 Apr 2012 19:54:28 +0000 (12:54 -0700)
This behavior got disabled by commit
ed8a457e265ea1c23b66aeb12d00f1abd3d79e60, and now it's restored.

pym/portage/package/ebuild/config.py

index 2cd21f3c918b16a78f6d6f8df3ae2d5875f5bfce..38f15c081e0d691424084dac0909db05b6edfbc4 100644 (file)
@@ -313,15 +313,15 @@ class config(object):
                        # Notably absent is "env", since we want to avoid any
                        # interaction with the calling environment that might
                        # lead to unexpected results.
-                       expand_map = {}
+
+                       env_d = getconfig(os.path.join(eroot, "etc", "profile.env"),
+                               expand=False) or {}
+                       expand_map = env_d.copy()
                        self._expand_map = expand_map
 
                        # Allow make.globals to set default paths relative to ${EPREFIX}.
                        expand_map["EPREFIX"] = eprefix
 
-                       env_d = getconfig(os.path.join(eroot, "etc", "profile.env"),
-                               expand=False)
-
                        make_globals = getconfig(os.path.join(
                                self.global_config_path, 'make.globals'), expand=expand_map)
                        if make_globals is None: