Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: sh versionator.eclass
Date: Tue, 02 Oct 2007 09:42:28
Message-Id: 200710020528.00590.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: sh versionator.eclass by Roy Marples
1 On Tuesday 02 October 2007, Roy Marples wrote:
2 > On Mon, 2007-10-01 at 20:22 -0400, Mike Frysinger wrote:
3 > > i'd say that changing
4 > > things from doing a case match against proper character classes to doing
5 > > a printf against arbitrary character ranges (which btw are not locale
6 > > safe, so i imagine you've introduced a regression there) is not "better".
7 > > but i'm not the maintainer of said eclass.
8 >
9 > That is why the case match is like so
10 >
11 > [0-9] Should be safe - every language should operate in base 10
12 > -|.|_ Exact match
13 > * If it's not the above, treat it like a letter
14 >
15 > So there shouldn't be any regressions with version numbers here as I've
16 > cunningly avoided the locale trap.
17
18 sorry, you're right ... i thought i saw a [A-Z] in there, but it was probably
19 that the old one used [:alpha:]
20
21 that said, there's no reason to change [[:digit:]] to [0-9] ... using proper
22 character classes is preferred over custom rangers regardless
23 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature