From a27446326605803a29f149d9dc24f6de1e042c30 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Tue, 22 Oct 2024 11:24:37 +0200 Subject: [PATCH] dey-image: inherit populate_sdk_qt[5/6] only in dey-image-qt to avoid SDK bloat When it comes to inheriting this qt bbclass, we used to do so for every image inheriting the "dey-image" bbclass that had "dey-qt" in its IMAGE_FEATURES. In theory, only dey-image-qt follows these requirements. However, starting in DEY 3.0, we added support for multiple graphical images, all of them sharing the same characteristics save for a defining IMAGE_FEATURE. To implement this, all images have the IMAGE_FEATURE "dey-${GRAPHICAL_CORE}", with GRAPHICAL_CORE having a default value of "qt" and being overwritten in each image recipe with its respective value: "qt", "webkit", "crank" or "lvgl". The problem is that, when checking whether to inherit populate_sdk_qt[5/6] or not, it's still very early in the recipe parsing process and GRAPHICAL_CORE still has its default value of "qt", meaning the "dey-qt" IMAGE_FEATURE is considered present for all graphical images. In turn, this results in qt packages being included in all graphical image SDKs. Move the inherit clause to the dey-image-qt recipe and remove the check so that the qt packages only get installed in the dey-image-qt SDK. Signed-off-by: Gabriel Valcazar (cherry picked from commit 593ff866578e6d341ec4d8a09581922c6390e2a4) --- meta-digi-dey/classes/dey-image.bbclass | 9 ++------- meta-digi-dey/recipes-core/images/dey-image-qt.bb | 8 +++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/meta-digi-dey/classes/dey-image.bbclass b/meta-digi-dey/classes/dey-image.bbclass index 57ec678e0..bd537b35e 100644 --- a/meta-digi-dey/classes/dey-image.bbclass +++ b/meta-digi-dey/classes/dey-image.bbclass @@ -1,6 +1,7 @@ # DEY image features. # -# Copyright (C) 2012-2024 Digi International. +# Copyright (C) 2012-2024, Digi International Inc. +# # # Add build info to rootfs images (/etc/buildinfo) @@ -22,12 +23,6 @@ EXTRA_USERS_PARAMS += "\ usermod -p '${MD5_ROOT_PASSWD}' root; \ " -# -# Create QT5 capable toolchain/SDK if 'dey-qt' image feature is enabled -# -inherit qt-version -inherit ${@bb.utils.contains("IMAGE_FEATURES", "dey-qt", "${QT_POPULATE_SDK}", "",d)} - # # Generate ZIP installer if configured in the project's local.conf # diff --git a/meta-digi-dey/recipes-core/images/dey-image-qt.bb b/meta-digi-dey/recipes-core/images/dey-image-qt.bb index c3b3b6474..b82e8d0b7 100644 --- a/meta-digi-dey/recipes-core/images/dey-image-qt.bb +++ b/meta-digi-dey/recipes-core/images/dey-image-qt.bb @@ -1,8 +1,14 @@ # -# Copyright (C) 2016-2023, Digi International Inc. +# Copyright (C) 2016-2024, Digi International Inc. # require dey-image-graphical.inc +# +# Create QT5/6 capable toolchain/SDK +# +inherit qt-version +inherit ${QT_POPULATE_SDK} + DESCRIPTION = "DEY image with QT graphical libraries" GRAPHICAL_CORE = "qt"