summaryrefslogtreecommitdiffstats
path: root/meta/classes/native.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/native.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/native.bbclass')
-rw-r--r--meta/classes/native.bbclass12
1 files changed, 6 insertions, 6 deletions
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 () {
98 if not isinstance(e, bb.event.RecipePreFinalise): 98 if not isinstance(e, bb.event.RecipePreFinalise):
99 return 99 return
100 100
101 classextend = bb.data.getVar('BBCLASSEXTEND', e.data, True) or "" 101 classextend = e.data.getVar('BBCLASSEXTEND', True) or ""
102 if "native" not in classextend: 102 if "native" not in classextend:
103 return 103 return
104 104
105 pn = bb.data.getVar("PN", e.data, True) 105 pn = e.data.getVar("PN", True)
106 if not pn.endswith("-native"): 106 if not pn.endswith("-native"):
107 return 107 return
108 108
109 def map_dependencies(varname, d, suffix = ""): 109 def map_dependencies(varname, d, suffix = ""):
110 if suffix: 110 if suffix:
111 varname = varname + "_" + suffix 111 varname = varname + "_" + suffix
112 deps = bb.data.getVar(varname, d, True) 112 deps = d.getVar(varname, True)
113 if not deps: 113 if not deps:
114 return 114 return
115 deps = bb.utils.explode_deps(deps) 115 deps = bb.utils.explode_deps(deps)
@@ -131,15 +131,15 @@ python native_virtclass_handler () {
131 map_dependencies("RPROVIDES", e.data, pkg) 131 map_dependencies("RPROVIDES", e.data, pkg)
132 map_dependencies("RREPLACES", e.data, pkg) 132 map_dependencies("RREPLACES", e.data, pkg)
133 133
134 provides = bb.data.getVar("PROVIDES", e.data, True) 134 provides = e.data.getVar("PROVIDES", True)
135 for prov in provides.split(): 135 for prov in provides.split():
136 if prov.find(pn) != -1: 136 if prov.find(pn) != -1:
137 continue 137 continue
138 if not prov.endswith("-native"): 138 if not prov.endswith("-native"):
139 provides = provides.replace(prov, prov + "-native") 139 provides = provides.replace(prov, prov + "-native")
140 bb.data.setVar("PROVIDES", provides, e.data) 140 e.data.setVar("PROVIDES", provides)
141 141
142 bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", e.data, False) + ":virtclass-native", e.data) 142 bb.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-native", e.data)
143} 143}
144 144
145addhandler native_virtclass_handler 145addhandler native_virtclass_handler