]> code.ossystems Code Review - openembedded-core.git/commitdiff
packagegroup/allarch: Convert to use allarch class
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 25 Nov 2012 20:23:42 +0000 (20:23 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 26 Nov 2012 10:00:27 +0000 (10:00 +0000)
Currently there is some odd behaviour of the packagegroup class in relation
to sstate since it sets PACKAGE_ARCH = "all" but does not use the allarch class
leading to it being undetected by sstate.

Previously it was not possible to use allarch as the recipe couldn't "undo"
settings made by the allarch class. Since this no longer happens when
PACKAGE_ARCH != all, we can use the allarch class.

This patch also fixes up one case we need to preserve TRANSLATED_TARGET_ARCH
and ensures sstate only assumes allarch when PACKAGE_ARCH is "all".

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/packagegroup.bbclass
meta/classes/sstate.bbclass
meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb

index e0e5b1cf65251d2924c31430c9ec70a2e7043a20..fc67302a2c067ef01312a118598ba81d6bbd3e0b 100644 (file)
@@ -13,7 +13,7 @@ PACKAGES = "${PN}"
 # By default, packagegroup packages do not depend on a certain architecture.
 # Only if dependencies are modified by MACHINE_FEATURES, packages
 # need to be set to MACHINE_ARCH after inheriting packagegroup.bbclass
-PACKAGE_ARCH = "all"
+inherit allarch
 
 # This automatically adds -dbg and -dev flavours of all PACKAGES
 # to the list. Their dependencies (RRECOMMENDS) are handled as usual
index e1bc89d05e4529f052b86bb68baea2e738936df0..6de35e6dc9ef15f16c75ec2f723f109e42f713f6 100644 (file)
@@ -46,7 +46,7 @@ python () {
         d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}"))
     elif bb.data.inherits_class('cross-canadian', d):
         d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}_${PACKAGE_ARCH}"))
-    elif bb.data.inherits_class('allarch', d):
+    elif bb.data.inherits_class('allarch', d) and d.getVar("PACKAGE_ARCH", True) == "all":
         d.setVar('SSTATE_PKGARCH', "allarch")
     else:
         d.setVar('SSTATE_MANMACH', d.expand("${PACKAGE_ARCH}"))
index cb2fb1ad666e4beef5f79bf664f0f23243843cda..a6c6c362e38a484053551f7ed7f510c15f7aeead 100644 (file)
@@ -3,6 +3,9 @@ PN = "packagegroup-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 PR = "r0"
 LICENSE = "MIT"
 
+# Save TRANSLATED_TARGET_ARCH before allarch tramples it
+TRANSLATED_TARGET_ARCH = "${@d.getVar('TUNE_ARCH', True).replace('_', '-')}"
+
 inherit cross-canadian packagegroup
 
 PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"