[oe-commits] Richard Purdie : packagegroup: Make allarch inherit conditional

git at git.openembedded.org git at git.openembedded.org
Fri Aug 22 17:35:23 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 5234ef0a451a056f10829bb07a851cbfead245ef
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=5234ef0a451a056f10829bb07a851cbfead245ef

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Tue Aug 19 13:34:36 2014 +0100

packagegroup: Make allarch inherit conditional

Make the allarch inherit conditional on PACKAGE_ARCH being left as
all. The one downside to this approach is that recipes need to set
PACKAGE_ARCH *before* inheriting the class in order to avoid the inherit.

The advantage is that we could start to detect the use of the
allarch inherit in the sstatesig code for improved task checksums.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/packagegroup.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass
index 6606bc6..a79d5b0 100644
--- a/meta/classes/packagegroup.bbclass
+++ b/meta/classes/packagegroup.bbclass
@@ -9,7 +9,8 @@ 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
-inherit allarch
+PACKAGE_ARCH ??= "all"
+inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH', True) == 'all', 'allarch', '')}
 
 # This automatically adds -dbg and -dev flavours of all PACKAGES
 # to the list. Their dependencies (RRECOMMENDS) are handled as usual



More information about the Openembedded-commits mailing list