Gentoo Archives: gentoo-dev

From: Luca Barbato <lu_zero@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Issues regarding glep-55 (Was: [gentoo-council] Re: Preliminary Meeting-Topics for 12 February 2009)
Date: Wed, 25 Feb 2009 03:04:48
Message-Id: 49A4B54E.4060202@gentoo.org
In Reply to: Re: [gentoo-dev] Issues regarding glep-55 (Was: [gentoo-council] Re: Preliminary Meeting-Topics for 12 February 2009) by Ciaran McCreesh
1 Ciaran McCreesh wrote:
2 > On Tue, 24 Feb 2009 18:16:54 +0100
3 > Luca Barbato <lu_zero@g.o> wrote:
4 >>> You're doubling the number of files that have to be read for an
5 >>> operation that's almost purely i/o bound. On top of that, you're
6 >>> introducing a whole bunch of disk seeks in what's otherwise a nice
7 >>> linear operation.
8 >> I see words, not numbers.
9 >
10 > Number: double. That's a '2 times'.
11
12 given that the simplest thing is hacking ebuild.sh and extract eapi with
13 a simple C program (you can use pcre or ragel if you want) exactly
14 before the ebuild source:
15
16 Index: bin/ebuild.sh
17 ===================================================================
18 --- bin/ebuild.sh (revision 12704)
19 +++ bin/ebuild.sh (working copy)
20 @@ -1848,6 +1848,7 @@
21 # eclasses, they need to be unset before this process of
22 # interaction begins.
23 unset DEPEND RDEPEND PDEPEND IUSE
24 + EAPI=$(eapitool "${EBUILD}")
25 source "${EBUILD}" || die "error sourcing ebuild"
26
27 if [ "${EBUILD_PHASE}" != "depend" ] ; then
28
29 I think your numbers are a bit pessimistic, this is when you get EAPI in
30 portage, post source ${EBUILD}, opening the file before source would
31 just put in the cache one line earlier.
32
33 > You don't know whether the cache is valid until you know the EAPI. It
34 > only works currently because EAPIs don't change inherit behaviour.
35
36 There were already discussions about switching cache format, if we want
37 to change the inherit behaviour we could just switch at the same time
38 the cache format and leave dummy entry for compatibility with legacy
39 portage.
40
41 > So you have patches for Portage? Please show them.
42
43 Up there what's enough to check the viability for the solution.
44
45 the bash subst I wrote before could be used instead of the call to get
46 the eapi in extension behaviour.
47
48 >> unknown isn't unsupported?
49 >
50 > Huh? Please explain what you mean.
51
52 mv cat/pkg-version.ebuild cat/pkg-version_foo.ebuild
53
54 emerge -vp pkg
55
56 portage will warn about not knowing pkg-version_foo and will ignore it.
57
58 lu
59
60 --
61
62 Luca Barbato
63 Gentoo Council Member
64 Gentoo/linux Gentoo/PPC
65 http://dev.gentoo.org/~lu_zero

Replies