From b22831fd63164c4db9c0b72934d7d734a6585251 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 9 Nov 2011 15:00:01 +0000 Subject: 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 --- meta/classes/native.bbclass | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'meta/classes/native.bbclass') diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass index ba8b0bf25e..5f25bdd2c2 100644 --- a/meta/classes/native.bbclass +++ b/meta/classes/native.bbclass @@ -98,18 +98,18 @@ python native_virtclass_handler () { if not isinstance(e, bb.event.RecipePreFinalise): return - classextend = bb.data.getVar('BBCLASSEXTEND', e.data, True) or "" + classextend = e.data.getVar('BBCLASSEXTEND', True) or "" if "native" not in classextend: return - pn = bb.data.getVar("PN", e.data, True) + pn = e.data.getVar("PN", True) if not pn.endswith("-native"): 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) @@ -131,15 +131,15 @@ python native_virtclass_handler () { map_dependencies("RPROVIDES", e.data, pkg) map_dependencies("RREPLACES", e.data, pkg) - provides = bb.data.getVar("PROVIDES", e.data, True) + provides = e.data.getVar("PROVIDES", True) for prov in provides.split(): if prov.find(pn) != -1: continue if not prov.endswith("-native"): provides = provides.replace(prov, prov + "-native") - bb.data.setVar("PROVIDES", provides, e.data) + e.data.setVar("PROVIDES", provides) - bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", e.data, False) + ":virtclass-native", e.data) + bb.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-native", e.data) } addhandler native_virtclass_handler -- cgit v1.2.3