1 |
On Tue, 4 Sep 2012 12:16:04 +0200 |
2 |
Ulrich Mueller <ulm@g.o> wrote: |
3 |
|
4 |
> 4. Open floor (10 minutes) |
5 |
|
6 |
I would have one small conflict/issue to resolve if it fits the 'open |
7 |
floor' time, or otherwise for the next meeting. |
8 |
|
9 |
It is the inclusion of dointo() and newinto() functions into |
10 |
eutils.eclass. The implementation of these functions would look like: |
11 |
|
12 |
dointo() { |
13 |
( |
14 |
insinto "$1" |
15 |
doins "${@:2}" |
16 |
) |
17 |
} |
18 |
|
19 |
so it's simply insinto+*ins in a subshell to avoid altering the ebuild- |
20 |
defined insinto target. This is how various eclasses implement |
21 |
functions like domenu(), doicon()... |
22 |
|
23 |
I wanted to add those functions to eutils.eclass so that the functions |
24 |
defined other and other eclasses wouldn't have to repeat the same |
25 |
code. However, Diego Petteno was strongly opposed to this and I wasn't |
26 |
able to convince him so I'd like to put it to debate by the Council. |
27 |
|
28 |
The alternative proposed by Diego is to include those helpers in EAPI |
29 |
5. However, that would mean that the beneficial eclass functions will |
30 |
have to use them conditionally to EAPI, so it wouldn't benefit at all |
31 |
functions in eclasses supporting EAPI<5 (and the affected eclasses |
32 |
have no reason to drop support for older EAPIs). Effectively, |
33 |
if introduced in a future EAPI, the helpers will be not used at all for |
34 |
a long time. |
35 |
|
36 |
I would like to especially note that these functions are meant for |
37 |
internal use by eclasses and not by ebuilds. Ebuilds can and should use |
38 |
insinto directly which is more optimal; eclasses need the subshelling |
39 |
to allow ebuilds to do things like: |
40 |
|
41 |
insinto /foo |
42 |
doins bar |
43 |
doicon bar.xpm |
44 |
doins something_else |
45 |
|
46 |
Ebuilds obviously can control their use of insinto. |
47 |
|
48 |
-- |
49 |
Best regards, |
50 |
Michał Górny |