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 <gabriel.valcazar@digi.com>
(cherry picked from commit 593ff866578e6d341ec4d8a09581922c6390e2a4)
This commit is contained in:
Gabriel Valcazar 2024-10-22 11:24:37 +02:00
parent 984def64fd
commit a274463266
2 changed files with 9 additions and 8 deletions

View File

@ -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
#

View File

@ -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"