From b0c74493af1415dfd3b6caf77ebc677ed4e0fdaa Mon Sep 17 00:00:00 2001 From: André Draszik Date: Sat, 17 Nov 2018 09:57:38 +0000 Subject: java-library: make packages overriding PACKAGE_ARCH work again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Recent changes is OE have caused the traditional approach of inheriting allarch and setting PACKAGE_ARCH not work anymore. Once allarch is inherited, PACKAGE_ARCH can not be overridden afterwards. See commit a23c482cab4f ("allarch: only enable allarch when multilib is not used") d9ba0219b2f6 in poky. http://git.openembedded.org/openembedded-core/commit/?id=a23c482cab4f874f4a6a6889716123569eb5ece9 The error manifests itself with configure trying to --host=allarch-poky-linux --target=allarch-poky-linux which fails. To work around this we can make java-library's allarch inherit conditional, as is done e.g. in OE-core for packagegroup.bbclass http://git.openembedded.org/openembedded-core/commit/?id=9c826962ec8fa45c2b035427442b90a41517144e http://git.openembedded.org/openembedded-core/commit/?id=2c9b1d304daade7b0907320aeb9c522e7ab9dcab So this commit does exactly that, and fixes the two users of this to follow the new approach. Signed-off-by: André Draszik Signed-off-by: Richard Leitner --- classes/java-library.bbclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'classes/java-library.bbclass') diff --git a/classes/java-library.bbclass b/classes/java-library.bbclass index ce1cd28..e0159ba 100644 --- a/classes/java-library.bbclass +++ b/classes/java-library.bbclass @@ -10,9 +10,13 @@ # # package archs are set to all, if the recipe builds also packages which # can not be used for all archs, then set the PACKAGE_ARCH of that package -# manually, see rxtx_xx.bb for an example. +# manually *before* inheriting the class, see rxtx_xx.bb for an example. -inherit java allarch +inherit java +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') == 'all', 'allarch', '')} # use java_stage for native packages JAVA_NATIVE_STAGE_INSTALL = "1" -- cgit v1.2.3-54-g00ecf