From 9513888e4dfdcb5cb2892f8490ec93f6e2518b65 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 11 May 2008 23:24:08 +0000 Subject: 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 --- pym/portage_util.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pym/portage_util.py') 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: -- cgit v1.2.3-1-g7c22