qttranslation: recommend all translation packages

Add RRECOMMENDS for all the dynamic translation packages to the main
qttranslation package to allow easily include all translation files
in the image.

Pick-to: 6.1
Change-Id: I564d4fe704a8b88e14d94154c3283e58d52ddb21
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
This commit is contained in:
Samuli Piippo 2021-03-24 15:28:14 +02:00
parent e60fed4f98
commit 019581cff7

View File

@ -10,12 +10,19 @@ include recipes-qt/qt6/qt6.inc
DEPENDS += "qtbase qttools qttools-native"
PACKAGES = "${PN}"
PACKAGES_DYNAMIC = "${PN}-*"
PACKAGESPLITFUNCS_prepend = "split_translation_packages "
python populate_packages_prepend () {
python split_translation_packages () {
do_split_packages(d, d.expand('${QT6_INSTALL_TRANSLATIONSDIR}'),
r'^(.*?)(?:_..)+\.qm$', d.expand('${PN}-%s'),
'Qt translations for %s', extra_depends='')
# Add dynamic packages to the rrecommends of the main packages
pn = d.getVar('PN')
pkgs = oe.utils.packages_filter_out_system(d)
d.setVar('RRECOMMENDS_' + pn, ' '.join(pkgs))
}
SRCREV = "f18b950b45c93c96fc2974624b0f945b06314ab8"