Gentoo Archives: gentoo-pms

From: Zac Medico <zmedico@g.o>
To: gentoo-pms@l.g.o
Subject: Re: [gentoo-pms] [PATCH] EAPI must be at least a single char.
Date: Mon, 01 Oct 2012 16:33:56
Message-Id: 5069C5E7.3020604@gentoo.org
In Reply to: Re: [gentoo-pms] [PATCH] EAPI must be at least a single char. by Ulrich Mueller
1 On 10/01/2012 12:15 AM, Ulrich Mueller wrote:
2 >>>>>> On Sun, 30 Sep 2012, Zac Medico wrote:
3 >
4 >> Still, I'd be in favor of changing the regex to match practically
5 >> anything that looks like an EAPI assignment, regardless of the
6 >> validity of the EAPI value.
7 >
8 > I don't believe that this is possible. You'll never be able to match
9 > everyting that it valid bash syntax, other than by parsing it with
10 > bash itself. Which is what we wanted to avoid, in the first place.
11 >
12 > (( $'\x45\x41\x50\x49' = 4 + 1 ))
13
14 The package manager wouldn't need any more knowledge of bash syntax than
15 it currently has. All of the implementation details would be the same as
16 they are now. The only difference would be that the regex would return a
17 match in _more_ cases. I think that this would be preferable to Brian's
18 suggestion to make the regex fail to match an empty EAPI setting (which
19 would return a match in _fewer_ cases).
20 --
21 Thanks,
22 Zac