summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-24 17:48:09 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-26 10:41:08 +0000
commitb1bab7a6eff6b195824be7d754de58c6e9ee2bfb (patch)
treefb69c9566a3b301beb3a227bb6f6ea08d7992f33 /meta
parent40463f9d806b478a887128345a66135ef6fa2fe8 (diff)
downloadopenembedded-core-b1bab7a6eff6b195824be7d754de58c6e9ee2bfb.tar.gz
openembedded-core-b1bab7a6eff6b195824be7d754de58c6e9ee2bfb.tar.bz2
openembedded-core-b1bab7a6eff6b195824be7d754de58c6e9ee2bfb.zip
staging/allarch: Remove hardcoded PACKAGE_ARCHS from the class
The code was making an assumption that the only PACKAGE_ARCH in use was TUNE_PKGARCH. This is incorrect so iterate over the list from PACKAGE_EXTRA_ARCH instead. We also need to change allarch to preserve this variable, else the staging code doesn't function. We do this in a way which clears the variable history so that the task hashes remain unaffected. [Thanks to Andrew Goodbody <andrew.goodbody@cambrionix.com> for testing/fixing] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/allarch.bbclass4
-rw-r--r--meta/classes/staging.bbclass16
2 files changed, 13 insertions, 7 deletions
diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass
index 026214ea9a..a7748416e9 100644
--- a/meta/classes/allarch.bbclass
+++ b/meta/classes/allarch.bbclass
@@ -25,7 +25,9 @@ python () {
d.setVar("TARGET_AS_ARCH", "none")
d.setVar("TARGET_FPU", "")
d.setVar("TARGET_PREFIX", "")
- d.setVar("PACKAGE_EXTRA_ARCHS", "")
+ # Expand PACKAGE_EXTRA_ARCHS since the staging code needs this
+ # (this removes any dependencies from the hash perspective)
+ d.setVar("PACKAGE_EXTRA_ARCHS", d.getVar("PACKAGE_EXTRA_ARCHS"))
d.setVar("SDK_ARCH", "none")
d.setVar("SDK_CC_ARCH", "none")
d.setVar("TARGET_CPPFLAGS", "none")
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index fc387eaf4b..b97f26127f 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -304,7 +304,9 @@ def staging_populate_sysroot_dir(targetsysroot, nativesysroot, native, d):
pkgarchs = ['${BUILD_ARCH}', '${BUILD_ARCH}_*']
targetdir = nativesysroot
else:
- pkgarchs = ['${MACHINE_ARCH}', '${TUNE_PKGARCH}', 'allarch']
+ pkgarchs = ['${MACHINE_ARCH}']
+ pkgarchs = pkgarchs + list(reversed(d.getVar("PACKAGE_EXTRA_ARCHS").split()))
+ pkgarchs.append('allarch')
targetdir = targetsysroot
bb.utils.mkdirhier(targetdir)
@@ -528,11 +530,13 @@ python extend_recipe_sysroot() {
manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}-%s.populate_sysroot" % c)
native = True
else:
- manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${MACHINE_ARCH}-%s.populate_sysroot" % c)
- if not os.path.exists(manifest):
- manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${TUNE_PKGARCH}-%s.populate_sysroot" % c)
- if not os.path.exists(manifest):
- manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-allarch-%s.populate_sysroot" % c)
+ pkgarchs = ['${MACHINE_ARCH}']
+ pkgarchs = pkgarchs + list(reversed(d2.getVar("PACKAGE_EXTRA_ARCHS").split()))
+ pkgarchs.append('allarch')
+ for pkgarch in pkgarchs:
+ manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-%s-%s.populate_sysroot" % (pkgarch, c))
+ if os.path.exists(manifest):
+ break
if not os.path.exists(manifest):
bb.warn("Manifest %s not found?" % manifest)
else: