Gentoo Archives: gentoo-dev

From: "Petteri Räty" <betelgeuse@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] x-modular.eclass: A modified approach to EAPI support
Date: Fri, 06 Mar 2009 22:32:11
Message-Id: 49B1A4B4.1000804@gentoo.org
In Reply to: [gentoo-dev] x-modular.eclass: A modified approach to EAPI support by Donnie Berkholz
1 Donnie Berkholz wrote:
2 > I decided to try something a little different because I had some ideas
3 > for improving the existing EAPI patches I've seen going into other
4 > eclasses. So here is my patch for x-modular.eclass. I tested it with
5 > ebuilds using EAPIs 0, 1, and 2, and it appeared to work fine. It
6 > already happened to have a function called src_configure, so that
7 > doesn't appear in the patch.
8 >
9 > One thing I see as an improvement is a lack of EAPI value checks
10 > throughout the ebuild to avoid repetition between the function export
11 > and the function call. Things just check whether a function was
12 > exported, which is the only place where EAPI value checks happen.
13 >
14 > Additionally, the fallback in case statements is "I don't know what to
15 > do" and supported EAPIs are explicitly defined. This will make it
16 > obvious when the eclass doesn't support a new EAPI instead of it
17 > randomly failing after you try it.
18 >
19 > Any thoughts?
20 >
21 >
22
23 The other option instead of die would be DEPEND="THIS-IS-NOT-VALID".
24
25 Regards,
26 Petteri

Attachments

File name MIME type
signature.asc application/pgp-signature