linux user group brescia

immagine del castello

Archivio della mailing list

RedHat 8 updates?

Maurizio Paolini paolini a dmf.unicatt.it
Mar 4 Mar 2003 22:36:39 UTC
> From: Enrico Colombini <erix a erix.it>
>
> rpm -qi bash
>  Name      : bash      Relocations: /usr
>  Version   : 2.05b     Vendor: Red Hat, Inc.
>  Release   : 5         Build Date: Fri 23 Aug 2002 10:01:11 PM CEST
>  [ecc.]
>
> mi devo basare sulla versione o sulla data? A logica direi la prima, ma non e' 
Certamente non sulla data.  Pero' il meccanismo su cui si basa l'ordinamento
dei numeri di versione non e' per nulla banale.  Avevo trovato qualcosa
in qualche manuale online che spiegava qualcosa sulla costruzione di un
rpm.  Non ci ho capito granche'!

Ho fatto una veloce ricerca, prova a guardare in 
/usr/share/doc/rpm*/dependencies
Ecco un frammento:

The version
comparison algorithm is in the routine rpmvercmp() and it is just a segmented
strcmp(3).  First, the boundaries of the segments are found using
isdigit(3)/isalpha(3).  Each segment is then compared in order with the
right most segment being the least significant.  The alphabetical
portions are compared using a lexical graphical ascii ordering, the
digit segments strip leading zeroes's and compare the strlen before
doing a strcmp. If both numerical strings are equal, the longer string
is larger.  Notice that the algorithm has no knowledge of decimal fractions,
and perl-5.6 is "older" than perl-5.00503 because the number 6 si less than
the number 503.

mp



Maggiori informazioni sulla lista Lug