[Bug 936768] New: Language packages obey the wrong option for Recommended packages
http://bugzilla.suse.com/show_bug.cgi?id=936768 Bug ID: 936768 Summary: Language packages obey the wrong option for Recommended packages Classification: openSUSE Product: openSUSE Factory Version: 201505* Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: libzypp Assignee: zypp-maintainers@forge.provo.novell.com Reporter: mvidner@suse.com QA Contact: qa-bugs@suse.de CC: gs@suse.com Found By: --- Blocker: --- I have a system where only the English Language is installed (/var/lib/zypp/RequestedLocales has en_US). If I run the YaST package manager (qt or ncurses), enable Ignore Recommended Packages for Already Installed Packages (which will be the default, see https://bugzilla.opensuse.org/show_bug.cgi?id=902394 ) and add another language (eg Czech), no additional packages are selected. This is contrary to my expectation, since I consider Czech to be a new "package" so its recommended dependencies such as desktop-translations and bundle-lang-common-cs should be selected for installation. It works if I disable the Ignore...Already option. I wondered why the solver would behave so and I noticed that most language dependencies were expressed as conjunctions, eg bundle-lang-common-cs: Supplements: bash & namespace:language(cs) (it also has this, and I wonder why) Provides: locale (bash:cs) so in one way I see that bash is "already installed" so there's a pretext for not installing the bundle. OTOH the language is new, so the user expectation is IMHO clear. desktop-translations is even more interesting, since there is no conjunction, OTOH there is a disjunction. (Why not simply list a Supplements for each?) Supplements: namespace:language(af) | ... | namespace:language(cs) | ... I noticed all this when converting the Ignore...Already option to a one-time command similar to `zypper inr`. Gabi then argued that it was necessary for it to remain an option so that language rpms can be installed. I think that they should obey the onlyRequires option, which is newly exposed in the UIs as "Install Recommended Packages" (boo#900853). Overall, I consider this a part of a bigger cleanup of Recommends, https://fate.suse.com/318099 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=936768 http://bugzilla.suse.com/show_bug.cgi?id=936768#c1 --- Comment #1 from Martin Vidner <mvidner@suse.com> --- Gabi also said that the situation is the same for the hardware and filesystem dependencies. That may be true internally, but the user experience is different - installing hardware is done outside the yast UI :D so we need not care - changing the set of visible filesystems may involve YaST, but in the end it happens outside of the packager UI, so again the user does not need to care Languages do stand out, since they look like patterns or packages (even though technically they are another funny thing). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=936768 http://bugzilla.suse.com/show_bug.cgi?id=936768#c2 --- Comment #2 from Martin Vidner <mvidner@suse.com> --- Side note: zypper does not allow to manipulate the languages, and its manual has no mention of them. I think it is a minor bug, not worth addressing now. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=936768 http://bugzilla.suse.com/show_bug.cgi?id=936768#c3 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED --- Comment #3 from Michael Andres <ma@suse.com> --- I tried to address this in my 2nd comment to fate#318099. The libzypp part will be to somehow split up the 're-eavaluation of recommends of already_installed_packages' to be able to limit the action to language, hardware and/or filesystem. Depending on the result of this will see whether it will be possible to handle those new options automatically to gain the expected result, or whether UIs need to assist. (zypper does not offer languages because were not able to handle them in a reasonable way, due to the above.) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=936768 http://bugzilla.suse.com/show_bug.cgi?id=936768#c4 --- Comment #4 from Martin Vidner <mvidner@suse.com> --- OK. Until libzypp is fixed, I think I can work around the problem: In libyui-{qt,ncurses}-pkg I can temporarily set ignoreAlreadyRecommended() in the handler of the Languages view, around the calls of addRequestedLocale/removeRequestedLocale: NCPkgLocaleTable::toggleStatus https://github.com/libyui/libyui-ncurses-pkg/blob/6ee2566a0590e119e9a012bd59... YQPkgLangListItem::setStatus https://github.com/libyui/libyui-qt-pkg/blob/9363013550cbb6b410211498428e8b8... I'll try how it works out. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=936768 http://bugzilla.suse.com/show_bug.cgi?id=936768#c5 --- Comment #5 from Gabriele Mohr <gs@suse.com> --- Martin, to my understanding this cannot workaround the libzypp bug. libzypp will be fixed to only respect recommends for already installed packages concerning language, hardware, filesystem and not (as now) for all packages. When I have worked on 'zypper' and planned to provide language support I talked to Michel how to workaround the bug. This was outcome: Locale handling: ---------------- Add/remove language packages: 1. save state of flag 'ignoreRecommendedForAlreadyInstalled' and set it to 'false' (if not already done) 2. solve to get list of recommends before adding the locale (all packages having transact-flag set, see )libzypp/zypp/ResStatus.h 3. soft lock these packages 4. add locale and solve again -> list of language dependent packages 5. remove soft lock 6. reset initial state of 'ignoreRecommendedForAlreadyInstalled' -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=936768 http://bugzilla.suse.com/show_bug.cgi?id=936768#c6 --- Comment #6 from Martin Vidner <mvidner@suse.com> --- So, my idea indeed does not work. The packages show up as "a+", automatically added, as expected, but when I press Accept, they do not get installed. Anyway, this is the code: https://github.com/libyui/libyui-ncurses-pkg/compare/recommends...recommends... Regarding the broader problem of the recommended packages, currently we have an inconsistent package set because I have merged the changes in libyui-qt-pkg, yast2.rpm and yast2-packager before I learned of this bug. If I merge also libyui-ncurses-pkg, we will have most problems solved at the cost of breaking the language packages (this bug). While I don't know how hard the libzypp fix is, could we agree on the zypp API so that we can finish the upper layers? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=936768 http://bugzilla.suse.com/show_bug.cgi?id=936768#c7 --- Comment #7 from Michael Andres <ma@suse.com> --- In libzypp-15.10.0 the resolver treats changed RequestedLocale settings package-like and re-evaluates the language supporting packages accordingly. This should solve the yast language dialogs needs (if it resolves after having changed the languages). Generic resolver API and zypper commands will be the next thing todo... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=936768 http://bugzilla.suse.com/show_bug.cgi?id=936768#c8 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #8 from Michael Andres <ma@suse.com> --- IMO we can close this. Since libzypp-17.10.2 no-recommends does not disable the namespace dependencies (lang,fs,hw). Likewise it's possible to have inr jobs restricted to namkespaces. For details see also bug#953522. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com