Bug 811237

Summary: YaST2 Softwaremanagement (graphical mode) can't remember settings
Product: [openSUSE] openSUSE 12.3 Reporter: Forgotten User B-7XM5iatA <forgotten_B-7XM5iatA>
Component: YaST2Assignee: Thomas Göttlicher <tgoettlicher>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P4 - Low CC: forgotten_B-7XM5iatA, mvidner, tgoettlicher
Version: Final   
Target Milestone: ---   
Hardware: 32bit   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2logs

Description Forgotten User B-7XM5iatA 2013-03-24 17:27:03 UTC
User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0

operating system openSUSE 12.3 32bit final

I'm using on my desktop computer "Qinternet" for connecting via LAN to the internet.
That's why I did not install the Networkmanager.
Always if I want to install or update some programs
YaST2 Softwaremanagement attempts to install Networkmanager.
If I mark the Networkmanager as "never install"
on the next start of YaST2 Softwaremanagement delete my marker and try again to install Networkmanager and depending packages.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Forgotten User B-7XM5iatA 2013-03-26 12:51:09 UTC
Changed bug summary
from: YaST2 Software installation / update try always to install Networkmanager and depending packages 
to: YaST2 Softwaremanagement (graphical mode) can't remember settings

Today I did following test:

I started system and YaST2 in text mode.
In text mode software management did not try to install Networkmanager.

I marked Networkmanager as "never install" and finished software management.

After that I started system and YaST2 software management in graphical mode again.
Now Networkmanager was marked as "never install".

Then I deleted the "never install" mark of Networkmanager and closed YaST2.
Of course I clicked onto accept button to assume.
After restart of YaT2 software management, Networkmanager is marked as "never install" again.

So it is proven that YaST2 software management in graphical mode can't remember settings of last use.
Comment 2 Forgotten User B-7XM5iatA 2013-03-26 13:15:01 UTC
Just right now I checked it on my Laptop with
openSUSE 12.2 32bit KDE 4.8.5 (release 2)

it's there exactly the same.
Comment 3 Fei Xiang Zhang 2013-03-28 03:02:22 UTC
please attach y2logs.
http://en.opensuse.org/openSUSE:Bugreport_YaST
thanks!
Comment 4 Forgotten User B-7XM5iatA 2013-03-28 06:50:36 UTC
Created attachment 532338 [details]
y2logs

I forgot to mention
on desktop computer is running KDE 4.10.00 "release 1"
Comment 5 Thomas Göttlicher 2013-07-04 14:40:31 UTC
I cannot reproduce this bug on my machine. Could you please test with the latest openSUSE again?
Comment 6 Forgotten User B-7XM5iatA 2013-07-04 17:27:01 UTC
I'm working with the latest version of openSUSE.

Today I played around a lot of with YaST2 install/delete and update tool and made a discovery.

It's a difference whether I mark a package via the tool "install / delete software" or "update software".

If I start the "update software" tool and mark a package as never install as example, this mark is not present anymore at the next start of install/delete or update tool.

If I do this by using of "install / delete software" tool,
YaST2 is remembering at next start.

Also I noticed that the option "ignore recommended packages for already installed packages" is not automatically set too in "update software" if this option is marked in "install / delete software" tool.

I guess that's why updater always tried to install Network Manager.
Comment 7 Thomas Göttlicher 2013-07-05 10:05:08 UTC
Norman, thanks for testing and the explanation. I can reproduce this bug now.

It's libyui-qt-pkg's online update mode which doesn't preserve changes in package locks.

libyui-ncurses-pkg and libyui-gtk-pkg don't even offer these settings to the user in the online update modes.
Comment 10 Ladislav Slezák 2013-07-15 11:43:55 UTC
The locks are actually saved during commit action in libzypp.

The YOU module just checks if there is something to install/remove, if not than it does not call the commit so the locks are not saved, see https://github.com/yast/yast-online-update/blob/master/src/online_update_select.ycp#L286.

And to the "ignore recommended packages for already
installed packages" option: it is enabled by default, see https://github.com/yast/yast-online-update/blob/master/src/online_update_select.ycp#L90, but when there is no package manager patch then it reverted back to the previous state (https://github.com/yast/yast-online-update/blob/master/src/online_update_select.ycp#L103).

I guess it should be always set. Jiri, any reason for not doing that?
Comment 11 Jiří Suchomel 2013-07-15 12:41:31 UTC
(In reply to comment #10)
> The locks are actually saved during commit action in libzypp.
> 
> The YOU module just checks if there is something to install/remove, if not than
> it does not call the commit so the locks are not saved, see
> https://github.com/yast/yast-online-update/blob/master/src/online_update_select.ycp#L286.

Fixed for Factory.

About the "ignore recommended", I think the code does nothing wrong now, please check the default in pkg bindings
Comment 12 Ladislav Slezák 2013-07-15 12:57:32 UTC
I have checked pkg bindings and it should be enabled by default:
https://github.com/yast/yast-pkg-bindings/blob/master/src/PkgFunctions.cc#L101

It seems that the problem is in the Qt-pkg selector, it saves/loads the setting from a file with "false" default, see https://github.com/libyui/libyui-qt-pkg/blob/master/src/YQPackageSelector.cc#L1728

Thomas, could you change the default to "true"?
Comment 13 Ladislav Slezák 2013-07-15 13:01:36 UTC
Or even better, you should get the default from libzypp, like for the systemVerification flag: https://github.com/libyui/libyui-qt-pkg/blob/master/src/YQPackageSelector.cc#L1723
Comment 14 Thomas Göttlicher 2013-07-16 09:15:08 UTC
Fixed in libyui-qt-pkg version 2.42.11.
Comment 15 Thomas Göttlicher 2013-07-19 08:37:16 UTC
.
Comment 16 Martin Vidner 2015-06-24 14:13:50 UTC
(Just cross checking the code references because of bug 902394)

Comment 11:
> > The YOU module just checks if there is something to install/remove, if not than it does not call the commit so the locks are not saved, see
> > https://github.com/yast/yast-online-update/blob/master/src/online_update_select.ycp#L286.
> Fixed for Factory.

The fix was https://github.com/yast/yast-online-update/commit/b5671ae04bcc1e84c57fc441ce0bcd79321e04e8

Comment 12:
> I have checked pkg bindings and it should be enabled by default:
https://github.com/yast/yast-pkg-bindings/blob/6f1a9e6fcd1c2b392fd369fb8725db852c76c705/src/PkgFunctions.cc#L101
fixing https://bugzilla.opensuse.org/show_bug.cgi?id=668588

Comment 14:
> Fixed in libyui-qt-pkg version 2.42.11.
https://github.com/libyui/libyui-qt-pkg/commit/5839554fd18f274d579e27b56e60bc3ffc9245de