Ciaran McCreesh wrote: > On Sat, 22 Dec 2007 16:55:50 +0800 > Zhang Le <[EMAIL PROTECTED]> wrote: >> Ciaran McCreesh wrote: >>> Note *the way things are currently*. If you think this is untrue, >>> provide an algorithm that will correctly give the EAPI of any >>> current or future ebuild given that ebuild's filename (hint: you >>> can't). >> Simple. >> Whatever you'd like to have in the suffix, we can put it on the first >> line of the ebuild. >> Just go and get it, and that's the EAPI. > > Your algorithm: > > Does not work for existing ebuilds that have implicit EAPI 0.
That's obvious. If no suffix, just treat it as EAPI 0. I thought I don't need to say this explicitly. > > Does not work for existing ebuilds that have explicit EAPI. Even better, since we don't need suffix in the first place. Just define it in ebuild. > > Does not work for future ebuilds. If defined in file does not work, then define in file name doesn't either. They are interchangeable. All could be get before sourcing. I know you'd say people will use all syntaxes to define. But how many are there? EAPI=1, EAPI="1" these are the two ways currently used in tree. A simple qgrep can show that. Two steps can guarantee you get the value 1. strip " 2. get the value -- Zhang Le, Robert GPG key ID: 1E4E2973 Fingerprint: 0260 C902 B8F8 6506 6586 2B90 BC51 C808 1E4E 2973 -- [EMAIL PROTECTED] mailing list