1 |
Marius Mauch wrote: |
2 |
> But like name_splitted.cpp is buggy as it assumes that a dash followed |
3 |
> by a digit starts the version part. See |
4 |
> echo ${PORTDIR}/*-*/* | tr ' ' '\n' | grep '\-[[:digit:]]' |
5 |
> for some names that break the assumption. |
6 |
> |
7 |
Whoops :S Guess I need to change that then :) |
8 |
|
9 |
> And no clue what that cvs stuff is supposed to do, as there are no |
10 |
> packages using that naming pattern, and the (unused) cvs versioning |
11 |
> extension in portage-2.1 also uses a different pattern. |
12 |
> |
13 |
Well the line from portage_versions.py is: |
14 |
ver_regexp = re.compile("^(cvs\\.)?(\\d+)((\\.\\d+)*)([a-z]?)((_(pre|p|beta |
15 |
alpha|rc)\\d*)*)(-r(\\d+))?$") |
16 |
- which means that a version begins with either a digit or cvs followed by |
17 |
digit. |
18 |
We represented this in bash (for verCompare) as: |
19 |
ver='^(cvs\.)?([0-9]+)((\.[0-9]+)*)([a-z]?)((_(pre|p|beta|alpha|rc)[0-9]*)* |
20 |
(-r([0-9]+))?$' |
21 |
For inter-rev compatibility, we changed the last term to: (-r([0-9.]+))? |
22 |
(we check that there's only one . later.) [We should also use [[:digit:]] |
23 |
instead of [0-9] for i18n.] |
24 |
|
25 |
I think we can use: |
26 |
CPV='^(.*-.*)/(.*)-(cvs\.)?([0-9]+)((\.[0-9]+)*)([a-z]?)((_(pre|p|beta |
27 |
alpha|rc)[0-9]*)*)(-r([0-9.]+))?$' |
28 |
- as a regex to check against. If it doesn't match, it isn't a valid cpv (I |
29 |
think.) I've tested it on the whole (non-overlay) tree with the following |
30 |
script: |
31 |
http://dev.gentooexperimental.org/~igli/src/verCheck |
32 |
md5: 53ef36ffd9388308ff02306f301382c1 |
33 |
It's called with ./verCheck to check the whole tree, or with an optional |
34 |
[cat-search] parameter, eg ./verCheck media-fonts or ./verCheck 'media-*' |
35 |
Adding -v as the first parameter means it will output version info for all |
36 |
ebuilds it finds, otherwise it will only output for packages with the |
37 |
tricky pattern -[0-9] |
38 |
|
39 |
Any ebuilds that don't match, get output to stderr. I didn't find any, and |
40 |
for all the ones it found with -N in the package name, it seemed to get the |
41 |
correct version numbers, afaict: |
42 |
$ ./verCheck |
43 |
|
44 |
app-dicts: |
45 |
canna-2ch 20030827 |
46 |
media-fonts: |
47 |
font-adobe-100dpi 1.0.0 |
48 |
font-adobe-75dpi 1.0.0 |
49 |
font-adobe-utopia-100dpi 1.0.1 |
50 |
font-adobe-utopia-75dpi 1.0.1 |
51 |
font-bh-100dpi 1.0.0 |
52 |
font-bh-75dpi 1.0.0 |
53 |
font-bh-lucidatypewriter-100dpi 1.0.0 |
54 |
font-bh-lucidatypewriter-75dpi 1.0.0 |
55 |
font-bitstream-100dpi 1.0.0 |
56 |
font-bitstream-75dpi 1.0.0 |
57 |
net-dialup: |
58 |
intel-536ep 4.71 |
59 |
net-misc: |
60 |
cisco-vpnclient-3des 4.6.02.0030 4.6.03.01901 4.7.00.0640 4.7.00.06401 |
61 |
4.8.00.0490 |
62 |
nxclient-2xterminalserver 1.5.0 |
63 |
nxserver-2xterminalserver 1.5.0 |
64 |
|
65 |
(No, UberLord: it /won't/ work in sh ;p) |
66 |
|
67 |
|
68 |
-- |
69 |
gentoo-dev@g.o mailing list |