Re: apt-rpm and vesion precedence

Panu Matilainen <[email protected]> Thu, 11 May 2006 07:37:16 -0700 (PDT)
Newsgroups gmane.linux.conectiva.apt-rpm
Message-ID <[email protected]>
On Thu, 11 May 2006, Rex Dieter wrote:

> Panu Matilainen wrote:
>> On Thu, 11 May 2006, Rex Dieter wrote:
>> 
>>> Panu Matilainen wrote:
>>>> On Thu, 11 May 2006, Yannick Patois wrote:
>>> 
>>>>> But when I try to upgrade:
>>>>> # apt-get upgrade
>>>>> Reading Package Lists... Done
>>>>> Building Dependency Tree... Done
>>>>> The following packages will be upgraded
>>>>>   apt-sourceslist (303-8.ires1 => 30X-10.cern)
>>>>> 
>>>>> Why is the 30X-10.cern selected first?
>>> 
>>>> Version comparisons involving strings are depend to some extent on the 
>>>> used rpm versions, but yes I think 1:30X-10.ires should be considered as 
>>>> newer than 1:30X-10.cern by rpm 4.2.x
>>> 
>>> I think rpm treats stings (kinda) like #'s.  Since ires1 is *longer* than 
>>> .cern, ires1 is treated as being larger, for the same reason as 10000 is 
>>> larger/newer than 9000, even though the first "digit" is smaller.
>> 
>> Yes, ires1 would be larger, but the question as I understood it was why 
>> 1:30X-cern is selected over 1:30X-ires (not ires1). AFAICT getting that 
>> behavior requires pinning to be active.
>
> oops, my bad.  Taking a closer look:
> apt-sourceslist (303-8.ires1 => 30X-10.cern)
>                 ^^^            ^^^
> Note the 303 -> 30X upgrade.  Though this too is confusing, since I thought 
> #'s were treated as higher than alpha's.  Or is the 303 bogus?

If you look a bit more carefully still :) you'll see there's an epoch 
involved in that 303 -> 30X upgrade:

1:30X-10.ires(/var/state/apt/lists/sbglinux.in2p3.fr_ires_slc30X_i386_base_p
kglist.ires)
1:30X-10.cern(/var/state/apt/lists/sbglinux.in2p3.fr_mirror_cern_slc30X_i386
_apt_base_pkglist.updates)
303-8.ires1(/var/state/apt/lists/sbglinux.in2p3.fr_ires_slc30X_i386_base_pkg
list.ires)(/var/lib/rpm/Packages)

 	- Panu -