mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
bitbake/lib/bb/data.py: Add unexport flag for variables, add speedup for expandKeys
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@956 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -271,6 +271,9 @@ def expandKeys(alterdata, readdata = None):
|
|||||||
readdata = alterdata
|
readdata = alterdata
|
||||||
|
|
||||||
for key in keys(alterdata):
|
for key in keys(alterdata):
|
||||||
|
if not '${' in key:
|
||||||
|
continue
|
||||||
|
|
||||||
ekey = expand(key, readdata)
|
ekey = expand(key, readdata)
|
||||||
if key == ekey:
|
if key == ekey:
|
||||||
continue
|
continue
|
||||||
@@ -370,6 +373,9 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
|
|||||||
# NOTE: should probably check for unbalanced {} within the var
|
# NOTE: should probably check for unbalanced {} within the var
|
||||||
o.write("%s() {\n%s\n}\n" % (varExpanded, val))
|
o.write("%s() {\n%s\n}\n" % (varExpanded, val))
|
||||||
else:
|
else:
|
||||||
|
if getVarFlag(var, "unexport", d):
|
||||||
|
o.write('unset %s\n' % varExpanded)
|
||||||
|
return 1
|
||||||
if getVarFlag(var, "export", d):
|
if getVarFlag(var, "export", d):
|
||||||
o.write('export ')
|
o.write('export ')
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user