Ciaran McCreesh wrote:
On Tue, 24 Feb 2009 18:16:54 +0100
Luca Barbato <lu_z...@gentoo.org> wrote:
You're doubling the number of files that have to be read for an
operation that's almost purely i/o bound. On top of that, you're
introducing a whole bunch of disk seeks in what's otherwise a nice
linear operation.
I see words, not numbers.

Number: double. That's a '2 times'.

given that the simplest thing is hacking ebuild.sh and extract eapi with a simple C program (you can use pcre or ragel if you want) exactly before the ebuild source:

Index: bin/ebuild.sh
===================================================================
--- bin/ebuild.sh       (revision 12704)
+++ bin/ebuild.sh       (working copy)
@@ -1848,6 +1848,7 @@
        # eclasses, they need to be unset before this process of
        # interaction begins.
        unset DEPEND RDEPEND PDEPEND IUSE
+       EAPI=$(eapitool "${EBUILD}")
        source "${EBUILD}" || die "error sourcing ebuild"

        if [ "${EBUILD_PHASE}" != "depend" ] ; then

I think your numbers are a bit pessimistic, this is when you get EAPI in portage, post source ${EBUILD}, opening the file before source would just put in the cache one line earlier.

You don't know whether the cache is valid until you know the EAPI. It
only works currently because EAPIs don't change inherit behaviour.

There were already discussions about switching cache format, if we want to change the inherit behaviour we could just switch at the same time the cache format and leave dummy entry for compatibility with legacy portage.

So you have patches for Portage? Please show them.

Up there what's enough to check the viability for the solution.

the bash subst I wrote before could be used instead of the call to get the eapi in extension behaviour.

unknown isn't unsupported?

Huh? Please explain what you mean.

mv cat/pkg-version.ebuild cat/pkg-version_foo.ebuild

emerge -vp pkg

portage will warn about not knowing pkg-version_foo and will ignore it.

lu

--

Luca Barbato
Gentoo Council Member
Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero


Reply via email to