On Mon, Mar 12, 2012 at 1:46 PM, Zac Medico <zmed...@gentoo.org> wrote:
> If we want to handle every possible screwup, including stray EAPI
> assignments inside inherited eclasses, we still need to compare the
> probed value to the value that's obtained from bash.

Well, I wasn't intending to suggest that the repoman check need be the
only one.  However, preventing problems is at least as useful as
detecting them.

That said, it would probably best to have exactly one way to determine
the official EAPI.  If that is to parse the filename, then parse the
filename.  If it is to grep for a regexp and expect exactly one hit
and parse it in a certain way, then do that.

It might be that the "one" official way is to grep for a regexp and if
you find it, use it, otherwise assume 0, 1, 2, 3, or 4 and source the
ebuild for it.  That still gives you only a single answer (well,
except in situations where the current way is already broken).

If people want to abuse the EAPI syntax I suppose we can generate an
error, but ignoring it might be just as valid behavior.  I'm not sure
what happens if you define PN/etc in ebuild besides things breaking in
a horrible manner.  I'd put changing EAPI in the same category.

Rich

Reply via email to