Bug 437854

Summary: zypper info gives incorrect result
Product: [openSUSE] openSUSE 11.1 Reporter: Dave Plater <davejplater>
Component: libzyppAssignee: Jan Kupec <jkupec>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P3 - Medium CC: dmacvicar
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: zypper.log compressed

Description Dave Plater 2008-10-22 18:34:29 UTC
zypper if libzypp gives the following result if a repository with a higher priority but lower version is enabled:-
# zypper if libzypp
Loading repository data...
Reading installed packages...


Information for package libzypp:

Repository: local
Name: libzypp
Version: 5.13.1-1.2
Arch: i586
Vendor: openSUSE Build Service
Installed: Yes
Status: up-to-date
Installed Size: 5.8 M
Summary: Package, Patch, Pattern, and Product Management
Description:
Package, Patch, Pattern, and Product Management

and if I disable repo local then the output is:-
# zypper if libzypp
Loading repository data...
Reading installed packages...


Information for package libzypp:

Repository: factory
Name: libzypp
Version: 5.16.1-2.2
Arch: i586
Vendor:
Installed: Yes
Status: up-to-date
Installed Size: 5.8 M
Summary: Package, Patch, Pattern, and Product Management
Description:

rpm -qa|grep libzypp shows that libzypp-5.16.1-2.2 is installed. Notice the empty "Description" field below the actual summary if the local repo is disabled.
Comment 1 Dave Plater 2008-10-22 18:52:52 UTC
Priority for repository local is 50 and priority for repository factory is 120. I have set the priorities thus in an attempt to prevent downloading of packages that I already have stored locally.
Comment 2 Jan Kupec 2008-10-23 13:07:38 UTC
Zypper is supposed to show the best available version here (but see also bug #357264). I guess this bug is because i incorrectly used ui::Selectable::theObj() to get the the best version, fooled by it's docs and by a few successful tests. I'll check this.
Comment 3 Dave Plater 2008-10-23 13:44:59 UTC
Just checked with and without local repo enabled on out of date kdebase3 and get this output:-
Repository: local
Name: kdebase3
Version: 3.5.10-14.1
Arch: i586
Vendor: openSUSE Build Service
Installed: Yes
Status: up-to-date
Installed Size: 51.5 M
Summary: The KDE Core Components
Description:
This package contains kdebase, one of the basic packages of the K
Desktop Environment. It contains, among others, kwin (the KDE window
manager), Konqueror (the KDE Web browser), and KControl (the
configuration program)

This package is needed if you want to use the KDE Desktop. It is not
needed if you only want to start some KDE applications.

and without local:-
Repository: factory
Name: kdebase3
Version: 3.5.10-15.15
Arch: i586
Vendor:
Installed: Yes
Status: out-of-date (version 3.5.10-14.1 installed)
Installed Size: 51.5 M
Summary: The KDE Core Components
Description:
This package contains kdebase, one of the basic packages of the KDesktop Environment. It contains, among others, kwin (the KDE windowmanager), Konqueror (the KDE Web browser), and KControl (the configuration program)

This package is needed if you want to use the KDE Desktop.It is not needed if you only want to start some KDE applications.

local repo contains all of my beta 2 packages. Yast2 software management has the same problem, it shows no updates if local is enabled and updates if only factory is enabled. I will attach zypper.log in case you need it.
Comment 4 Dave Plater 2008-10-23 13:46:15 UTC
Created attachment 247497 [details]
zypper.log compressed
Comment 5 Dave Plater 2008-10-24 14:21:22 UTC
If factory and local repositories have the same priority then factory's newer version is shown.
Comment 6 Dave Plater 2008-10-29 08:37:18 UTC
Just a thought, this libzypp behavior, due to priority settings, might be good in a case where one wishes to only have packman or videolan versions of a package.
Comment 7 Duncan Mac-Vicar 2008-11-03 12:42:40 UTC
Jano, feel free to close as WONTFIX if this is the desired behavior.
Comment 8 Jan Kupec 2008-11-12 10:14:40 UTC
*** Bug 444051 has been marked as a duplicate of this bug. ***
Comment 9 Dave Plater 2008-11-12 13:12:10 UTC
I tried install -r kernel, the only command that would install kernel-source was dup. I can uninstall and make dup --debug-solver if wanted.
Comment 10 Dave Plater 2008-11-12 13:58:52 UTC
Here's a clue the kernel-pae packages are 2.6.27.5-1.1.i586 and the source is kernel-source-2.6.27.5-2.1.i586 The versions are so close I didn't notice.
Comment 11 Dave Plater 2008-11-12 14:08:01 UTC
Zypper now refuses to install kernel-pae-2.6.27.5-2.2 packages as well, it must be something to do with the version numbers. I'll save a solver test case and am going to use yast.
Comment 12 Dave Plater 2008-11-12 14:10:38 UTC
Will upload solver test case if needed
Comment 13 Jan Kupec 2008-11-12 14:18:21 UTC
Dave, try also 'zypper in kernel-pae-2.6.27.5-2.2' (with the exact version you want to install).
Comment 14 Dave Plater 2008-11-12 14:33:45 UTC
The kernel binary packages differ in build number from the source packages in factory and have all day. I'm going to wait until factory settles into something more consistent. I need matching sources for nvidia driver and kernel update for bug 439126 and bug 440891 test.
Comment 15 Jan Kupec 2008-11-17 23:00:56 UTC
(In reply to comment #7 from Duncan Mac-Vicar Prett)
> Jano, feel free to close as WONTFIX if this is the desired behavior.

It probably is, but it is suprising as well :O) see http://lists.opensuse.org/zypp-devel/2008-11/msg00019.html
Comment 16 Jan Kupec 2008-11-18 08:31:12 UTC
I changed it back to show the best available version regardless of repo priorities.
Comment 17 Jan Kupec 2008-11-18 15:11:28 UTC
submitted