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 03:04:22
Message-Id: 5068E2E0.8080803@gentoo.org
In Reply to: Re: [gentoo-pms] [PATCH] EAPI must be at least a single char. by Brian Harring
1 On 09/30/2012 03:22 PM, Brian Harring wrote:
2 > On Sun, Sep 30, 2012 at 12:52:40PM -0700, Zac Medico wrote:
3 >> On 09/30/2012 12:44 PM, Brian Harring wrote:
4 >>> tries to write a PM, likely fucking that up. If what you were saying
5 >>> was the actual intention behind it, that assignment would've just been
6 >>> along the lines of EAPI=("[^"]*"|'[^']*'|[^\t ]); aka "here's how you
7 >>> grab what looks like an EAPI assignment".
8 >>
9 >> I would have preferred a regex that just matches any assignment like
10 >> this, but didn't feel like bikeshedding it, since the one that's
11 >> currently in the spec works in practice.
12 >
13 > Counter point; portage doesn't actually enforce the rules of a valid
14 > EAPI name; correct me if I'm wrong obviously, but in checking the
15 > source, didn't see any such validation.
16
17 It doesn't need to check that EAPI names are valid. It only needs to
18 check that they are supported, so that's what it does.
19
20 > If the regex were as I suggested, that would be a non issue and we'd
21 > have *guranteed* EAPI name compliance- else it wouldn't match the
22 > invalid EAPI, and would stop looking at that line (falling back to
23 > EAPI=0).
24 >
25 > Basically, I'd like y'all to spell out the actual gains of having it
26 > loose like this, especailly in light of the fact the majority PM, via
27 > relying on that alone, doesn't do EAPI value enforcement.
28
29 It's enforced by the fact that all supported EAPIs happen to have valid
30 EAPI values.
31
32 > If we used the regex I suggested in the second email, this issue goes
33 > away, and we remove a potential landmine.
34 >
35 > Clarify to me why that landmine should be left in place.
36
37 The current spec works in practice, and that's all I really care about.
38 Still, I'd be in favor of changing the regex to match practically
39 anything that looks like an EAPI assignment, regardless of the validity
40 of the EAPI value.
41 --
42 Thanks,
43 Zac

Replies

Subject Author
Re: [gentoo-pms] [PATCH] EAPI must be at least a single char. Ulrich Mueller <ulm@g.o>