summaryrefslogtreecommitdiff
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-09-24 16:25:37 -0500
committerSaul Wold <sgw@linux.intel.com>2012-10-26 09:12:15 -0700
commit132a182e2f6c330aa645de42c1aeb386e43bddd3 (patch)
treece89b7e694bbb723f1f15944a257226c1b86e2cf /meta/classes/base.bbclass
parent88b4ec0b8c7c75b8570fc201c705937b459bb43e (diff)
downloadopenembedded-core-132a182e2f6c330aa645de42c1aeb386e43bddd3.tar.gz
openembedded-core-132a182e2f6c330aa645de42c1aeb386e43bddd3.tar.bz2
openembedded-core-132a182e2f6c330aa645de42c1aeb386e43bddd3.zip
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. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
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):
providers.append(v)
for pkg, reason in blacklists.items():
+ if pkg.endswith("-native") or pkg.startswith("nativesdk-") or 'cross-canadian' in pkg:
+ continue
for p in prefixes:
newpkg = p + "-" + pkg
if not d.getVarFlag('PNBLACKLIST', newpkg, True):
@@ -193,6 +195,17 @@ def preferred_ml_updates(d):
pkg = v.replace("PREFERRED_VERSION_", "")
if pkg.endswith("-native") or pkg.startswith("nativesdk-"):
continue
+ if 'cross-canadian' in pkg:
+ for p in prefixes:
+ localdata = bb.data.createCopy(d)
+ override = ":virtclass-multilib-" + p
+ localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
+ bb.data.update_data(localdata)
+ newname = localdata.expand(v)
+ if newname != v:
+ newval = localdata.getVar(v, True)
+ d.setVar(newname, newval)
+ continue
for p in prefixes:
newname = "PREFERRED_VERSION_" + p + "-" + pkg
if not d.getVar(newname, False):
@@ -203,14 +216,36 @@ def preferred_ml_updates(d):
pkg = prov.replace("PREFERRED_PROVIDER_", "")
if pkg.endswith("-native") or pkg.startswith("nativesdk-"):
continue
+ if 'cross-canadian' in pkg:
+ for p in prefixes:
+ localdata = bb.data.createCopy(d)
+ override = ":virtclass-multilib-" + p
+ localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
+ bb.data.update_data(localdata)
+ newname = localdata.expand(prov)
+ if newname != prov:
+ newval = localdata.expand(val)
+ d.setVar(newname, newval)
+ continue
virt = ""
if pkg.startswith("virtual/"):
pkg = pkg.replace("virtual/", "")
virt = "virtual/"
for p in prefixes:
- newname = "PREFERRED_PROVIDER_" + virt + p + "-" + pkg
if pkg != "kernel":
val = p + "-" + val
+
+ # implement variable keys
+ localdata = bb.data.createCopy(d)
+ override = ":virtclass-multilib-" + p
+ localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
+ bb.data.update_data(localdata)
+ newname = localdata.expand(prov)
+ if newname != prov:
+ d.setVar(newname, localdata.expand(val))
+
+ # implement alternative multilib name
+ newname = localdata.expand("PREFERRED_PROVIDER_" + virt + p + "-" + pkg)
if not d.getVar(newname, False):
d.setVar(newname, val)
@@ -218,7 +253,7 @@ def preferred_ml_updates(d):
mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
extramp = []
for p in mp:
- if p.endswith("-native") or p.startswith("nativesdk-"):
+ if p.endswith("-native") or p.startswith("nativesdk-") or 'cross-canadian' in p:
continue
virt = ""
if p.startswith("virtual/"):