Bugzilla – Bug 1189625
When packaging applications internationalised with QTranslator, ‘Supplements’ tags for -lang subpackages are not generated
Last modified: 2021-08-20 15:38:48 UTC
When packaging Qt-based applications which use QTranslator for localisation and have -lang subpackage defined using the ‘%lang_package’ macro (i.e. the preferred mechanism), appropriate ’Supplements’ tags aren’t generated for the subpackage, which causes it to not get pulled during the installation of the main package. This is in contrast to applications (including Qt-based ones) which use GNU gettext for internationalisation, where it works as intended. An example of such package is the ‘drumstick’ package: https://build.opensuse.org/package/show/openSUSE:Factory/drumstick When installed on a system with an available locale (e.g. ‘es’) requested, ‘drumstick-lang’ should be also installed, but isn’t, in contrast to e.g. ‘ktorrent(-lang)’: $ sudo LANG=C zypper install drumstick ktorrent Loading repository data... Reading installed packages... Resolving package dependencies... The following 3 NEW packages are going to be installed: drumstick ktorrent ktorrent-lang The cause of this bug seems to be a change that was made 2 years ago, when the explicit ’Supplements’ tag in the ‘%lang_package’ macro has been removed, and a script that dynamically generates appropriate tags (‘Provides’/‘Supplements’) based on included locale files has been added: https://github.com/openSUSE/rpm-config-SUSE/commit/fca03384a5a48e1274b604279625b364b0f67889 Unfortunately, that script detects only GNU message catalog (.mo) files in the /usr/share/locale directory, but not Qt message (.qm) files which can be found basically anywhere under /usr/share. Possibly related bug: https://bugzilla.opensuse.org/show_bug.cgi?id=1167317