Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFD: EAPI specification in ebuilds
Date: Mon, 12 Mar 2012 04:09:01
Message-Id: 4F5D76B8.5040102@gentoo.org
In Reply to: Re: [gentoo-dev] RFD: EAPI specification in ebuilds by Brian Harring
1 On 03/11/2012 06:55 PM, Brian Harring wrote:
2 > On Sat, Mar 10, 2012 at 08:06:50AM -0800, Zac Medico wrote:
3 >> Yeah. Another way of putting it is that the requirement to spawn a bash
4 >> process and source the ebuild adds a ridiculous amount of unnecessary
5 >> complexity, in violation of the KISS principle [1].
6 >
7 > This statement is incorrect.
8 >
9 > Even if EAPI could be parsed via some non sourcing approach, we
10 > *still* have to source the ebuild to get the metadata for when the
11 > EAPI is supported (the vast majority of usage). That complexity is
12 > there one way or another- we wouldn't be trying to extract the EAPI
13 > from the ebuild unless the cache was invalid/missing.
14
15 There are a couple of other cases worth considering:
16
17 1) User downloads an overlay that doesn't provide cache. We want the
18 package manager to give a pretty "EAPI unsupported" message, rather than
19 spit out some bash syntax errors.
20
21 2) You're assuming that a package manager can validate cache for an EAPI
22 that it doesn't necessarily support. That's a somewhat fragile
23 assumption, given the complexities of cache validation, which involve
24 verification all files that affect metadata and those files may vary
25 depending on the EAPI.
26
27 > Phrasing it more bluntly: you can only avoid the sourcing step if you
28 > can isolate that the EAPI is unsupported (which is extremely rare in
29 > terms of actual user experience). For the rest of the time (well past
30 > the 99% mark) sourcing is the immediate step following.
31
32 For the sake of being robust in all possible cases, it's just a lot
33 simpler if we can obtain the EAPI simply and reliably, without spawning
34 bash to source the ebuild.
35
36 > Also, stop referencing wikipedia. People know what "trivial
37 > objection" and "KISS" is.
38
39 You can't assume that. On this list we've got potential to have readers
40 and responders with lots of different backgrounds. Your insistence on
41 using bash to obtain the EAPI would make me wonder if you understood the
42 KISS principle, if I didn't know you better.
43 --
44 Thanks,
45 Zac

Replies

Subject Author
Re: [gentoo-dev] RFD: EAPI specification in ebuilds Brian Harring <ferringb@×××××.com>