Bug 1189625 - When packaging applications internationalised with QTranslator, ‘Supplements’ tags for -lang subpackages are not generated
Summary: When packaging applications internationalised with QTranslator, ‘Supplements’...
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: All openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Fabian Vogt
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-19 22:03 UTC by Paulina Emilia -
Modified: 2021-08-20 15:38 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paulina Emilia - 2021-08-19 22:03:23 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