Gentoo Archives: gentoo-dev

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

Attachments

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

Replies