]> code.ossystems Code Review - openembedded-core.git/commitdiff
packaged-staging.bbclass: Fix architecture field
authorJoshua Lock <josh@linux.intel.com>
Wed, 14 Apr 2010 10:03:43 +0000 (11:03 +0100)
committerJoshua Lock <josh@linux.intel.com>
Tue, 27 Apr 2010 15:58:42 +0000 (16:58 +0100)
The packages architecture field is incorrect, this patch changes it to:
native - build machine architecture
cross - build and target machine architectures
target - target machine architecture

Signed-off-by: Joshua Lock <josh@linux.intel.com>
meta/classes/packaged-staging.bbclass

index 0c3feb8dd9eb73befbc1a05b28ef14f638246aa4..a04c956c801432892643cae61787d3bfe90d468d 100644 (file)
@@ -12,7 +12,7 @@
 # bitbake.conf set PSTAGING_ACTIVE = "0", this class sets to "1" if we're active
 #
 PSTAGE_PKGVERSION = "${PV}-${PR}"
-PSTAGE_PKGARCH    = "${BUILD_SYS}"
+PSTAGE_PKGARCH    = "${TARGET_ARCH}"
 PSTAGE_EXTRAPATH  ?= ""
 PSTAGE_PKGPATH    = "${DISTRO}/${OELAYOUT_ABI}${PSTAGE_EXTRAPATH}"
 PSTAGE_PKGPN      = "${@bb.data.expand('staging-${PN}-${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}', d).replace('_', '-')}"
@@ -29,6 +29,11 @@ PSTAGE_NATIVEDEPENDS = "\
 BB_STAMP_WHITELIST = "${PSTAGE_NATIVEDEPENDS}"
 
 python () {
+    if bb.data.inherits_class('native', d):
+            bb.data.setVar('PSTAGE_PKGARCH', bb.data.getVar('BUILD_ARCH', d), d)
+    elif bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d):
+            bb.data.setVar('PSTAGE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${TARGET_ARCH}", d), d)
+
     pstage_allowed = True
 
     # These classes encode staging paths into the binary data so can only be