Re: apt-rpm and vesion precedence

Panu Matilainen <[email protected]> Thu, 11 May 2006 06:23:37 -0700 (PDT)
Newsgroups gmane.linux.conectiva.apt-rpm
Message-ID <[email protected]>
On Thu, 11 May 2006, Yannick Patois wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I've a problem with rpm and apt-rpm regarding deciding what is an
> "upgrade" of a given package.
>
> apt-get seems not able to properly choose the most recent version in
> some case (even if they seems to be well ordered).
>
> In my case:
> # rpm --version
> RPM version 4.2.3
> # apt-get --version
> apt 0.5.15cnc6 for linux i386 compiled on Nov  5 2004 14:38:19
>
> # apt-cache showpkg apt-sourceslist
> Package: apt-sourceslist
> Versions:
> 1:30X-10.ires(/var/state/apt/lists/sbglinux.in2p3.fr_ires_slc30X_i386_base_pkglist.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_pkglist.ires)(/var/lib/rpm/Packages)
> [...]
>
> I think that the order of the pkgs above is by decrescent upgrade, and
> it seems fine, for now: 1:30X-10.ires is bigger than 1:30X-10.cern
> because 'i'>'c', right?

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

>
> 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?

In apt other things can affect the package selections, namely pinning in 
various forms. What does 'apt-cache policy apt-sourceslist' output?

 	- Panu -