rpm version comparison (as I understand it) I got this from rpm-devel-4.0.2: lib/misc.c int rpmvercmp(const char * a, const char * b) RULES: 1) higher epoch wins (is newer) 2) no epoch is the lowest epoch 3) version is broken into "chunks" a) chunks are compared left to right b) a chunk is any continuous alphabetical OR numerical string (CHUNKS: 'a', 'abc', '24' NON-CHUNKS: 'a3', '1.4') c) chunk delimiters can be anything non-alphanumeric, INCLUDING a boundary between a letter and number! 4) chunks of different type (one letter, one number) compare as different, but ARBITRARY in rank! 5) chunk of same type are compared normally ( 'a' < 'd', '3' < '6' ) 6) if only delimiters are different, packages are "same" 7) of all chunks of one package match the first part the other, the longer version is newer 8) package version breaks software version ties EXAMPLES: [EPOCH:]VERSION[-PACKAGE_VERSION] 3:3.4.6 > 2:3.4.6 (1) 3:3.4.6 > 3.4.6 (2) 3.4 ? 3.A.4 (4) (4 is compared to A) 3.4 ? 3A4 (4) (Same as above) 3.5 > 3.6 (5) 3.4 == 3=4 (6) (but just use ".", really) 3.4.6 > 3.4 (7) 3.4-1 < 3.4-5 (8)