Bug 704123

Summary: When updating packages, same version numbers in different repositories confuse YaST (and zypper?)
Product: [openSUSE] openSUSE 11.4 Reporter: Forgotten User vrBbBW-brJ <forgotten_vrBbBW-brJ>
Component: YaST2Assignee: Thomas Göttlicher <tgoettlicher>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: bin, gs, tgoettlicher
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.4   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Part 1 of Solver testcase from YaST menu Extras/Generate_Dependency_Resolver_Test_Case
Part 2 of Solver testcase from YaST menu Extras/Generate_Dependency_Resolver_Test_Case
Part 3 of Solver testcase from YaST menu Extras/Generate_Dependency_Resolver_Test_Case

Description Forgotten User vrBbBW-brJ 2011-07-06 11:58:04 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.19) Gecko/20110420 SUSE/2.0.14-0.2.1 SeaMonkey/2.0.14

This problem occured several times before, currently it is relevant for package libeigen2-devel which is installed from http://download.opensuse.org/repositories/KDE:/Release:/46/openSUSE_11.4 with version number 2.0.16-16.1-x86_64. Now, an update to version 2.0.16-17.1-x86_64 is available from that same repository, but with that version number the package is also available from http://download.opensuse.org/repositories/Education/openSUSE_11.4/ . YaST seems to be trying to update to that second variant and cannot be forced to choose the correct one without disabling the unwanted repo. Actually, whenever the same version number of packages to be upgraded appears in two repositories, YaST seems to be choosing the wrong one (at least I have never seen it choose the right one in these cases). The same problem may be present in zypper, please instruct me what commands I will have to issue to check this (as I am not a regular zypper user).

Reproducible: Always

Steps to Reproduce:
1. Start YaST2, make sure the relevant repos are set up (not sure if order in which repos are added and/or repo naming is relevant), then go to software installation module.
2. Either go to package menu and select all packages - update if newer version is available, or search for e.g. libeigen2. Look at Versions tab for libeigen2-devel.
3. According to versions tab, 2.0.16-16.1-x86_64 is installed from obs://build.opensuse.org/KDE, build service KDE4.6 with priority 94 as well as build service Education with priority 100 provides 2.0.16-17.1-x86_64, radio button for Education is checked.
4. Check KDE4.6 button (optionally choose to update package, which you will have done anyway when using the menu method above), leave tab and come back.
Actual Results:  
Education button gets checked again, and probably the package will be upgraded from the wrong repo (never let it go this far when the same problem occured with other packages in the past).

Expected Results:  
There should not be a vendor change unless that has been selected using the radio buttons, and if a certain repo has been selected, the selection should not automagically change to some other repo just because that provides the same version number.

To temporarily fix the problem, the unwanted repo can (read: has to) be disabled before trying to upgrade the package.
Comment 1 Michael Andres 2011-07-07 15:02:11 UTC
(In reply to comment #0)
> 2. Either go to package menu and select all packages - update if newer version
> is available, or search for e.g. libeigen2. Look at Versions tab for
> libeigen2-devel.

Thomas: How does th UI implement this?
Comment 2 Thomas Göttlicher 2011-08-03 14:28:23 UTC
(In reply to comment #1)
> Thomas: How does th UI implement this?

The UI sets the item's status to S_Update if item->candidateIsNewer() && item->status() != S_Protected .

See YQPkgObjList::setAllItemStatus( ZyppStatus newStatus, bool force ) in http://svn.opensuse.org/svn/yast/trunk/qt-pkg/src/YQPkgObjList.cc and YQPkgList::globalSetPkgStatus( ZyppStatus newStatus, bool force, bool countOnly ) in http://svn.opensuse.org/svn/yast/trunk/qt-pkg/src/YQPkgList.cc .
Comment 3 Haro de Grauw 2011-09-24 22:39:36 UTC
Hi, I also noticed the same thing.

Example situation today:

Currently installed: timidity 2.13.2-266.1-x86_64 vendor openSUSE
Available update: timidity 2.13.2-266.1-x64_46 vendor openSUSE-Education
Available update: timidity 2.13.2-266.1-x64_46 vendor obs://build........

All repositories at default priority (99).

When I click "All packages --> Update if newer version available", the version from BuildService is selected, with vendor change. Option "Allow vendor change" is unchecked in YaST and untouched in zypp.conf.

When running "zypper list-updates" the same update is also selected so it appears to be a zypper problem.

Other situation:

Currently installed: frozen-bubble 2.2.0-11.1-x86_64 vendor openSUSE
Available update repo#1 frozen-bubble 2.2.0-26.1-x86_64 vendor obs://build....
Available update repo#2 frozen-bubble 2.2.0-26.1-x86_64 vendor obs://build....

In this case, the same update package (wrong vendor, but twice the SAME vendor) is available from two different repositories. Neither YaST nor zypper propose the update, so the problem seems to arise specifically when an update is available from two distinct (wrong) VENDORS.

Hope this helps, greetings to all three.
Comment 5 Michael Andres 2011-09-26 07:57:26 UTC
s/COuls/Could/
Comment 6 Forgotten User vrBbBW-brJ 2012-03-15 13:29:16 UTC
Created attachment 481608 [details]
Part 1 of Solver testcase from YaST menu Extras/Generate_Dependency_Resolver_Test_Case

Now that's a good deal of information you are collecting about my system...

Anyway, the bug currently affects libcurl4 (which I would like to have replaced by version 7.23.1-64.1-x86_64 from http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_11.4/ with priority 94 rather than http://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_11.4/ with priority 96, but the radio button changes to the latter on the versions tab when I leave that package and return to it), libproj0 (which will be updated to 4.8.0-19.1-x86_64 from http://download.opensuse.org/repositories/home:/beyerle:/IAC/openSUSE_11.4/ rather than http://download.opensuse.org/repositories/home:/ocefpaf/openSUSE_11.4/ where the current version comes from, both with priority 98), and python-configobj (which will be updated to 4.7.2-24.1-noarch from http://download.opensuse.org/repositories/home:/beyerle:/IAC/openSUSE_11.4/ with priority 98 rather than http://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_11.4/ with priority 96, again the latter being the source of the currently installed version).

Note that the vendor information for the libcurl4 version that always gets automatically selected mentions the obs://... address of the repo actually intended, but that does not match the repo name (unlike the other cases where it matches the repo name)!

In addition, I am currently experiencing a strange behaviour regarding package libenca0 which is installed from the base OSS repo with priority 99. YaST keeps trying to replace it with version 1.13-19.1-x86_64 from http://download.opensuse.org/repositories/Education/openSUSE_11.4/ with priority 100, and that same version is also available from http://download.opensuse.org/repositories/multimedia:/libs/openSUSE_11.4/ with priority 96 (for which the vendor name openSUSE-Education is given, again not matching the repo name).
Comment 7 Forgotten User vrBbBW-brJ 2012-03-15 13:31:16 UTC
Created attachment 481609 [details]
Part 2 of Solver testcase from YaST menu Extras/Generate_Dependency_Resolver_Test_Case
Comment 8 Forgotten User vrBbBW-brJ 2012-03-15 13:34:52 UTC
Created attachment 481610 [details]
Part 3 of Solver testcase from YaST menu Extras/Generate_Dependency_Resolver_Test_Case

Last of the three parts, generated using
  split -b 10000000 y2logs.tgz y2logs.tgz.
because of size limit of bugzilla.

Need to be concatenated to be usable for tar.
Comment 9 Michael Andres 2012-03-15 18:07:33 UTC
> Now that's a good deal of information you are collecting about my system...

Looks like facebook. As I posted the link, I had the 'zypper in --debug-solver nopackage' output in mind. That's all I need (but it's included). Did not know that YaSt is that greedy.
Comment 10 Michael Andres 2012-03-15 18:31:15 UTC
(In reply to comment #3)
> Currently installed: timidity 2.13.2-266.1-x86_64 vendor openSUSE
> Available update: timidity 2.13.2-266.1-x64_46 vendor openSUSE-Education
> Available update: timidity 2.13.2-266.1-x64_46 vendor obs://build........
> 
> When I click "All packages --> Update if newer version available", the version
> from BuildService is selected, with vendor change. 

UI chooses wrong. 

obs:// version would be a vendor change. Note that 'openSUSE-Education' would be fine (that's probably what zypper has chosen). 
'openSUSE' and 'openSUSE-Education' are per default treated as being equivalent.


> Other situation:
> 
> Currently installed: frozen-bubble 2.2.0-11.1-x86_64 vendor openSUSE
> Available update repo#1 frozen-bubble 2.2.0-26.1-x86_64 vendor obs://build....
> Available update repo#2 frozen-bubble 2.2.0-26.1-x86_64 vendor obs://build....
> 
> In this case, the same update package (wrong vendor, but twice the SAME vendor)
> is available from two different repositories. Neither YaST nor zypper propose
> the update

Which is right.
Comment 11 Michael Andres 2012-03-15 18:48:04 UTC
(In reply to comment #6)

After checking the testcase and a glimpse into the YUI code Thomas mentioned in comment#2, I'm quite convinced that this is a ui issue, no problem in repos, zypp or solver.

(@Thomas: Maybe we can talk about this on Monday.)


> In addition, I am currently experiencing a strange behaviour regarding package
> libenca0 which is installed from the base OSS repo with priority 99. YaST keeps
> trying to replace it with version 1.13-19.1-x86_64 from
> http://download.opensuse.org/repositories/Education/openSUSE_11.4/ with
> priority 100, and that same version is also available from
> http://download.opensuse.org/repositories/multimedia:/libs/openSUSE_11.4/ with
> priority 96 (for which the vendor name openSUSE-Education is given, again not
> matching the repo name).

Something that confused me in the testcase as well, but I checked the repo and it seems to be ok. multimedia:libs actually contains a few packages from Education.

Note that this is the reason for checking for a vendor-change and not for a repo-change. The vendor is immutable inside the rpm package header. openSUSE-Education packages may be updated by openSUSE-Education packages, no matter what kind of repository is used to provide them on you system.
Comment 12 Michael Andres 2012-03-22 10:27:07 UTC
@Thomas: I sent some more info per mail. IMO the UI should roughly selecht this way:


	Selectable sel;
	...

	if ( sel->status()!= S_Protected && sel->updateCandidateObj())
	{
	  if ( ! sel->setOnSystem( sel->updateCandidateObj(), USER(?) ) )
  		// actually this should not fail if you select by USER.
                // If you select by APPL_* this case woud indicate that
                // the user has already chosen a different candidate
                // for install
	  else
		// selected for install
	}
	else
	{
		// best object already installed OR package is locked
	}
Comment 13 Thomas Göttlicher 2012-03-23 10:06:52 UTC
> @Thomas: I sent some more info per mail. IMO the UI should roughly selecht this
> way:
> 
Michael, thank you for your support.

This bug is fixed in yast2-qt-pkg version 2.21.22.
Comment 15 Bernhard Wiedemann 2012-03-27 13:00:15 UTC
This is an autogenerated message for OBS integration:
This bug (704123) was mentioned in
https://build.opensuse.org/request/show/111405 Factory / yast2-ncurses-pkg