Fernando J. Pereda wrote: > On 10 Jun 2008, at 15:33, Joe Peterson wrote: > >> Luca Barbato wrote: >>> Check if exists a line EAPI=*$, if does and the rest of the string >>> matches an understood eapi, go on sourcing, otherwise ignore/mask >>> it... >> And placing it out-of-band (like "# EAPI=...") avoids any sourcing >> errors, makes parsing faster, etc. > > No, it doesn't make parsing faster. Had you bothered to profile any > package manager you'd know that.
No, I have not profiled PMs to try this, but you are saying that reading the first few lines of a file is not faster than sourcing the whole thing with bash? Remember that it could abort the minute it sees a non '#' or blank line, which would be after the first few. -Joe -- gentoo-dev@lists.gentoo.org mailing list