diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2006-11-10 13:53:10 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2006-11-10 13:53:10 +0000 |
commit | ab37bc79f591e9e650b77f140fa4d9a4a2e744d4 (patch) | |
tree | 2d1e9a68dc7b78568ada2fda154c486ad906f5b1 /lib/bb/data.py | |
parent | e4f50150c041f490ae80dedb96232e157f1978eb (diff) | |
download | bitbake-contrib-ab37bc79f591e9e650b77f140fa4d9a4a2e744d4.tar.gz |
data.py: Fix emit_env() to expand keynames as well as values
Diffstat (limited to 'lib/bb/data.py')
-rw-r--r-- | lib/bb/data.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py index 4785a4798..819dff967 100644 --- a/lib/bb/data.py +++ b/lib/bb/data.py @@ -363,10 +363,12 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False): val.rstrip() if not val: return 0 + + varExpanded = expand(var, d) if getVarFlag(var, "func", d): # NOTE: should probably check for unbalanced {} within the var - o.write("%s() {\n%s\n}\n" % (var, val)) + o.write("%s() {\n%s\n}\n" % (varExpanded, val)) else: if getVarFlag(var, "export", d): o.write('export ') @@ -376,7 +378,7 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False): # if we're going to output this within doublequotes, # to a shell, we need to escape the quotes in the var alter = re.sub('"', '\\"', val.strip()) - o.write('%s="%s"\n' % (var, alter)) + o.write('%s="%s"\n' % (varExpanded, alter)) return 1 |