1 |
On Sun, 15 Apr 2012 13:00:10 +0200 |
2 |
"Andreas K. Huettel" <dilfridge@g.o> wrote: |
3 |
|
4 |
> > Right now we have support in some packages for user patches - those |
5 |
> > being patches dropped into /etc/portage/patches/pkgname/ - which are |
6 |
> > automatically applied. Because this feature is implemented by |
7 |
> > epatch_user() in |
8 |
> > eutils.eclass, it is only available for ebuilds that inherit eutils |
9 |
> > and explicitly call epatch_user or inherit another eclass that |
10 |
> > calls it in an exported phase (eg. base). The end result is a very |
11 |
> > inconsistent experience, where user patches may or may not work not |
12 |
> > only on a package-by-package basis, but ebuild-by-ebuild. |
13 |
> > |
14 |
> > Is there any reason why this couldn't just be done in the package |
15 |
> > manager, making user patches available for all ebuilds without code |
16 |
> > changes? |
17 |
> |
18 |
> Well as people have already pointed out, the problem is where to |
19 |
> place it: |
20 |
> * before src_prepare is bad because of gentoo-patches |
21 |
> * after src_prepare is bad because of eautoreconf calls in src_prepare |
22 |
> |
23 |
> I would even suggest a more radical approach, namely (for an upcoming |
24 |
> EAPI) to migrate some of the features of base.eclass into the package |
25 |
> manager. Applying patches is a universal problem which should be |
26 |
> handled as central as possible. |
27 |
> |
28 |
> As example, (in that future EAPI) |
29 |
> * have patches from the PATCHES array be applied automatically |
30 |
> _before_ src_prepare (the same way as done currently in |
31 |
> base_src_prepare) |
32 |
|
33 |
No. EAPIs have overridable phase functions for a reason. |
34 |
|
35 |
> * disallow or deprecate at least direct calls to epatch, to ensure |
36 |
> ordering |
37 |
|
38 |
What if some patches are applied conditionally? |
39 |
|
40 |
-- |
41 |
Best regards, |
42 |
Michał Górny |