[opensuse-packaging] automatic locale() provides for translations?
Hi, Many packages split off translations into a -lang subpackage. It's optional so the common way to package this is that the main package recommends the -lang package: $ rpm -q --recommends bash bash-doc = 4.4 bash-lang = 4.4 By default however that means the -lang packages are installed always, no matter whether the -lang package actually provides translations for the system's language. At the same time the dependency solver recognizes special locale() provides so it knows when packages are locale specific: $ rpm -q --provides ipa-pmincho-fonts|grep locale locale(ja) So in case no other package pulls in ipa-pmincho-fonts, it would still get installed if the system is installed in Japanese. There's also a variant that associates the locale specific package with another package: $ rpm -q --provides libreoffice-l10n-de|grep locale locale(libreoffice:de) Ie that one gets installed on a German system if libreoffice gets installed too. Furthermore we use %find_lang to tag all translation files with their locale already: $ rpm -q --qf '[%{filelangs} %{filenames}\n]' bash-lang|head -3 bg /usr/share/locale/bg/LC_MESSAGES/bash.mo ca /usr/share/locale/ca/LC_MESSAGES/bash.mo cs /usr/share/locale/cs/LC_MESSAGES/bash.mo [...] However: $ rpm -q --provides bash-lang bash-lang = 4.4-lp150.8.3.1 bash-lang-all = 4.4 Surprise: $ rpm -q --provides MozillaFirefox-translations-common|grep locale locale(MozillaFirefox:ar;ca;cs;da;de;en_GB;el;es_AR;es_CL;es_ES;fi;fr;hu;it;ja;ko;nb_NO;nl;pl;pt_BR;pt_PT;ru;sv_SE;zh_CN;zh_TW) Firefox does that manually though. Wouldn't it make sense to automatically tag all -lang packages with locale() and get rid of the recommends? Since English normally doesn't have mo files, a consequence would be that a system installed in English wouldn't pull in any -lang packages. Ie would be smaller without requiring --no-recommends. Any takers? :-) cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.com/ SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 1/4/19 3:38 AM, Ludwig Nussel wrote:
Firefox does that manually though. Wouldn't it make sense to automatically tag all -lang packages with locale() and get rid of the recommends?
Since English normally doesn't have mo files, a consequence would be that a system installed in English wouldn't pull in any -lang packages. Ie would be smaller without requiring --no-recommends.
I think that would make a tremendous amount of sense; I for one have always been annoyed about getting -lang packages installed which I do not use. I don't know if there are any possible stumbling blocks or downsides though. -- Jason Craig -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (2)
-
Jason Craig
-
Ludwig Nussel