From ce6d8a6555aa17790f542501f17a8121d12dbe3d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 11 May 2008 23:51:41 +0000 Subject: 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 --- pym/portage/__init__.py | 1 - pym/portage/util.py | 2 +- 2 files changed, 1 insertion(+), 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 = {} -- cgit v1.2.3-1-g7c22