Bug 722739

Summary: No packages are installed after changing the primary language by YaST
Product: [openSUSE] openSUSE 12.1 Reporter: Fuminobu Takeyama <ftake>
Component: YaST2Assignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: forgotten_tfBQIqYkT6
Version: Beta 1   
Target Milestone: ---   
Hardware: x86-64   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2logs
After the yast install failed copy this log.
Use the zypper .dup

Description Fuminobu Takeyama 2011-10-07 16:19:37 UTC
User-Agent:       Opera/9.80 (Windows NT 6.1; U; ja) Presto/2.9.168 Version/11.51

When we select the primary language in YaST's languages setting dialog, it should install packages that is related to the language. (translation files, fonts, input methods, ...)

However, on openSUSE 12.1 Beta 1, YaST launches its package manager and loads repositories but it does not install any packages.

Note that "zypper inr" correctly installs expected packages.

Reproducible: Always

Steps to Reproduce:
1. Install 12.1 Beta 1 in English
2. Start YaST and change the primary language to Japanese
3. Select OK
Comment 1 Arvin Schnell 2011-10-10 07:55:17 UTC
Please provide YaST logs, see http://en.opensuse.org/openSUSE:Bugreport_YaST.
Comment 2 Fuminobu Takeyama 2011-10-10 08:29:01 UTC
Created attachment 455291 [details]
y2logs

I attached yast2 logs.
Comment 3 Fuminobu Takeyama 2011-10-23 16:52:15 UTC
I guess this problem is caused by the specification change mentioned in bug#721810:
https://bugzilla.novell.com/show_bug.cgi?id=721810

If we cannot use "install recommends", how about installing packages that provides "locale" such as "locale(ja)" and "locale(ja;ko;zh)"?
Comment 4 Michael Andres 2011-10-24 10:23:15 UTC
It's maybe not explicitly mentioned in bug #721810, but "Ignore recommended packages for already installed packages" is an option in the YaST package manager. You can turn it on or off in the option menu at any time. Just the initial default of this setting was changed. 

The option should be turned on automatically whenever an update is performed. It's a known bug of the current YaST package manager, that this does not happen automatically. This will be fixed ASAP.

Once it is fixed, after a language change you just need to perform an update or 
make sure the option is turned on.

---
Installing e.g. all packages providing "locale(ja)" is possible, but not recommended because you'd install all of them, and not just the ones relevant for your system. Furthermore wouldn't "locale(ja)" match a 'ja' in "locale(ja;ko;zh)". It might be tedious to figure out the right set of commands.

With zypper it would be:  zypper in -C "locale(ja)"

*** This bug has been marked as a duplicate of bug 721810 ***
Comment 5 Fuminobu Takeyama 2011-11-04 16:06:46 UTC
I installed RC2 and found that this problem has NOT been resolved yet although bnc#721810 was marked "FIXED".

Now, we need consider this problem separately from bnc#721810.
This is because it is complicated to install translation packages for already installed ones, fonts and so on.
(Flash Player etc. can be installed easily.)


How should we install these packages after installing in English (on text mode) in 12.1?

If the answer is
 - you can install them by package manager after changing the option
or
 - please install by "zypper inr"
then *we must change the behavior of the YaST module*; it should display a message about what to do next instead of launching package manager, doing nothing and exiting.



I know some people do not want to installing all of recommended package automatically like above solution.
I think we have to prepare another mechanism to install essential language-specific packages for a later release (12.2?).
Comment 6 Michael Andres 2011-11-07 12:23:48 UTC
(In reply to comment #5)
> then *we must change the behavior of the YaST module*; it should display a
> message about what to do next instead of launching package manager, doing
> nothing and exiting.

Passing this to the maintainer of the YAST2 language module. Jiri maybe you can outline the workflow and check whether something needs to be improved.
Comment 7 Jiří Suchomel 2011-11-11 08:31:41 UTC
Why should we change language module? I still think user should get the language packages installed, without requiring special work from him.

YaST calls Pkg::SetAdditionalLocales, Pkg::PkgSolve and Pkg::PkgCommit now.

Do you mean language packages (selected by SetAdditionalLocales) are treated as recommended? Isn't it wrong, when I actually explicitly ask for them?
Comment 8 Michael Andres 2011-11-11 12:29:34 UTC
It's basically a reverse-recommends. E.g. ispell-czech provides locale(ispell:cz). This translates into 'ispell recommends ispell-czech IFF locale(cz) is selected'.

So if ispell is already installed and zypp::Resolver::ignoreAlreadyRecommended is set TRUE (which is currently the y2qt-pkg default), the ispell-czech won't be installed.

It would be a good idea IMO if the language module could enforce ignoreAlreadyRecommended being set to FALSE when calling Pkg::PkgSolve.
Comment 9 Jiří Suchomel 2011-11-11 13:08:14 UTC
(In reply to comment #8)

> It would be a good idea IMO if the language module could enforce
> ignoreAlreadyRecommended being set to FALSE when calling Pkg::PkgSolve.

I agree.

Ladislav, how could I do that?
Comment 10 Jiří Suchomel 2011-11-11 15:08:39 UTC
*** Bug 728388 has been marked as a duplicate of this bug. ***
Comment 11 Ladislav Slezák 2011-11-11 15:46:55 UTC
Jiri, see PkgFunctions::SetSolverFlags() in pkg-bindings/src/Package.cc, use this:

  Pkg::SetSolverFlags({"ignoreAlreadyRecommended" : false});

the set is persistent (until changed by another call), then just call Pkg::PkgSolve() as usually.
Comment 12 Jiří Suchomel 2011-11-14 08:45:33 UTC
Maintenance for 12.1?
Comment 13 Bernhard Wiedemann 2011-11-14 14:00:08 UTC
This is an autogenerated message for OBS integration:
This bug (722739) was mentioned in
https://build.opensuse.org/request/show/91367 Factory / yast2-country
Comment 14 Benjamin Brunner 2011-11-15 19:06:59 UTC
Jiri could you submit your fix to openSUSE:12.1:Update:Test please? We don't need a SWAMPID for 12.1 Updates.
Comment 15 Jiří Suchomel 2011-11-16 07:11:13 UTC
Done: #91716
Comment 16 Forgotten User tfBQIqYkT6 2011-11-17 12:02:36 UTC
This bug still there!openSUSE-12.1-DVD-i586.iso, KDE desktop.it like the Bug 728388.need use the zypper dup to finish the Simplified Chinese language installation.
Comment 17 Forgotten User tfBQIqYkT6 2011-11-17 12:10:13 UTC
Created attachment 462627 [details]
After the yast install failed copy this log.
Comment 18 Forgotten User tfBQIqYkT6 2011-11-17 12:11:48 UTC
Created attachment 462628 [details]
Use the zypper .dup
Comment 19 Jiří Suchomel 2011-11-21 07:27:35 UTC
(In reply to comment #16)
> This bug still there!

Yes, it was too late for including the fix in 12.1. We will release an update.