diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-24 17:48:09 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-26 10:44:27 +0000 |
commit | bb5fe4c35dcc8df0acd29c6d7f43de82d5744b75 (patch) | |
tree | 6e0b3150bd4c6c1b9adbf48be940541e04d6c839 | |
parent | aa7e2717d33c2d754ec486e9148f446c1d6a3b14 (diff) | |
download | poky-bb5fe4c35dcc8df0acd29c6d7f43de82d5744b75.tar.gz |
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]
(From OE-Core rev: b1bab7a6eff6b195824be7d754de58c6e9ee2bfb)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/allarch.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/staging.bbclass | 16 |
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 () { | |||
25 | d.setVar("TARGET_AS_ARCH", "none") | 25 | d.setVar("TARGET_AS_ARCH", "none") |
26 | d.setVar("TARGET_FPU", "") | 26 | d.setVar("TARGET_FPU", "") |
27 | d.setVar("TARGET_PREFIX", "") | 27 | d.setVar("TARGET_PREFIX", "") |
28 | d.setVar("PACKAGE_EXTRA_ARCHS", "") | 28 | # Expand PACKAGE_EXTRA_ARCHS since the staging code needs this |
29 | # (this removes any dependencies from the hash perspective) | ||
30 | d.setVar("PACKAGE_EXTRA_ARCHS", d.getVar("PACKAGE_EXTRA_ARCHS")) | ||
29 | d.setVar("SDK_ARCH", "none") | 31 | d.setVar("SDK_ARCH", "none") |
30 | d.setVar("SDK_CC_ARCH", "none") | 32 | d.setVar("SDK_CC_ARCH", "none") |
31 | d.setVar("TARGET_CPPFLAGS", "none") | 33 | 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): | |||
304 | pkgarchs = ['${BUILD_ARCH}', '${BUILD_ARCH}_*'] | 304 | pkgarchs = ['${BUILD_ARCH}', '${BUILD_ARCH}_*'] |
305 | targetdir = nativesysroot | 305 | targetdir = nativesysroot |
306 | else: | 306 | else: |
307 | pkgarchs = ['${MACHINE_ARCH}', '${TUNE_PKGARCH}', 'allarch'] | 307 | pkgarchs = ['${MACHINE_ARCH}'] |
308 | pkgarchs = pkgarchs + list(reversed(d.getVar("PACKAGE_EXTRA_ARCHS").split())) | ||
309 | pkgarchs.append('allarch') | ||
308 | targetdir = targetsysroot | 310 | targetdir = targetsysroot |
309 | 311 | ||
310 | bb.utils.mkdirhier(targetdir) | 312 | bb.utils.mkdirhier(targetdir) |
@@ -528,11 +530,13 @@ python extend_recipe_sysroot() { | |||
528 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}-%s.populate_sysroot" % c) | 530 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}-%s.populate_sysroot" % c) |
529 | native = True | 531 | native = True |
530 | else: | 532 | else: |
531 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${MACHINE_ARCH}-%s.populate_sysroot" % c) | 533 | pkgarchs = ['${MACHINE_ARCH}'] |
532 | if not os.path.exists(manifest): | 534 | pkgarchs = pkgarchs + list(reversed(d2.getVar("PACKAGE_EXTRA_ARCHS").split())) |
533 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${TUNE_PKGARCH}-%s.populate_sysroot" % c) | 535 | pkgarchs.append('allarch') |
534 | if not os.path.exists(manifest): | 536 | for pkgarch in pkgarchs: |
535 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-allarch-%s.populate_sysroot" % c) | 537 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-%s-%s.populate_sysroot" % (pkgarch, c)) |
538 | if os.path.exists(manifest): | ||
539 | break | ||
536 | if not os.path.exists(manifest): | 540 | if not os.path.exists(manifest): |
537 | bb.warn("Manifest %s not found?" % manifest) | 541 | bb.warn("Manifest %s not found?" % manifest) |
538 | else: | 542 | else: |