Version comparison algorithm

Gustavo Niemeyer gustavo at niemeyer.net
Fri Nov 24 11:05:46 PST 2006


> I am curious, why does it think "23" is higher than "jen37"?
> Upgrading packages (2):
>   kernel-default-2.6.18.2-23 at i586
>     Upgrades:
>       kernel-default-2.6.18.2-jen37b at i586 (upgraded)
>       kernel-default-2.6.18.2-jen37 at i586 (upgraded)
>       kernel-default-2.6.18.2-jen37c at i586 (upgraded)
>   kernel-source-2.6.18.2-23 at i586
>     Upgrades:
>       kernel-source-2.6.18.2-jen37c at i586 
> 
> Is [a-z] considered to be < than [0-9]?

According to RPM's algorithm, yes.  It depends on the backend
used really (RPM vs. DEB vs. ...).

-- 
Gustavo Niemeyer
http://niemeyer.net



More information about the Smart mailing list