summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-09-24 16:25:37 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-27 09:44:54 +0100
commitea220105609de30498f4ba72f5aeec180de4be2f (patch)
tree0a0e16e1d0fd6c03fe8ed2af964e24ab0c3e1a0c /meta/classes/base.bbclass
parent511f7f9d0422fe1a896361b53179c9f642c1fc0b (diff)
downloadpoky-ea220105609de30498f4ba72f5aeec180de4be2f.tar.gz
multilib: Add support for cross-canadian multilib packages
Add support for the generation of cross-canadian packages. Each cross-canadian package has: PN = "pkg-cross-canadian-${TRANSLATED_TARGET_ARCH}" in order for that to be evaluated properly with multilibs enabled, it was necessary to detect both the presence of the cross-canadian packages and then update the vars using the OVERRIDE for the multilib. Additional checks were made to ensure that any dependency that sais "cross-canadian" did not get prefixed with the MLPREFIX. Also, make sure that even when building multilib cross-canadian packages, we only use the single SDK PACKAGE_ARCH, we don't want or need variants. (From OE-Core rev: 132a182e2f6c330aa645de42c1aeb386e43bddd3) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass39
1 files changed, 37 insertions, 2 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index f254306d3b..12a30c953c 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -183,6 +183,8 @@ def preferred_ml_updates(d):
183 providers.append(v) 183 providers.append(v)
184 184
185 for pkg, reason in blacklists.items(): 185 for pkg, reason in blacklists.items():
186 if pkg.endswith("-native") or pkg.startswith("nativesdk-") or 'cross-canadian' in pkg:
187 continue
186 for p in prefixes: 188 for p in prefixes:
187 newpkg = p + "-" + pkg 189 newpkg = p + "-" + pkg
188 if not d.getVarFlag('PNBLACKLIST', newpkg, True): 190 if not d.getVarFlag('PNBLACKLIST', newpkg, True):
@@ -193,6 +195,17 @@ def preferred_ml_updates(d):
193 pkg = v.replace("PREFERRED_VERSION_", "") 195 pkg = v.replace("PREFERRED_VERSION_", "")
194 if pkg.endswith("-native") or pkg.startswith("nativesdk-"): 196 if pkg.endswith("-native") or pkg.startswith("nativesdk-"):
195 continue 197 continue
198 if 'cross-canadian' in pkg:
199 for p in prefixes:
200 localdata = bb.data.createCopy(d)
201 override = ":virtclass-multilib-" + p
202 localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
203 bb.data.update_data(localdata)
204 newname = localdata.expand(v)
205 if newname != v:
206 newval = localdata.getVar(v, True)
207 d.setVar(newname, newval)
208 continue
196 for p in prefixes: 209 for p in prefixes:
197 newname = "PREFERRED_VERSION_" + p + "-" + pkg 210 newname = "PREFERRED_VERSION_" + p + "-" + pkg
198 if not d.getVar(newname, False): 211 if not d.getVar(newname, False):
@@ -203,14 +216,36 @@ def preferred_ml_updates(d):
203 pkg = prov.replace("PREFERRED_PROVIDER_", "") 216 pkg = prov.replace("PREFERRED_PROVIDER_", "")
204 if pkg.endswith("-native") or pkg.startswith("nativesdk-"): 217 if pkg.endswith("-native") or pkg.startswith("nativesdk-"):
205 continue 218 continue
219 if 'cross-canadian' in pkg:
220 for p in prefixes:
221 localdata = bb.data.createCopy(d)
222 override = ":virtclass-multilib-" + p
223 localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
224 bb.data.update_data(localdata)
225 newname = localdata.expand(prov)
226 if newname != prov:
227 newval = localdata.expand(val)
228 d.setVar(newname, newval)
229 continue
206 virt = "" 230 virt = ""
207 if pkg.startswith("virtual/"): 231 if pkg.startswith("virtual/"):
208 pkg = pkg.replace("virtual/", "") 232 pkg = pkg.replace("virtual/", "")
209 virt = "virtual/" 233 virt = "virtual/"
210 for p in prefixes: 234 for p in prefixes:
211 newname = "PREFERRED_PROVIDER_" + virt + p + "-" + pkg
212 if pkg != "kernel": 235 if pkg != "kernel":
213 val = p + "-" + val 236 val = p + "-" + val
237
238 # implement variable keys
239 localdata = bb.data.createCopy(d)
240 override = ":virtclass-multilib-" + p
241 localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
242 bb.data.update_data(localdata)
243 newname = localdata.expand(prov)
244 if newname != prov:
245 d.setVar(newname, localdata.expand(val))
246
247 # implement alternative multilib name
248 newname = localdata.expand("PREFERRED_PROVIDER_" + virt + p + "-" + pkg)
214 if not d.getVar(newname, False): 249 if not d.getVar(newname, False):
215 d.setVar(newname, val) 250 d.setVar(newname, val)
216 251
@@ -218,7 +253,7 @@ def preferred_ml_updates(d):
218 mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split() 253 mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
219 extramp = [] 254 extramp = []
220 for p in mp: 255 for p in mp:
221 if p.endswith("-native") or p.startswith("nativesdk-"): 256 if p.endswith("-native") or p.startswith("nativesdk-") or 'cross-canadian' in p:
222 continue 257 continue
223 virt = "" 258 virt = ""
224 if p.startswith("virtual/"): 259 if p.startswith("virtual/"):