linux user group brescia

immagine del castello

Archivio della mailing list

RedHat 8 updates?

Enrico Colombini erix a erix.it
Mer 5 Mar 2003 08:47:46 UTC
On Tuesday 04 March 2003 23:36, Maurizio Paolini wrote:
> 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.

Ah, proprio come temevo. Beh, se il confronto e' comunque inaffidabile, visto 
che si tratta di un "quick & dirty" ripieghero' a malincuore su un semplice 
!=.

  .Erix.




Maggiori informazioni sulla lista Lug