On Sun, Mar 11, 2012 at 7:20 PM, Rich Freeman <ri...@gentoo.org> wrote: > On Sun, Mar 11, 2012 at 10:03 PM, Brian Harring <ferri...@gmail.com> wrote: >> Pragmatic reality, the eapi function actually would work fine. As >> pointed out elsewhere, bash parses as it goes- which isn't going to >> change. > > Unless the ebuild isn't written in bash...
I'd opt for a different extension in that case actually. > > How do you source the ebuild if you don't know what to use to source > it? How do you know what to use to source it if you don't know the > EAPI? Right now all the existing EAPIs use bash, but there is no > reason the file couldn't be xml, or python, or just about anything > else. > > If we want to allow for that kind of flexibility, then it might make > sense to go ahead and state that our convention is to stick EAPI=5 in > one of the first few lines of the ebuild, or inside a comment, but > also go a step further and state that the text "EAPI=" cannot appear > elsewhere in the ebuild (or perhaps within the first 10 lines). Just > about any file format we might use would allow us to make "EAPI=" > appear in it, but not all could guarantee that it would occur at the > start of a line, or at the start of a line immediately after a #. > > In any case, I can really see the KISS value in a very rigid syntax > that is trivial to parse. Stuff like this almost makes me wish our > ebuilds already were xml files or such, with bash embedded inside > sections. Finding a particular tag in an xml file is trivial as the > fundamentals haven't changed in 15 years. I will stab the next person who suggests 'xml-like ebuilds.' -A > > Rich >