Gentoo Archives: gentoo-dev

From: Alexis Ballier <aballier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review
Date: Sun, 18 Oct 2015 08:31:37
Message-Id: 20151018103109.2ecfc0db@gentoo.org
In Reply to: [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review by Ulrich Mueller
1 On Sat, 17 Oct 2015 22:47:28 +0200
2 Ulrich Mueller <ulm@g.o> wrote:
3
4 > >>>>> On Sat, 17 Oct 2015, Alexis Ballier wrote:
5 >
6 > > Sorry for coming very late on this, but what is the rationale behind
7 > > setting in stone an 'eapply' different to an 'epatch' that has been
8 > > widely tested for decades now ? Or even defining eapply in PMS ?
9 >
10 > The rationale is that we cannot apply patches in the default
11 > src_prepare() unless there is a patch function in the package manager
12 > itself. Obviously the default phase cannot call a function from an
13 > eclass.
14
15 well, that was the idea behind base.eclass :)
16 why not just improving it ?
17
18 or give proper scoping to inherit wrt EXPORT_FUNCTIONS, ala python:
19 'from base inherit src_prepare'
20
21 > > I can understand "eapply is a function that applies patches" isn't
22 > > nice for a spec., but we've already seen in the past gnu patch
23 > > changing behavior wrt what is an acceptable patch between versions,
24 > > bsd 'patch' command behaves slightly differently than gnu patch
25 > > (read: is unusable with epatch), etc.
26 > > One can argue that gnu patch changing behavior is part of life, but
27 > > what worries me more is the BSDs: e.g. on gfbsd, 'patch' is bsd
28 > > patch, 'gpatch' is gnu patch; we use profile.bashrc to alias patch
29 > > to gpatch for ebuilds, but I don't think profile.bashrc should mess
30 > > up with what is mandated by PMS.
31 >
32 > The spec for eapply mentions that it will accept GNU patch options,
33 > but maybe we should be more explicit and say that eapply must call
34 > GNU patch.
35
36 ok; or just make it explicit that eapply must run with ebuild env (since
37 gnu patch is already required in ebuild env)
38
39 > > Also, mandating -p1 seems quite limiting: e.g. 'svn diff -rX:Y'
40 > > extracts -p0 patches by default here. Or when $S is actually a
41 > > subdir of a repository, this will make standard git format-patch
42 > > generated patches unusable.
43 >
44 > Limiting the level to -p1 (and not doing autodetection) was a design
45 > decision. eapply is really meant for simple cases like default
46 > src_prepare applying patches listed in the PATCHES variable.
47 > For anything that is more complicated there will still be epatch.
48
49
50 yes, I understand that, but this one was more intended for the
51 rationale and for eapply_user:
52 - why should I ever call eapply instead of epatch ?
53 - why should I ever want eapi6 src_prepare instead of
54 base_src_prepare ?
55 - what do I, as en ebuild writer, gain from this?
56 - what does the PM gain from this ?
57
58 As for eapply_user: Since it seems perfectly fine to have eapply_user a
59 noop, and most parts are implementation defined, why mandating
60 eapply_user to use such a limited eapply instead of leaving it
61 implementation defined ?
62
63
64 Alexis.

Replies

Subject Author
Re: [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review "Michał Górny" <mgorny@g.o>
Re: [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>