1 |
>>>>> On Tue, 15 Sep 2015, Ulrich Mueller wrote: |
2 |
|
3 |
>>> We consider 5.01 and 5.010 as equal versions. |
4 |
|
5 |
>> And do we still plan to keep them equal when we fix =*? |
6 |
|
7 |
> Yes. |
8 |
|
9 |
>> Would that mean 5.1 is the same as 5.10? |
10 |
|
11 |
> No. |
12 |
|
13 |
> RTFPMS, all the rules for version comparison are there: |
14 |
> https://projects.gentoo.org/pms/5/pms.html#x1-290003.3 |
15 |
|
16 |
Well, maybe the following is easier to remember. The general idea is |
17 |
that if any component (except for the first) starts with a 0 then it |
18 |
is considered a floating point number. Therefore: |
19 |
|
20 |
5.1 < 5.10 (neither starts with a 0) |
21 |
5.01 = 5.010 |
22 |
5.010 < 5.10 (first one starts with a 0) |
23 |
5 = 05 (first component always uses integer comparison) |
24 |
5.1_beta2 = 5.1_beta02 (suffixes always use integer comparison) |
25 |
|
26 |
However, the rule also applies if there are additional components |
27 |
before or after the one with the leading zeros, for example: |
28 |
|
29 |
5.01.2 = 5.010.2 |
30 |
5.6.01 = 5.6.010 |
31 |
|
32 |
Ulrich |