diff options
author | Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> | 2017-07-05 09:02:11 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-11-08 19:54:22 +0000 |
commit | 43820fe158cbc34c9fd67e84238931331153f127 (patch) | |
tree | 9cb5657a154d71d157120d45fd9056a3068bbdeb /meta/classes/base.bbclass | |
parent | 883bfc2bbb4d2120dbad6b0f2056503b012b1a2b (diff) | |
download | openembedded-core-contrib-43820fe158cbc34c9fd67e84238931331153f127.tar.gz |
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.
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r-- | meta/classes/base.bbclass | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 8c8697761c7..f6b63fa8dcf 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -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): |