Bug 482307

Summary: higher version of package not seen in zypper up
Product: [openSUSE] openSUSE 11.2 Reporter: Michal Zugec <mzugec>
Component: libzyppAssignee: Jan Kupec <jkupec>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Enhancement    
Priority: P4 - Low CC: aj, jnelson-suse, ma
Version: Alpha 0   
Target Milestone: unspecified   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: attached zypper.testcase.tgz

Description Michal Zugec 2009-03-05 10:15:34 UTC
urchin:/home/mzugec/svn/trunk/network # zypper se -s yast2-pkg-bindings                             
Loading repository data...                                                                          
Reading installed packages...                                                                       

S | Name                         | Type       | Version        | Arch   | Repository      
--+------------------------------+------------+----------------+--------+-----------------
i | yast2-pkg-bindings           | package    | 2.17.29-1.9    | i586   | openSUSE11.1    
v | yast2-pkg-bindings           | package    | 2.17.31-1.2.10 | i586   | Updates for 11.1
  | yast2-pkg-bindings           | srcpackage | 2.17.31-1.2.10 | noarch | Updates for 11.1
  | yast2-pkg-bindings-devel-doc | package    | 2.17.29-1.9    | noarch | openSUSE11.1    
  | yast2-pkg-bindings-devel-doc | package    | 2.17.31-1.2.1  | noarch | Updates for 11.1
  | yast2-pkg-bindings-devel-doc | srcpackage | 2.17.31-1.2.1  | noarch | Updates for 11.1
urchin:/home/mzugec/svn/trunk/network # zypper up                                         
Loading repository data...                                                                
Reading installed packages...                                                             
Nothing to do.                                                                            
urchin:/home/mzugec/svn/trunk/network # zypper dup
Loading repository data...                        
Reading installed packages...                     
Computing distribution upgrade...                 
Nothing to do.
urchin:/home/mzugec/svn/trunk/network # zypper in yast2-pkg-bindings
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following package is going to be upgraded:
  yast2-pkg-bindings


Overall download size: 526.0 K. After the operation, additional 4.0 K will be used.
Continue? [YES/no]: yes
Retrieving package yast2-pkg-bindings-2.17.31-1.2.10.i586 (1/1), 526.0 K (1.8 M unpacked)
Retrieving delta: ./rpm/i586/yast2-pkg-bindings-2.17.29_2.17.31-1.9_1.2.10.i586.delta.rpm, 185.0 K
Retrieving: yast2-pkg-bindings-2.17.29_2.17.31-1.9_1.2.10.i586.delta.rpm [done]
Applying delta: ./yast2-pkg-bindings-2.17.29_2.17.31-1.9_1.2.10.i586.delta.rpm [done]
Installing: yast2-pkg-bindings-2.17.31-1.2.10 [done]
Comment 1 Michal Zugec 2009-03-05 10:18:47 UTC
Created attachment 277282 [details]
attached zypper.testcase.tgz

attached zypper.testcase.tgz
Comment 2 Michael Andres 2009-03-05 15:27:17 UTC
The 'updates' repository has priority 120 (least of all repos). Thus up/dup would consider the repo only iff there was no yast2-pkg-bindings in any of the other repos. But there is one in openSUSE11.1.

If you want the 'updates' repository to be considered, it should not have a lower priority.



(The actual 'bug' might be that 'zypper in yast2-pkg-bindings' performs. Actually 'zypper up/in yast2-pkg-bindings' should not require 'yast2-pkg-bindings > 2.17.29', but ask the solver to 'update yast2-pkg-bindings'. The later would honor the repo priorities and return 'up to date'. But this interface is not yet provided.)

@Jano: Maybe you can incorporate the repo priority into the search output? So one could recognize that certain packages will not be considered per default.
Only the package versions with the same and highest priority are. 

Otherwise this is INVALID.
Comment 3 Jan Kupec 2009-04-07 18:20:18 UTC
I'll improve the output as soon as the Easy API is available in libzypp.

See http://lists.opensuse.org/zypp-devel/2009-03/msg00024.html - this very bug is described there:

-----8<-------
More complex example would be bnc #482307: there is a higher version of
a package available, but in repo with lower priority. In GUI, if you
wondered why it does not upgrade a package, you could check the Versions
tab, and you could click to choose the version. In CLI, e.g. when you do
'zypper up foo' it should tell you "no update candidate for foo found"
plus a hint "foo x.y.z is available in repository 'bar' which has
priority X. Use 'zypper in foo-x.y.z' or whatever to install that
package.". The following could help.
-----8<-------
Comment 4 Jan Kupec 2009-06-16 08:48:06 UTC
Changing to enhancement, it's not really a bug.
Comment 5 Jan Kupec 2009-06-16 15:21:06 UTC
*** Bug 513441 has been marked as a duplicate of this bug. ***
Comment 6 Jan Kupec 2010-03-18 17:46:14 UTC
Fixed in 1.4.0 oS 11.3 and 1.3.2 for oS 11.2.

zypper in package
zypper up package
zypper up

All these commands provide additional info about which packages won't get
updated and 'zypper in/up package' also says why.

-----------------------------------------------------
$ LANG=C zypper in amarok faac
Loading repository data...
Reading installed packages...
'amarok' is already installed.
There is an update candidate for 'amarok', but it is locked. Use 'zypper
removelock amarok' to unlock it.
'faac' is already installed.
There is an update candidate for 'faac', but it is from different vendor. Use
'zypper install faac-1.28-1.pm.2.1.x86_64' to install this candidate.
Resolving package dependencies...

Nothing to do.
-----------------------------------------------------
$ LANG=C zypper up amarok faac
Loading repository data...
Reading installed packages...
There is an update candidate for 'amarok', but it is locked. Use 'zypper
removelock amarok' to unlock it.
There is an update candidate for 'faac', but it is from different vendor. Use
'zypper install faac-1.28-1.pm.2.1.x86_64' to install this candidate.
Resolving package dependencies...

Nothing to do.
-----------------------------------------------------
$ LANG=C zypper up                                                   
Loading repository data...                                                 
Reading installed packages...                                           

The following package updates will NOT be installed:
  DirectFB amarok amarok-lang boost-devel boost-license1_39_0 
  cairo cmake faac fate ffmpeg gparted                        
  gstreamer-0_10-plugins-base gstreamer-0_10-plugins-base-lang 
  gstreamer-0_10-plugins-good gstreamer-0_10-plugins-good-lang 
  k3b k3b-codecs k3b-lang kaffeine kaffeine-lang knemo         
  ktorrent ktorrent-lang libGLEW1_5 libSDL-1_2-0               
  libSDL_image-1_2-0 libSDL_mixer-1_2-0 libavcodec52           
  libavdevice52 libavformat52 libavutil50                      
  libboost_date_time1_39_0 libboost_filesystem1_39_0           
  libboost_graph1_39_0 libboost_iostreams1_39_0                
  libboost_math1_39_0 libboost_mpi1_39_0                       
  libboost_program_options1_39_0 libboost_python1_39_0         
  libboost_regex1_39_0 libboost_serialization1_39_0            
  libboost_signals1_39_0 libboost_system1_39_0                 
  libboost_test1_39_0 libboost_thread1_39_0                    
  libboost_wave1_39_0 libcaca0 libfaac0 libffmpegthumbnailer4  
  libgstapp-0_10-0 libmikmod libpostproc51 libqjson0           
  libquicktime0 libspeex1 libswscale0 libtheora0 libv4l        
  libwavpack1 libxine1 libxine1-codecs libxine1-gnome-vfs      
  osc-plugin-overview perl-HTML-Encoding perl-HTML-Tidy        
  perl-SGML-Parser-OpenSP perl-Set-IntSpan perl-WWW-Curl       
  photorec pingus ppracer python-numpy rar ruby-mysql          
  rubygem-haml rubygem-paperclip rubygem-postgres              
  rubygem-sqlite3 wavpack                                      

The following NEW packages are going to be installed:
  libx264-88 perl-String-Approx rubygem-enhancerepo  
  rubygem-trollop                                    

The following package is going to be REMOVED:
  enhancerepo                                

The following packages are going to be upgraded:
  2ManDVD MPlayer MozillaThunderbird            
  MozillaThunderbird-translations-other         
  OpenOffice_org-components OpenOffice_org-libs-core 
  OpenOffice_org-libs-extern OpenOffice_org-libs-gui
  OpenOffice_org-mailmerge OpenOffice_org-math
  OpenOffice_org-writer cron dvdauthor enigmail gstreamer-0_10
  gstreamer-0_10-lang hypermail lame libblas3
  libgstinterfaces-0_10-0 libgstreamer-0_10-0 liblapack3
  libmp3lame0 liboil-0_3-0 libopenal1-soft mjpegtools
  python-ReportLab python-m2crypto ruby-rpm ruby-xml-smart
  rubygem-actionmailer-2_3 rubygem-actionpack-2_3
  rubygem-activerecord-2_3 rubygem-activeresource-2_3
  rubygem-activesupport-2_3 rubygem-gem2rpm rubygem-gemcutter
  rubygem-hoe rubygem-icalendar rubygem-json_pure
  rubygem-maruku rubygem-mechanize rubygem-mocha
  rubygem-nokogiri rubygem-rack rubygem-rails
  rubygem-rails-2_3 rubygem-rake rubygem-rubyforge
  rubygem-syntax rubygems sane-frontends smplayer
  w3c-markup-validator w3c-markup-validator-libs wireshark
  xorg-x11-driver-input xorg-x11-driver-video youtube-dl

59 packages to upgrade, 4 new, 1 to remove.
Overall download size: 138.8 MiB. After the operation,
additional 1.1 MiB will be used.
Continue? [y/n/?] (y):
Comment 7 Jan Kupec 2010-03-18 17:46:31 UTC
*** Bug 555296 has been marked as a duplicate of this bug. ***