diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-09 15:00:01 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-10 11:35:32 +0000 |
commit | b22831fd63164c4db9c0b72934d7d734a6585251 (patch) | |
tree | edb6581a041190290855bf86714430515c9f235a /meta/classes/nativesdk.bbclass | |
parent | 07ded02ffd37b4fe60a6210dbf56490ea306f0b6 (diff) | |
download | openembedded-core-b22831fd63164c4db9c0b72934d7d734a6585251.tar.gz openembedded-core-b22831fd63164c4db9c0b72934d7d734a6585251.tar.bz2 openembedded-core-b22831fd63164c4db9c0b72934d7d734a6585251.zip |
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/nativesdk.bbclass')
-rw-r--r-- | meta/classes/nativesdk.bbclass | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass index bb59ac57a6..ca24efaa7c 100644 --- a/meta/classes/nativesdk.bbclass +++ b/meta/classes/nativesdk.bbclass @@ -11,7 +11,7 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S # PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" python () { - archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() + archs = d.getVar('PACKAGE_ARCHS', True).split() sdkarchs = [] for arch in archs: sdkarchs.append(arch + '-nativesdk') @@ -62,22 +62,22 @@ python nativesdk_virtclass_handler () { if not isinstance(e, bb.event.RecipePreFinalise): return - pn = bb.data.getVar("PN", e.data, True) + pn = e.data.getVar("PN", True) if not pn.endswith("-nativesdk"): return - bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", e.data, False) + ":virtclass-nativesdk", e.data) + bb.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-nativesdk", e.data) } python () { - pn = bb.data.getVar("PN", d, True) + pn = d.getVar("PN", True) if not pn.endswith("-nativesdk"): return def map_dependencies(varname, d, suffix = ""): if suffix: varname = varname + "_" + suffix - deps = bb.data.getVar(varname, d, True) + deps = d.getVar(varname, True) if not deps: return deps = bb.utils.explode_deps(deps) @@ -101,13 +101,13 @@ python () { # map_dependencies("RPROVIDES", d, pkg) # map_dependencies("RREPLACES", d, pkg) - provides = bb.data.getVar("PROVIDES", d, True) + provides = d.getVar("PROVIDES", True) for prov in provides.split(): if prov.find(pn) != -1: continue if not prov.endswith("-nativesdk"): provides = provides.replace(prov, prov + "-nativesdk") - bb.data.setVar("PROVIDES", provides, d) + d.setVar("PROVIDES", provides) } addhandler nativesdk_virtclass_handler |