[lug] rpm version comparison

Sean Reifschneider jafo at tummy.com
Thu Jun 6 17:00:45 MDT 2002


On Thu, Jun 06, 2002 at 11:33:12AM -0600, John Hernandez wrote:
> > and perl-5.6 is "older" than perl-5.00503 because the number 6 si 
>less than
> > the number 503.
>
>The way I read it, the answer would be that gdb-5.0rh-5 is newer version.

This doesn't address the "epoch" of a package, which usually doesn't show
up in the package version.  The epoch trumps the version.  So, taking for
example:

   [2] guin:jafo# rpm -qa --queryformat '%{name} %{epoch} %{version}\n' | tail
   glibc (none) 2.2.4
   fetchmail (none) 5.9.11
   grip 1 3.0.0
   ppp (none) 2.4.1
   python2-tools (none) 2.2.1
   tcpdump 13 3.6.2
   krud-release (none) 20020501
   rsync (none) 2.5.4
   mozilla-psm 35 1.0.0
   gnome-vfs-devel (none) 1.0.3.90

you see that "grip" has an epoch of 1.  So, grip version "3.0.0 epoch 1" is
more recent than, for example, grip "4.3.2 epoch 0".

The epoch is simply a mechanism to force resolution of issues caused by
changing or otherwise funky naming schemes.

For example, python 2.2.1c3 taken without an epoch would be *MORE RECENT*
than 2.2.1.  However, in the Python release process, 2.2.1c3 is the third
release canidate, and is therefore younger than 2.2.1 proper.

Sean
-- 
 You think your Commodore 64 is really neato.
 What kinda chip you got in there, a Dorito?  -- Weird Al
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python



More information about the LUG mailing list