Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: Alexis Ballier <aballier@g.o>
Cc: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review
Date: Sat, 17 Oct 2015 20:47:44
Message-Id: 22050.46048.380633.7007@a1i15.kph.uni-mainz.de
In Reply to: [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review by Alexis Ballier
1 >>>>> On Sat, 17 Oct 2015, Alexis Ballier wrote:
2
3 > Sorry for coming very late on this, but what is the rationale behind
4 > setting in stone an 'eapply' different to an 'epatch' that has been
5 > widely tested for decades now ? Or even defining eapply in PMS ?
6
7 The rationale is that we cannot apply patches in the default
8 src_prepare() unless there is a patch function in the package manager
9 itself. Obviously the default phase cannot call a function from an
10 eclass.
11
12 > I can understand "eapply is a function that applies patches" isn't nice
13 > for a spec., but we've already seen in the past gnu patch changing
14 > behavior wrt what is an acceptable patch between versions, bsd 'patch'
15 > command behaves slightly differently than gnu patch (read: is unusable
16 > with epatch), etc.
17 > One can argue that gnu patch changing behavior is part of life, but
18 > what worries me more is the BSDs: e.g. on gfbsd, 'patch' is bsd patch,
19 > 'gpatch' is gnu patch; we use profile.bashrc to alias patch to gpatch
20 > for ebuilds, but I don't think profile.bashrc should mess up with what
21 > is mandated by PMS.
22
23 The spec for eapply mentions that it will accept GNU patch options,
24 but maybe we should be more explicit and say that eapply must call
25 GNU patch.
26
27 > Also, mandating -p1 seems quite limiting: e.g. 'svn diff -rX:Y' extracts
28 > -p0 patches by default here. Or when $S is actually a subdir of a
29 > repository, this will make standard git format-patch generated patches
30 > unusable.
31
32 Limiting the level to -p1 (and not doing autodetection) was a design
33 decision. eapply is really meant for simple cases like default
34 src_prepare applying patches listed in the PATCHES variable.
35 For anything that is more complicated there will still be epatch.
36
37 Ulrich

Replies

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