Richard Freeman wrote: > Some object to parsing out the EAPI without sourcing the ebuild (only > bash can source bash). I disagree with this argument - every time you > run a shell script it is sourced by something other than bash - the > kernel has to figure out what script interpreter to use by parsing the > first line. There is no reason we can't use a magic number in the same > way with the EAPI. That isn't reason enough on its own to put the EAPI > in the filename, but it is a start.
+1 It was mentioned that "comments are to be ignored", but you point out a perfect and very fundamental example of where this is not true: #!/usr/bin/env bash Putting another line close to this one with: #EAPI=42 or #!EAPI=42 if you like (conforms more to the shell script specifier), is not too muchh of a stretch. > Most software packages store version information internal to a file > format. I'm actually not aware of many that put it in the filename. Only a few, mainly Windows, I believe. Like .WSn (as pointed out on the Filename_extension wikipedia page). But oddballs like this suggest to me that a hack had to be done because the version could not be gleaned in a more subtle way from the file itself (e.g. MS Word does this transparently - all are ".doc"). -Joe -- gentoo-dev@lists.gentoo.org mailing list