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:31:14
Message-Id: 20170320223025.6dff82f8@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 22:19:16 +0100
2 Michał Górny <mgorny@g.o> wrote:
3
4 > On pon, 2017-03-20 at 22:12 +0100, Alexis Ballier wrote:
5 > > On Mon, 20 Mar 2017 19:24:58 +0100
6 > > Michał Górny <mgorny@g.o> wrote:
7 > >
8 > > > On pon, 2017-03-20 at 18:01 +0100, Alexis Ballier wrote:
9 > > > > What makes me wonder more are the proposed solutions: So far the
10 > > > > only proposals I've seen are either inlining *all* the code or
11 > > > > moving *all* the code into an eclass. Having a quick look at
12 > > > > autoconf, it seems to me an intermediate solution would work
13 > > > > perfectly fine for the above goals/rules: Put main.eblit into an
14 > > > > eclass. The loading code then would access $FILESDIR only in
15 > > > > src_* phases. This would likely work better for all parties and
16 > > > > would allow to focus on better specifying this gray area of PMS
17 > > > > instead.
18 > > >
19 > > > Don't you find it a bad hypocritical that at the same time you
20 > > > oppose committing an eclass for a single package and you support
21 > > > committing an eclass to support half-working hack for a single
22 > > > package?
23 > >
24 > > First, I don't oppose committing an eclass for a single package, I
25 > > consider it out of scope of eclasses, that's all.
26 > >
27 > > But even if I had stronger positions, this one looks like a win-win
28 > > situation to me: From a code reuse POV, it is an aberration to have
29 > > packages reinvent eblit include logic, each of them having or having
30 > > had its different flaws. Still from a code reuse POV, the eclass
31 > > being able to export functions would reduce ebuild boilerplate
32 > > code, an eblit eclass could test the presence of eblit code and
33 > > call default if absent. From a QA POV, eblit functions can die
34 > > horribly if called outside of src_* phases, ensuring PMS
35 > > assumptions hold and making everyone happy.
36 >
37 > From a code reuse POV, it is an aberration to have an eclass that
38 > reinvents eclass include logic, having or having had flaws. Still from
39 > a code reuse POV, the package manager being able to export functions
40 > would reduce eclass boilterplate code, a package manager could look
41 > for EXPORT_FUNCTIONS and call default if absent. From a QA POV,
42 > eclass can work properly if called outside of src_* phases, ensuring
43 > PMS assumptions hold and making everyone happy.
44 >
45 > ...oh wait, we already have that!
46
47 Since you still seem to fail to understand the difference, there's
48 nothing I can do for you there. Feel free to convince maintainers, get
49 them kicked if you fail to persuade them, or fork gentoo if you can't
50 get them kicked. Nice team work.