Gentoo Archives: gentoo-dev

From: Alexis Ballier <aballier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [PATCH] sys-devel/autoconf: Convert from eblits into an eclass, #586424
Date: Mon, 20 Mar 2017 21:12:50
Message-Id: 20170320221234.7fd142ad@gentoo.org
In Reply to: Re: [gentoo-dev] Re: [PATCH] sys-devel/autoconf: Convert from eblits into an eclass, #586424 by "Michał Górny"
1 On Mon, 20 Mar 2017 19:24:58 +0100
2 Michał Górny <mgorny@g.o> wrote:
3
4 > On pon, 2017-03-20 at 18:01 +0100, Alexis Ballier wrote:
5 > > What makes me wonder more are the proposed solutions: So far the
6 > > only proposals I've seen are either inlining *all* the code or
7 > > moving *all* the code into an eclass. Having a quick look at
8 > > autoconf, it seems to me an intermediate solution would work
9 > > perfectly fine for the above goals/rules: Put main.eblit into an
10 > > eclass. The loading code then would access $FILESDIR only in src_*
11 > > phases. This would likely work better for all parties and would
12 > > allow to focus on better specifying this gray area of PMS instead.
13 >
14 > Don't you find it a bad hypocritical that at the same time you oppose
15 > committing an eclass for a single package and you support committing
16 > an eclass to support half-working hack for a single package?
17 >
18
19 First, I don't oppose committing an eclass for a single package, I
20 consider it out of scope of eclasses, that's all.
21
22 But even if I had stronger positions, this one looks like a win-win
23 situation to me: From a code reuse POV, it is an aberration to have
24 packages reinvent eblit include logic, each of them having or having
25 had its different flaws. Still from a code reuse POV, the eclass being
26 able to export functions would reduce ebuild boilerplate code, an
27 eblit eclass could test the presence of eblit code and call default if
28 absent. From a QA POV, eblit functions can die horribly if called
29 outside of src_* phases, ensuring PMS assumptions hold and making
30 everyone happy.
31
32 And finally, ebuild code for the libc used by 99% of our users,
33 supporting cross-compilers, canadian crosses and what else wouldn't be
34 something I'd call a 'half-working hack'.
35
36 Alexis.

Replies