1 |
On Sat, 27 Nov 2004, Gustavo Barbieri wrote: |
2 |
|
3 |
> Some packages use numbering version padded with zero, that's good to |
4 |
> list with shell functions, but it's bad because you can't change them |
5 |
> to numbers and them back to string. For example: |
6 |
> mail-mta/nullmailer-1.00_rc7-r4. If you Convert it to integers, it |
7 |
> becomes 1.0 and you can't map back to the ebuild. |
8 |
|
9 |
It's worse than that. They're not always integers. It's safest to |
10 |
treat version numbers as strings as much as possible; when one needs to |
11 |
break them into integer portions, do this for comparison only, and save |
12 |
the original. Finally, a number of packages would require that you |
13 |
provide a mechanism for determining all version numbers that aren't |
14 |
strictly numeric. Openssl, with its \d+.\d+.\d+[a-z] versions is easy. |
15 |
hddtemp, with its alpha/beta tags, is doable but tedious. |
16 |
|
17 |
There may be others which are more problematic. I haven't seen Gentoo |
18 |
using them, but many kernels are distributed with -[a-z][a-z]\d+ |
19 |
versions, which indicate which alternate maintainer managed the |
20 |
additional patches beyond the standard kernel version - which is newer, |
21 |
-mm5 or -bk15? The world may never know. (It's only determinate for |
22 |
specific kernel versions, and frequently it's an apples and lemonade |
23 |
comparison, as they don't address the same issues.) |
24 |
|
25 |
Ed |
26 |
|
27 |
-- |
28 |
gentoo-portage-dev@g.o mailing list |