summaryrefslogtreecommitdiffstats
path: root/meta/classes/nativesdk.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-09 15:00:01 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-10 11:51:19 +0000
commitc8dee9b92dfd545852ecac8dc2adfc95ac02e957 (patch)
tree5f1b86954646a0f3bb914407994388a6a4346769 /meta/classes/nativesdk.bbclass
parent5d3860f4a8abb8e95442b04f8b84a333af362fcd (diff)
downloadpoky-c8dee9b92dfd545852ecac8dc2adfc95ac02e957.tar.gz
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 *` (From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/nativesdk.bbclass')
-rw-r--r--meta/classes/nativesdk.bbclass14
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
11# 11#
12PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" 12PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
13python () { 13python () {
14 archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() 14 archs = d.getVar('PACKAGE_ARCHS', True).split()
15 sdkarchs = [] 15 sdkarchs = []
16 for arch in archs: 16 for arch in archs:
17 sdkarchs.append(arch + '-nativesdk') 17 sdkarchs.append(arch + '-nativesdk')
@@ -62,22 +62,22 @@ python nativesdk_virtclass_handler () {
62 if not isinstance(e, bb.event.RecipePreFinalise): 62 if not isinstance(e, bb.event.RecipePreFinalise):
63 return 63 return
64 64
65 pn = bb.data.getVar("PN", e.data, True) 65 pn = e.data.getVar("PN", True)
66 if not pn.endswith("-nativesdk"): 66 if not pn.endswith("-nativesdk"):
67 return 67 return
68 68
69 bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", e.data, False) + ":virtclass-nativesdk", e.data) 69 bb.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-nativesdk", e.data)
70} 70}
71 71
72python () { 72python () {
73 pn = bb.data.getVar("PN", d, True) 73 pn = d.getVar("PN", True)
74 if not pn.endswith("-nativesdk"): 74 if not pn.endswith("-nativesdk"):
75 return 75 return
76 76
77 def map_dependencies(varname, d, suffix = ""): 77 def map_dependencies(varname, d, suffix = ""):
78 if suffix: 78 if suffix:
79 varname = varname + "_" + suffix 79 varname = varname + "_" + suffix
80 deps = bb.data.getVar(varname, d, True) 80 deps = d.getVar(varname, True)
81 if not deps: 81 if not deps:
82 return 82 return
83 deps = bb.utils.explode_deps(deps) 83 deps = bb.utils.explode_deps(deps)
@@ -101,13 +101,13 @@ python () {
101 # map_dependencies("RPROVIDES", d, pkg) 101 # map_dependencies("RPROVIDES", d, pkg)
102 # map_dependencies("RREPLACES", d, pkg) 102 # map_dependencies("RREPLACES", d, pkg)
103 103
104 provides = bb.data.getVar("PROVIDES", d, True) 104 provides = d.getVar("PROVIDES", True)
105 for prov in provides.split(): 105 for prov in provides.split():
106 if prov.find(pn) != -1: 106 if prov.find(pn) != -1:
107 continue 107 continue
108 if not prov.endswith("-nativesdk"): 108 if not prov.endswith("-nativesdk"):
109 provides = provides.replace(prov, prov + "-nativesdk") 109 provides = provides.replace(prov, prov + "-nativesdk")
110 bb.data.setVar("PROVIDES", provides, d) 110 d.setVar("PROVIDES", provides)
111} 111}
112 112
113addhandler nativesdk_virtclass_handler 113addhandler nativesdk_virtclass_handler