diff options
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage.py | 9 | ||||
-rw-r--r-- | pym/portage_util.py | 8 |
2 files changed, 8 insertions, 9 deletions
diff --git a/pym/portage.py b/pym/portage.py index a48f23e3d..3947db8cd 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1440,12 +1440,9 @@ class config: self.make_defaults_use = [] self.mygcfg = {} if self.profiles: - mygcfg_dlists = [] - var_map = {} - for x in self.profiles: - var_map = getconfig(os.path.join(x, "make.defaults"), - expand=var_map) - mygcfg_dlists.append(var_map) + expand_map = {} + mygcfg_dlists = [getconfig(os.path.join(x, "make.defaults"), + expand=expand_map) for x in self.profiles] for cfg in mygcfg_dlists: if cfg: diff --git a/pym/portage_util.py b/pym/portage_util.py index e75e0cb15..b9fc90354 100644 --- a/pym/portage_util.py +++ b/pym/portage_util.py @@ -309,10 +309,11 @@ 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. - mykeys = expand.copy() + expand_map = expand expand = True else: - mykeys = {} + expand_map = {} + mykeys = {} try: f=open(mycfg,'r') except IOError, e: @@ -371,7 +372,8 @@ def getconfig(mycfg, tolerant=0, allow_sourcing=False, expand=True): else: return mykeys if expand: - mykeys[key] = varexpand(val, mykeys) + mykeys[key] = varexpand(val, expand_map) + expand_map[key] = mykeys[key] else: mykeys[key] = val except SystemExit, e: |