1 |
On Sun, Aug 29, 2021 at 12:23:22PM -0500, William Hubbs wrote: |
2 |
> On Sat, Aug 28, 2021 at 06:35:06PM +0200, Michał Górny wrote: |
3 |
> > Hi, |
4 |
> > |
5 |
> > I've been informed of a slight inconsistency in package manager behavior |
6 |
> > that affects combining EXPORT_FUNCTIONS with inherit (by ionic, thanks |
7 |
> > for the report!). Please consider the three following snippets: |
8 |
> |
9 |
> ... |
10 |
> |
11 |
> > 1. I'd like to propose that we explicitly require all inherits to happen |
12 |
> > before EXPORT_FUNCTIONS. This will ensure consistent behavior across |
13 |
> > all package managers. |
14 |
> > |
15 |
> > 2. I'd like to ask your opinion whether we should: |
16 |
> > |
17 |
> > a. revert the Portage behavior to be consistent with PkgCore/Paludis |
18 |
> > |
19 |
> > b. update PMS to identify the behavior as 'undefined', i.e. either |
20 |
> > solution is correct. |
21 |
> |
22 |
> I would go with 1 and 2 b, but I also propose another option for the |
23 |
> next eapi which may be a bit controversial. |
24 |
> |
25 |
> Starting with eapi 9, make export_functions a noop (you can't remove it |
26 |
> until all eclasses/ebuilds only support eapis that don't require it). |
27 |
> |
28 |
> I understand that this is controversial, because it would require a lot |
29 |
> of work to convert ebuilds to eapi 9, but it would eliminate this |
30 |
> ambiguity/inconsistency in the future because it would require all |
31 |
> ebuilds to have phase functions unless they can use the default phases |
32 |
> the eapis provide. |
33 |
> |
34 |
> Thoughts? |
35 |
|
36 |
If anything I'd personally prefer the rough opposite of this, in the |
37 |
event multiple eclass export the same, have the package manager merge |
38 |
them. |
39 |
|
40 |
e.g. rather than have `inherit cmake xdg` run xdg_src_prepare over |
41 |
cmake's, would export: |
42 |
|
43 |
src_prepare() { |
44 |
cmake_src_prepare |
45 |
xdg_src_prepare |
46 |
} |
47 |
|
48 |
unless the ebuild redefines it (which I imagine would often be because |
49 |
of optional support, e.g. use lua &&, or occasional incompatibilities) |
50 |
|
51 |
Some ebuilds have special needs, but then there's all those generic |
52 |
ebuilds that should stay nearly empty. |
53 |
-- |
54 |
ionen |