mirror of
https://git.yoctoproject.org/poky
synced 2026-04-05 08:02:25 +02:00
base.bbclass: use d instead on e.data
According to the bitbake documentation, the "d" global datastore should be used instead of "e.data" because the latter is deprecated. (From OE-Core rev: 43820fe158cbc34c9fd67e84238931331153f127) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
5b93ab596a
commit
0877fb2fd3
@@ -225,12 +225,12 @@ python base_eventhandler() {
|
||||
import bb.runqueue
|
||||
|
||||
if isinstance(e, bb.event.ConfigParsed):
|
||||
if not e.data.getVar("NATIVELSBSTRING", False):
|
||||
e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data))
|
||||
e.data.setVar('BB_VERSION', bb.__version__)
|
||||
pkgarch_mapping(e.data)
|
||||
oe.utils.features_backfill("DISTRO_FEATURES", e.data)
|
||||
oe.utils.features_backfill("MACHINE_FEATURES", e.data)
|
||||
if not d.getVar("NATIVELSBSTRING", False):
|
||||
d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d))
|
||||
d.setVar('BB_VERSION', bb.__version__)
|
||||
pkgarch_mapping(d)
|
||||
oe.utils.features_backfill("DISTRO_FEATURES", d)
|
||||
oe.utils.features_backfill("MACHINE_FEATURES", d)
|
||||
# Works with the line in layer.conf which changes PATH to point here
|
||||
setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS', d)
|
||||
setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS_NONFATAL', d, fatal=False)
|
||||
@@ -246,7 +246,7 @@ python base_eventhandler() {
|
||||
e.mcdata[''].setVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS", deps)
|
||||
|
||||
if isinstance(e, bb.event.BuildStarted):
|
||||
localdata = bb.data.createCopy(e.data)
|
||||
localdata = bb.data.createCopy(d)
|
||||
statuslines = []
|
||||
for func in oe.data.typed_value('BUILDCFG_FUNCS', localdata):
|
||||
g = globals()
|
||||
@@ -257,7 +257,7 @@ python base_eventhandler() {
|
||||
if flines:
|
||||
statuslines.extend(flines)
|
||||
|
||||
statusheader = e.data.getVar('BUILDCFG_HEADER')
|
||||
statusheader = d.getVar('BUILDCFG_HEADER')
|
||||
if statusheader:
|
||||
bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines)))
|
||||
|
||||
@@ -265,23 +265,23 @@ python base_eventhandler() {
|
||||
# target ones and we'd see dulpicate key names overwriting each other
|
||||
# for various PREFERRED_PROVIDERS
|
||||
if isinstance(e, bb.event.RecipePreFinalise):
|
||||
if e.data.getVar("TARGET_PREFIX") == e.data.getVar("SDK_PREFIX"):
|
||||
e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils")
|
||||
e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial")
|
||||
e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc")
|
||||
e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++")
|
||||
e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs")
|
||||
if d.getVar("TARGET_PREFIX") == d.getVar("SDK_PREFIX"):
|
||||
d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils")
|
||||
d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial")
|
||||
d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc")
|
||||
d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++")
|
||||
d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs")
|
||||
|
||||
if isinstance(e, bb.runqueue.sceneQueueComplete):
|
||||
completions = e.data.expand("${STAGING_DIR}/sstatecompletions")
|
||||
completions = d.expand("${STAGING_DIR}/sstatecompletions")
|
||||
if os.path.exists(completions):
|
||||
cmds = set()
|
||||
with open(completions, "r") as f:
|
||||
cmds = set(f)
|
||||
e.data.setVar("completion_function", "\n".join(cmds))
|
||||
e.data.setVarFlag("completion_function", "func", "1")
|
||||
d.setVar("completion_function", "\n".join(cmds))
|
||||
d.setVarFlag("completion_function", "func", "1")
|
||||
bb.debug(1, "Executing SceneQueue Completion commands: %s" % "\n".join(cmds))
|
||||
bb.build.exec_func("completion_function", e.data)
|
||||
bb.build.exec_func("completion_function", d)
|
||||
os.remove(completions)
|
||||
|
||||
if isinstance(e, bb.event.RecipeParsed):
|
||||
|
||||
Reference in New Issue
Block a user