Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review
Date: Mon, 19 Oct 2015 19:49:22
Message-Id: CAGfcS_n1cxBO=aQC8q5JiAQtfdx3GfeAzGpK9eq3boUYQUUiSg@mail.gmail.com
In Reply to: Re: [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review by Alexis Ballier
1 On Mon, Oct 19, 2015 at 2:28 PM, Alexis Ballier <aballier@g.o> wrote:
2 >
3 > However, as you say, putting it in cmake-utils needs to be properly
4 > thought so that it doesn't conflict with other eclasses: Hence the need
5 > to properly define what eclasses should call eapply_user and apply
6 > patches and what should not.
7 >
8
9 That is my main concern. Maybe a package uses cmake and ant. Patches
10 could affect either. With an automagic design you might have to run
11 half of each src_configure, then apply patches, then run the other
12 half of each src_configure.
13
14 > Your initial argument was very convincing, but under those conditions,
15 > it seems way much saner to make eapply_user idempotent and be done.
16 > (and maybe in addition require informally that eapply_user is called
17 > after applying patches, but that'd fall under good practices rather
18 > than rules)
19
20 The only danger here is that later phase functions to run would be
21 operating on already-patched sources, when they expect to be running
22 on unpatched sources. I imagine that usually wouldn't be a problem,
23 but it of course could be one.
24
25 I do get your analogy to eapply_user not being in the default phase function.
26
27 This all falls into that general category of correctness vs
28 convenience. It is more convenient if you can just call eapply_user
29 at a suboptimal point and not have to mess with your ebuilds. The
30 same argument could be made for running all the inherited eclass phase
31 functions and not just one of them. The issue is that this can break
32 in lots of hard-to-predict ways. I'd rather see things refactored to
33 deal with this in a more sane manner.
34
35 That actually makes me wonder if the better solution is to add another
36 phase - such as src_postprepare or something like that, where you'd
37 run autotools or whatever. If that were done then you could also make
38 hasufell happy by just having the PM do the patching after
39 src_prepare. Maybe that can go in EAPI7. :)
40
41 --
42 Rich

Replies

Subject Author
Re: [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review Alexis Ballier <aballier@g.o>