[oe] [PATCH] amend.bbclass: handle PACKAGE_ARCH change in an amend.inc

Eric Bénard eric at eukrea.com
Wed Nov 17 13:55:40 UTC 2010


* setting PACKAGE_ARCH = "${MACHINE_ARCH}" in and amend.inc actually
leads to a packaga with the correct machine arch but the
work/stage/stamp dirs are not correct because MULTIMACH_ARCH is not
updated after amend.inc is parsed.

* this patch updates MULTIMACH_ARCH if PACKAGE_ARCH is changed in
amend.inc

Signed-off-by: Eric Bénard <eric at eukrea.com>
---
 classes/amend.bbclass |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/classes/amend.bbclass b/classes/amend.bbclass
index a03de64..da60611 100644
--- a/classes/amend.bbclass
+++ b/classes/amend.bbclass
@@ -42,5 +42,11 @@ python () {
             depends = set()
         depends |= set(newdata)
     d.setVar("__depends", depends)
+
+    mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1)
+    pkg_arch = bb.data.getVar('PACKAGE_ARCH', d, 1)
+    multi_arch = bb.data.getVar('MULTIMACH_ARCH', d, 1)
+    if pkg_arch and pkg_arch == mach_arch and pkg_arch != multi_arch:
+        multi_arch = pkg_arch
+        bb.data.setVar('MULTIMACH_ARCH', multi_arch, d)
 }
-- 
1.7.2.3





More information about the Openembedded-devel mailing list