1 |
Dnia 2014-06-08, o godz. 16:38:43 |
2 |
Ulrich Mueller <ulm@g.o> napisał(a): |
3 |
|
4 |
> >> d) Source eclasses only once |
5 |
> >> Bug #422533 |
6 |
> |
7 |
> > Does anybody still want this included? It seems to me like the list |
8 |
> > discussion was leading in a different direction, but it isn't 100% |
9 |
> > clear to me if this is the case. |
10 |
> |
11 |
> Right, discussion has died down. Many eclasses now use a mechanism |
12 |
> equivalent to the one in C header files, which seems to do the job. |
13 |
|
14 |
I specifically did open that bug because eclasses were not using |
15 |
the same way consistently. More specifically, the 'spank way' usually |
16 |
involved EXPORT_FUNCTIONS being used inconsistently. As a result, |
17 |
sometimes phase functions from eclass inherited last weren't actually |
18 |
effective because the eclass was inherited by another eclass earlier. |
19 |
|
20 |
Thinking about it right now, I don't think we need anything |
21 |
EAPI-specific for this. A consistent policy that is respected by all |
22 |
developers would be enough. I would prefer 'my way' here, that is |
23 |
guarding all inherits and eclass code except for EXPORT_FUNCTIONS, so |
24 |
that the repetitive inherit still overrides phase functions. |
25 |
|
26 |
That is: |
27 |
|
28 |
if [[ ! ${_FOO_ECLASS} ]]; then |
29 |
inherit bar baz |
30 |
fi |
31 |
|
32 |
EXPORT_FUNCTIONS src_compile src_install |
33 |
|
34 |
if [[ ! ${_FOO_ECLASS} ]]; then |
35 |
#... |
36 |
|
37 |
_FOO_ECLASS=1 |
38 |
fi |
39 |
|
40 |
-- |
41 |
Best regards, |
42 |
Michał Górny |