]> code.ossystems Code Review - openembedded-core.git/commitdiff
packagegroup.bbclass: Use immediate expanded PACKAGE_ARCH value
authorOtavio Salvador <otavio@ossystems.com.br>
Sat, 6 Sep 2014 19:41:55 +0000 (16:41 -0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 10 Sep 2014 14:19:59 +0000 (15:19 +0100)
When the PACKAGE_ARCH is dependant of a override, the expanding is
done too late triggering the false-positive error of wrong inclusion
order.

To fix this we use immediate expansion operator to evaluate the
PACKAGE_ARCH value in order to choose to load 'allarch' class or not.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
meta/classes/packagegroup.bbclass

index a79d5b05a6a70c1d2046b23d461c628107061f39..56cfead82a3192376c7a202a9a88e21b9cf1ca00 100644 (file)
@@ -9,8 +9,12 @@ 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 ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH', True) == 'all', 'allarch', '')}
+PACKAGE_ARCH ?= "all"
+
+# Fully expanded - so it applies the overrides as well
+PACKAGE_ARCH_EXPANDED := "${PACKAGE_ARCH}"
+
+inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED', True) == 'all', 'allarch', '')}
 
 # This automatically adds -dbg and -dev flavours of all PACKAGES
 # to the list. Their dependencies (RRECOMMENDS) are handled as usual