summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-11 23:51:41 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-11 23:51:41 +0000
commitce6d8a6555aa17790f542501f17a8121d12dbe3d (patch)
tree733b070259e604aea7d11e701c9cac587faffa58 /pym
parentc3b4a63aa69d296cab47ca18e58331d3e7852fc1 (diff)
downloadportage-ce6d8a6555aa17790f542501f17a8121d12dbe3d.tar.gz
portage-ce6d8a6555aa17790f542501f17a8121d12dbe3d.tar.bz2
portage-ce6d8a6555aa17790f542501f17a8121d12dbe3d.zip
Make the variable substitution code for bug #221755 slightly more efficient
by allowing getconfig() to directly update the map that's used for substitutions. svn path=/main/trunk/; revision=10296
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py1
-rw-r--r--pym/portage/util.py2
2 files changed, 1 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 13462b97b..5cc66043b 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -1286,7 +1286,6 @@ class config(object):
for x in self.profiles:
var_map = getconfig(os.path.join(x, "make.defaults"),
expand=expand_map)
- expand_map.update(var_map)
mygcfg_dlists.append(var_map)
for cfg in mygcfg_dlists:
diff --git a/pym/portage/util.py b/pym/portage/util.py
index 17c066bc8..61ee3d88d 100644
--- a/pym/portage/util.py
+++ b/pym/portage/util.py
@@ -323,7 +323,7 @@ def getconfig(mycfg, tolerant=0, allow_sourcing=False, expand=True):
if isinstance(expand, dict):
# Some existing variable definitions have been
# passed in, for use in substitutions.
- expand_map = expand.copy()
+ expand_map = expand
expand = True
else:
expand_map = {}