Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1051816 - RFE: connect lang --addsupport to dnf-langpacks
RFE: connect lang --addsupport to dnf-langpacks
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
rawhide
Unspecified Linux
unspecified Severity low
: ---
: ---
Assigned To: David Shea
Fedora Extras Quality Assurance
: Reopened
Depends On: 1178969 1195325
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-11 14:53 EST by Edgar Hoch
Modified: 2015-08-13 05:14 EDT (History)
9 users (show)

See Also:
Fixed In Version: anaconda-23.17-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-13 05:14:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
ks.cfg kickstart file used for installation (6.38 KB, text/plain)
2014-01-14 05:14 EST, Edgar Hoch
no flags Details
anaconda.log from this installation (10.44 KB, text/x-log)
2014-01-14 05:15 EST, Edgar Hoch
no flags Details
anaconda.packaging.log from this installation (1.24 MB, text/x-log)
2014-01-14 05:16 EST, Edgar Hoch
no flags Details
Example: aspell languages packages: installed packages after kickstart (1.20 KB, text/plain)
2014-01-14 05:17 EST, Edgar Hoch
no flags Details
Example: aspell languages packages: installed packages after explicit adding languages with yum langinstall (1.23 KB, text/plain)
2014-01-14 05:22 EST, Edgar Hoch
no flags Details
Output of "yum langlist" after explicit installation of the languages listed in ks.cfg with "yum langinstall" (after reboot...) (1.26 KB, text/plain)
2014-01-14 05:24 EST, Edgar Hoch
no flags Details
anaconda.packaging.log from the new installation with lang --addsupport=... (1.30 MB, text/x-log)
2014-02-25 11:29 EST, Edgar Hoch
no flags Details

  None (edit)
Description Edgar Hoch 2014-01-11 14:53:27 EST
Description of problem:
The kickstart option "--instLangs=..." to %packages is ignored.

Version-Release number of selected component (if applicable):
Fedora 20

How reproducible:
Always.

Steps to Reproduce:
1. Create a kickstart file which "%packages" part contains "--instLangs=" with a langlist, for example

%packages --ignoremissing --default --instLangs=de_DE:en_US:es_ES:fr_FR:it_IT:pl_PL

or

%packages --ignoremissing --default --instLangs=af:ar:as:ast:be:bg:bn:br:bs:ca:cs:cy:da:de:el:en:es:et:eu:fa:fi:fo:fr:ga:gl:gu:gv:he:hi:hr:hu:ia:id:is:it:ja:kl:kn:ko:ks:kw:ky:lo:lt:lv:mai:mk:ml:mr:ms:mt:nb:nds:ne:nl:nn:oc:or:pa:pl:pt:ro:ru:se:si:sk:sl:sq:sr:sv:ta:te:th:tl:tr:uk:ur:uz:wa:xh:zh:zu:af_ZA:ar_AE:ar_BH:ar_DZ:ar_EG:ar_IN:ar_IQ:ar_JO:ar_KW:ar_LB:ar_LY:ar_MA:ar_OM:ar_QA:ar_SA:ar_SD:ar_SY:ar_TN:ar_YE:as_IN:ast_ES:be_BY:bg_BG:bn_BD:bn_IN:br_FR:bs_BA:ca_ES:cs_CZ:cy_GB:da_DK:de_AT:de_BE:de_CH:de_DE:de_LU:el_GR:en_AU:en_BW:en_CA:en_DK:en_GB:en_HK:en_IE:en_IN:en_NZ:en_PH:en_SG:en_US:en_ZA:en_ZW:es_AR:es_BO:es_CL:es_CO:es_CR:es_DO:es_EC:es_ES:es_GT:es_HN:es_MX:es_NI:es_PA:es_PE:es_PR:es_PY:es_SV:es_US:es_UY:es_VE:et_EE:eu_ES:fa_IR:fi_FI:fo_FO:fr_BE:fr_CA:fr_CH:fr_FR:fr_LU:ga_IE:gl_ES:gu_IN:gv_GB:he_IL:hi_IN:hr_HR:hu_HU:ia_FR:id_ID:is_IS:it_CH:it_IT:ja_JP:kl_GL:kn_IN:ko_KR:ks_IN:kw_GB:ky_KG:lo_LA:lt_LT:lv_LV:mai_IN:mk_MK:ml_IN:mr_IN:ms_MY:mt_MT:nb_NO:nds_DE:ne_NP:nl_BE:nl_NL:nn_NO:oc_FR:or_IN:pa_IN:pl_PL:pt_BR:pt_PT:ro_RO:ru_RU:ru_UA:se_NO:si_LK:sk_SK:sl_SI:sq_AL:sr_RS:sv_FI:sv_SE:ta_IN:te_IN:th_TH:tl_PH:tr_TR:uk_UA:ur_PK:uz_UZ:wa_BE:xh_ZA:zh_CN:zh_HK:zh_TW:zu_ZA

2. Make a kickstart install.
3. Check the installed langlist with 
  yum langlist

Actual results:
Only one language (the one specified with the kickstart "lang" option) is installed - in my case German ("lang de_DE.UTF-8").

Expected results:
All languages listed on --instLangs=... are installed.

Additional info:
The problem also exist on Fedora 18 and 19. I was thinking that I have reported this bug for these versions, but I found no such bug report - I possibly didn't report it so far.
Comment 1 David Shea 2014-01-13 17:12:40 EST
What packages or groups did you install with the kickstart? Can you install anaconda.log and packaging.log from this install? (The files are in /tmp during the install or in /var/log/anaconda on the installed system)
Comment 2 Edgar Hoch 2014-01-14 05:14:51 EST
Created attachment 849855 [details]
ks.cfg kickstart file used for installation

This is a typical kickstart file for a "big" installation.

I have hidden or substituted the password hashes and ip addresses for privacy reasons. I did this also for the log files (in the next attachments).
I have also removed the %post part of the kickstart file for the same reason (it doesn't change the behaviour of the %package part because %post will run after %package processing).
Comment 3 Edgar Hoch 2014-01-14 05:15:28 EST
Created attachment 849856 [details]
anaconda.log from this installation
Comment 4 Edgar Hoch 2014-01-14 05:16:29 EST
Created attachment 849857 [details]
anaconda.packaging.log from this installation
Comment 5 Edgar Hoch 2014-01-14 05:17:43 EST
Created attachment 849859 [details]
Example: aspell languages packages: installed packages after kickstart
Comment 6 Edgar Hoch 2014-01-14 05:22:30 EST
Created attachment 849860 [details]
Example: aspell languages packages: installed packages after explicit adding languages with yum langinstall

After kickstart installation I have done an explicit language installation with "yum langinstall ..." (for the language list see the kickstart file).

The package aspell is an example to see the difference because there are many language packages for aspell available.
Comment 7 Edgar Hoch 2014-01-14 05:24:14 EST
Created attachment 849861 [details]
Output of "yum langlist" after explicit installation of the languages listed in ks.cfg with "yum langinstall" (after reboot...)
Comment 8 David Shea 2014-02-24 17:43:43 EST
Gonna kill two birds with one stone here.

First, --instLangs (once it's hooked up in anaconda) isn't intended to act like yum langinstall. The `lang --addsupport' kickstart command should be used for that. --instLangs is intended to set the _install_langs rpm  macro, which *excludes* the languages installed for a given package to the specified list.

But --instLangs isn't actually implemented. Tracking that in bug 156477.

*** This bug has been marked as a duplicate of bug 156477 ***
Comment 9 Edgar Hoch 2014-02-25 11:26:38 EST
Thanks for the feedback.
Ok, I understand that --instLangs is not implemented currently.

Now I have tried to use `lang --addsupport' as you have suggested.
But it seems that something is wrong with either yum or the kickstart option "lang".

I have installed Fedora 20 x86_64 using kickstart. I have used the following kickstart option (change to the kickstart file in the attachment):

lang de_DE.UTF-8 --addsupport=af,ar,as,ast,be,bg,bn,br,bs,ca,cs,cy,da,de,el,en,es,et,eu,fa,fi,fo,fr,ga,gl,gu,gv,he,hi,hr,hu,ia,id,is,it,ja,kl,kn,ko,ks,kw,ky,lo,lt,lv,mai,mk,ml,mr,ms,mt,nb,nds,ne,nl,nn,oc,or,pa,pl,pt,ro,ru,se,si,sk,sl,sq,sr,sv,ta,te,th,tl,tr,uk,ur,uz,wa,xh,zh,zu,af_ZA,ar_AE,ar_BH,ar_DZ,ar_EG,ar_IN,ar_IQ,ar_JO,ar_KW,ar_LB,ar_LY,ar_MA,ar_OM,ar_QA,ar_SA,ar_SD,ar_SY,ar_TN,ar_YE,as_IN,ast_ES,be_BY,bg_BG,bn_BD,bn_IN,br_FR,bs_BA,ca_ES,cs_CZ,cy_GB,da_DK,de_AT,de_BE,de_CH,de_DE,de_LU,el_GR,en_AU,en_BW,en_CA,en_DK,en_GB,en_HK,en_IE,en_IN,en_NZ,en_PH,en_SG,en_US,en_ZA,en_ZW,es_AR,es_BO,es_CL,es_CO,es_CR,es_DO,es_EC,es_ES,es_GT,es_HN,es_MX,es_NI,es_PA,es_PE,es_PR,es_PY,es_SV,es_US,es_UY,es_VE,et_EE,eu_ES,fa_IR,fi_FI,fo_FO,fr_BE,fr_CA,fr_CH,fr_FR,fr_LU,ga_IE,gl_ES,gu_IN,gv_GB,he_IL,hi_IN,hr_HR,hu_HU,ia_FR,id_ID,is_IS,it_CH,it_IT,ja_JP,kl_GL,kn_IN,ko_KR,ks_IN,kw_GB,ky_KG,lo_LA,lt_LT,lv_LV,mai_IN,mk_MK,ml_IN,mr_IN,ms_MY,mt_MT,nb_NO,nds_DE,ne_NP,nl_BE,nl_NL,nn_NO,oc_FR,or_IN,pa_IN,pl_PL,pt_BR,pt_PT,ro_RO,ru_RU,ru_UA,se_NO,si_LK,sk_SK,sl_SI,sq_AL,sr_RS,sv_FI,sv_SE,ta_IN,te_IN,th_TH,tl_PH,tr_TR,uk_UA,ur_PK,uz_UZ,wa_BE,xh_ZA,zh_CN,zh_HK,zh_TW,zu_ZA

%packages --ignoremissing --default


In file /var/log/anaconda/anaconda.packaging.log I have found lines like the following. For the complete list, see the new attachment file.

04:06:17,563 DEBUG yum.verbose.plugin: Adding de_DE.UTF-8 to language list
04:06:17,564 DEBUG yum.verbose.plugin: Adding af to language list
04:06:17,564 DEBUG yum.verbose.plugin: Adding ar to language list
04:06:17,564 DEBUG yum.verbose.plugin: Adding as to language list


It seems that all languages listed in lang --addsupport= was recognized by anaconda and used in the kickstart installation (see the list of hunspell-* packages, for example).

But yum tells me that NO languages are installed (empty list, see the following comment):

# yum -d 0 -e 0 langlist
Installed languages:
	German (Germany)
	Spanish (Spain)
	French (France)
	Italian (Italy)
	Polish (Poland)

This tells me that the list was really empty after kickstart installation, because the listed languages are the languages de_DE,en_US,es_ES,fr_FR,it_IT,pl_PL which was installed by a custom script written by myself using the command "yum langinstall LANGUAGE". If you remove these explicit installed languages the list is empty.

It seems that languages packages was installed for packages that was installed at kickstart time, but not for packages that was installed later (after reboot, my scripts install additional packages after the new installed system is running). See the package list for languages de and sv:

# yum -d 0 -e 0 langinfo de
Language-Id=de
  LabPlot-doc-de
  aspell-de
  autocorr-de
  calligra-l10n-de
  drascula-de
  eclipse-nls-de
  gcompris-sound-de
  gimp-help-de
  gnome-getting-started-docs-de
  hunspell-de
  hyphen-de
  kde-i18n-German
  kde-l10n-German
  kicad-doc-de
  libreoffice-langpack-de
  man-pages-de
  mythes-de
  nqc-doc-de
  sagemath-doc-de
  tagainijisho-dic-de
  tkgate-de

# yum -d 0 -e 0 langinfo sv
Language-Id=sv
  LabPlot-doc-sv
  aspell-sv
  autocorr-sv
  calligra-l10n-sv
  eclipse-nls-sv
  gcompris-sound-sv
  gimp-help-sv
  hunspell-sv
  hyphen-sv
  kde-i18n-Swedish
  kde-l10n-Swedish
  libreoffice-langpack-sv
  mythes-sv


After installing languages "sv" with "yum langinstall sv", then the package "tesseract-langpack-swe" was added:

# yum -d 0 -e 0 langinfo sv
Language-Id=sv
  LabPlot-doc-sv
  aspell-sv
  autocorr-sv
  calligra-l10n-sv
  eclipse-nls-sv
  gcompris-sound-sv
  gimp-help-sv
  hunspell-sv
  hyphen-sv
  kde-i18n-Swedish
  kde-l10n-Swedish
  libreoffice-langpack-sv
  mythes-sv


The list of available languages (output of "yum langavailable") tells me that there are other languages available that the system (yum?) thinks that they are not installed (as "yum langlist" differs).

To summarize:

- Kickstart option "lang ... --addsuport=..." works fine during kickstart installation, but the language list is not saved to be available for yum after reboot.

- I still have to add each languages explicit (using "yum langinstall ...") for each desired language after finishing kickstart installation (e.g. after reboot).


Question: Shall we reopen this bug to handle this problem, or shall we (I ?) create a new bug report for this problem ("lang --addsupport")?


PS: A note to the new kickstart option "lang --addsupport":
I would be helpful if changes to kickstart options will be noticed in future release notes too. Now I know that I have to check the wiki diffs of the Anaconda/Kickstart wiki page to see the changes, but other administrators may check only the release notes. Thanks!
Comment 10 Edgar Hoch 2014-02-25 11:29:05 EST
Created attachment 867514 [details]
anaconda.packaging.log from the new installation with lang --addsupport=...
Comment 11 David Shea 2014-02-25 15:05:56 EST
(In reply to Edgar Hoch from comment #9)
> Question: Shall we reopen this bug to handle this problem, or shall we (I ?)
> create a new bug report for this problem ("lang --addsupport")?

All anaconda actually does is write the addsupport list to /etc/yum/pluginconf.d/langpacks.conf and lets the yum langpacks plugin do the rest, so I suggest that you open a new bug against yum.

> PS: A note to the new kickstart option "lang --addsupport":
> I would be helpful if changes to kickstart options will be noticed in future
> release notes too. Now I know that I have to check the wiki diffs of the
> Anaconda/Kickstart wiki page to see the changes, but other administrators
> may check only the release notes.

Release notes are mainted separately from anaconda. You can email docs@lists.fedoraproject.org or open a bug against the release-notes component under Fedora Documentation.

It probably wouldn't hurt if we noted in the wiki in what version things were added, though.
Comment 12 Edgar Hoch 2014-02-25 22:04:05 EST
David, thanks for the information and tips.

I have created bugs #1069976 and #1069985 .
Comment 13 Matthew Miller 2014-11-08 12:44:52 EST
(In reply to David Shea from comment #11)
> All anaconda actually does is write the addsupport list to
> /etc/yum/pluginconf.d/langpacks.conf and lets the yum langpacks plugin do
> the rest, so I suggest that you open a new bug against yum.



I'm going to move this to DNF and target rawhide. It'd be nice to have this working for F22.
Comment 14 David Shea 2014-11-12 15:43:44 EST
(In reply to Matthew Miller from comment #13)
> (In reply to David Shea from comment #11)
> > All anaconda actually does is write the addsupport list to
> > /etc/yum/pluginconf.d/langpacks.conf and lets the yum langpacks plugin do
> > the rest, so I suggest that you open a new bug against yum.
> 
> 
> 
> I'm going to move this to DNF and target rawhide. It'd be nice to have this
> working for F22.


Ok this is bug is kind of a mess at this point. The original report was a misunderstanding of what --instLangs does, which I believe is being clarified in documentation. Then it became a problem of lang --addsupport not being linked up with yum langlist. Anaconda did its part by writing /etc/yum/pluginconf.d/langpacks.conf in the installed system, oh but except we changed something in the meantime and broke it and then we fixed it again, differently, anaconda-22.9-1 and anaconda-21.48.15-1 (astute readers will note the f21 fix went in, like, right now, haha, whoops). So, anaconda does its part, for yum. "what is yum's deal" is in bug 1069976.

So, dnf. We don't anything with dnf-langpacks. I'm going to assume that this is now what the bug is about.
Comment 15 Matthew Miller 2014-11-12 16:10:08 EST
Okay that works for me, although... didn't there also used to be something with setting rpm tsflags in a config file at some point?
Comment 16 David Shea 2014-11-12 16:24:38 EST
(In reply to Matthew Miller from comment #15)
> Okay that works for me, although... didn't there also used to be something
> with setting rpm tsflags in a config file at some point?

That is the first I have heard of it. We set the flag during the transaction but don't save them anywhere.
Comment 17 Matthew Miller 2014-11-13 14:15:17 EST
(In reply to David Shea from comment #16)
> (In reply to Matthew Miller from comment #15)
> > Okay that works for me, although... didn't there also used to be something
> > with setting rpm tsflags in a config file at some point?
> 
> That is the first I have heard of it. We set the flag during the transaction
> but don't save them anywhere.

I think this is from the days of yore. Possibly... pre-anaconda? Oh yes, looks like Jeremy wontfixed putting that back in 2005 with bug #160903.

Okay, trip down memory lane over. I think that the langpack support is probably the better way forward. For now, gross hacks it is.
Comment 18 David Shea 2015-01-05 14:34:09 EST
Just for laughs, I installed a fresh rawhide system to see what dnf thought about langpacks from the start

[anaconda root@localhost /]# dnf langlist
[Errno 2] No such file or directory: u'/var/lib/yum/plugins/langpacks/installed_langpacks'

So, I'm going to ask that dnf-langpacks add a not-crazy config file location and not do anything here until that happens.
Comment 19 Parag Nemade 2015-02-23 10:52:26 EST
(In reply to David Shea from comment #18)
> Just for laughs, I installed a fresh rawhide system to see what dnf thought
> about langpacks from the start
> 
> [anaconda root@localhost /]# dnf langlist
> [Errno 2] No such file or directory:
> u'/var/lib/yum/plugins/langpacks/installed_langpacks'
> 
> So, I'm going to ask that dnf-langpacks add a not-crazy config file location
> and not do anything here until that happens.

This is what used to happen when you work on something which is developed by some person and you don't cc him/her at all. 

Anyway the above problem exists for yum-langpacks also since langlist is added in yum-langpacks but never reported.

I will *re-iterate* /var/lib/yum/plugins/langpacks/installed_langpacks is not a config file.
Comment 20 David Shea 2015-02-23 11:05:11 EST
(In reply to Parag from comment #19)
> (In reply to David Shea from comment #18)
> > Just for laughs, I installed a fresh rawhide system to see what dnf thought
> > about langpacks from the start
> > 
> > [anaconda root@localhost /]# dnf langlist
> > [Errno 2] No such file or directory:
> > u'/var/lib/yum/plugins/langpacks/installed_langpacks'
> > 
> > So, I'm going to ask that dnf-langpacks add a not-crazy config file location
> > and not do anything here until that happens.
> 
> This is what used to happen when you work on something which is developed by
> some person and you don't cc him/her at all. 
> 
> Anyway the above problem exists for yum-langpacks also since langlist is
> added in yum-langpacks but never reported.
> 
> I will *re-iterate* /var/lib/yum/plugins/langpacks/installed_langpacks is
> not a config file.

We're not using it as a config file. The issue of having a file to write to is in bug 1178969, which is assigned to you. I just opened bug 1195325 against dnf for having a configurable plugin config location, since I looked into using /etc/dnf/plugins/langpacks.conf (even if it doesn't do anything yet) and realized that writing to files to /etc is not something anaconda can do. I don't know yet where that discussion will go since it's just started. Presumably once all the pieces are in place, the handling of /var/lib/yum/plugins/langpacks will be handled by dnf-langpacks. In the meantime, anaconda will continue to do what it has been doing regarding dnf and langpacks, which is nothing.

I apologize if you feel you've been left out of the loop, but I'm not sure exactly what the problem is here?
Comment 21 Parag Nemade 2015-02-23 11:29:43 EST
I have not yet read this complete bug comments about langpacks plugin but the problem reported just here is of 
> > [anaconda root@localhost /]# dnf langlist
> > [Errno 2] No such file or directory:
> > u'/var/lib/yum/plugins/langpacks/installed_langpacks'

I find that this occurs when on a fresh installed system users directly run "dnf langlist". I never thought users will do this first. So it is a bug and need to be fixed. Will fix this in next release of {yum/dnf}-langpacks.

Thanks.
Comment 22 David Shea 2015-02-23 11:35:41 EST
Oh, ok, I assumed it was anaconda's fault for not configuring langpacks yet. Sorry for hiding the bug 18 comments down in someone else's bug report.
Comment 23 Parag Nemade 2015-03-20 11:36:07 EDT
Note: dnf-langpacks now installing /etc/dnf/plugins/langpacks.conf file. Anaconda need to write languages to this file similarly it is doing for yum-langpacks.
Comment 24 Parag Nemade 2015-08-13 05:14:33 EDT
I confirm that this bug is fixed now. Thank you very much David for helping to add langpacks code for dnf-langpacks in anaconda.
Tested with Fedora 23 Alpha Server install DVD that selected additional languages which are getting written in /etc/dnf/plugins/langpacks.conf file.

Note You need to log in before you can comment on or make changes to this bug.