diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-05-11 23:24:08 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-05-11 23:24:08 +0000 |
commit | 9513888e4dfdcb5cb2892f8490ec93f6e2518b65 (patch) | |
tree | 8b23dfd447078acb9f9cee55242de0c9a69e6b33 /pym/portage_util.py | |
parent | f104c9f8ac201ce5276b6193a702a26e00437698 (diff) | |
download | portage-9513888e4dfdcb5cb2892f8490ec93f6e2518b65.tar.gz portage-9513888e4dfdcb5cb2892f8490ec93f6e2518b65.tar.bz2 portage-9513888e4dfdcb5cb2892f8490ec93f6e2518b65.zip |
Bug #221755 - Enable variable substitution in make.defaults to work accross
multiple files instead of being confined to a single file. This allows
profiles to create incremental-like behavior with non-incremental variables
when desired. (trunk r10293)
svn path=/main/branches/2.1.2/; revision=10294
Diffstat (limited to 'pym/portage_util.py')
-rw-r--r-- | pym/portage_util.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/portage_util.py b/pym/portage_util.py index eb54076d4..e75e0cb15 100644 --- a/pym/portage_util.py +++ b/pym/portage_util.py @@ -306,7 +306,13 @@ class _tolerant_shlex(shlex.shlex): return (newfile, StringIO.StringIO()) def getconfig(mycfg, tolerant=0, allow_sourcing=False, expand=True): - mykeys={} + if isinstance(expand, dict): + # Some existing variable definitions have been + # passed in, for use in substitutions. + mykeys = expand.copy() + expand = True + else: + mykeys = {} try: f=open(mycfg,'r') except IOError, e: |