bitbake: BBHandler/data: Standardise some setVar access formats
(Bitbake rev: e12c1a485f96a4701144ac81179ae1af348e5bf3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
3db277b18b
commit
9753283a3f
|
@ -158,7 +158,7 @@ def expandKeys(alterdata, readdata = None):
|
||||||
|
|
||||||
for key in todolist:
|
for key in todolist:
|
||||||
ekey = todolist[key]
|
ekey = todolist[key]
|
||||||
renameVar(key, ekey, alterdata)
|
alterdata.renameVar(key, ekey)
|
||||||
|
|
||||||
def inheritFromOS(d, savedenv, permitted):
|
def inheritFromOS(d, savedenv, permitted):
|
||||||
"""Inherit variables from the initial environment."""
|
"""Inherit variables from the initial environment."""
|
||||||
|
@ -166,9 +166,9 @@ def inheritFromOS(d, savedenv, permitted):
|
||||||
for s in savedenv.keys():
|
for s in savedenv.keys():
|
||||||
if s in permitted:
|
if s in permitted:
|
||||||
try:
|
try:
|
||||||
setVar(s, getVar(s, savedenv, True), d)
|
d.setVar(s, getVar(s, savedenv, True))
|
||||||
if s in exportlist:
|
if s in exportlist:
|
||||||
setVarFlag(s, "export", True, d)
|
d.setVarFlag(s, "export", True)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ def inherit(files, fn, lineno, d):
|
||||||
if not file in __inherit_cache:
|
if not file in __inherit_cache:
|
||||||
logger.log(logging.DEBUG -1, "BB %s:%d: inheriting %s", fn, lineno, file)
|
logger.log(logging.DEBUG -1, "BB %s:%d: inheriting %s", fn, lineno, file)
|
||||||
__inherit_cache.append( file )
|
__inherit_cache.append( file )
|
||||||
data.setVar('__inherit_cache', __inherit_cache, d)
|
d.setVar('__inherit_cache', __inherit_cache)
|
||||||
include(fn, file, lineno, d, "inherit")
|
include(fn, file, lineno, d, "inherit")
|
||||||
__inherit_cache = d.getVar('__inherit_cache') or []
|
__inherit_cache = d.getVar('__inherit_cache') or []
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ def handle(fn, d, include):
|
||||||
__inherit_cache = d.getVar('__inherit_cache') or []
|
__inherit_cache = d.getVar('__inherit_cache') or []
|
||||||
if not fn in __inherit_cache:
|
if not fn in __inherit_cache:
|
||||||
__inherit_cache.append(fn)
|
__inherit_cache.append(fn)
|
||||||
data.setVar('__inherit_cache', __inherit_cache, d)
|
d.setVar('__inherit_cache', __inherit_cache)
|
||||||
|
|
||||||
if include != 0:
|
if include != 0:
|
||||||
oldfile = d.getVar('FILE')
|
oldfile = d.getVar('FILE')
|
||||||
|
@ -151,7 +151,7 @@ def handle(fn, d, include):
|
||||||
|
|
||||||
# DONE WITH PARSING... time to evaluate
|
# DONE WITH PARSING... time to evaluate
|
||||||
if ext != ".bbclass":
|
if ext != ".bbclass":
|
||||||
data.setVar('FILE', abs_fn, d)
|
d.setVar('FILE', abs_fn)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
statements.eval(d)
|
statements.eval(d)
|
||||||
|
|
Loading…
Reference in New Issue