1 |
William Hubbs posted on Sat, 16 Aug 2014 18:01:08 -0500 as excerpted: |
2 |
|
3 |
> My concern about reverse logic like excludes is this: |
4 |
> |
5 |
> -- code start -- |
6 |
> |
7 |
> # foo and bas provide src_unpack, but you don't want the PMS default |
8 |
> # src_unpack to run them, and bar does not provide src_unpack: |
9 |
> # You want the rest of the PMS default src_unpack actions to run, so you |
10 |
> # don't write src_unpack. |
11 |
> |
12 |
> ECLASS_EXCLUDE="foo_src_unpack bas_src_unpack" |
13 |
> inherit foo bar bas |
14 |
> |
15 |
> -- code stop -- |
16 |
> |
17 |
> This works fine until the eclass maintainer for bar.eclass decides to |
18 |
> add bar_src_unpack. |
19 |
> |
20 |
> As soon as that happens, your ebuild is broken. |
21 |
|
22 |
Of course that can be foreseen since the eclass is directly inherited and |
23 |
an ebuild writer could do... |
24 |
|
25 |
ECLASS_EXCLUDE="foo_src_unpack bas_src_unpack bar_src_unpack" |
26 |
|
27 |
... even if there isn't one, since an ebuild writer can be presumed to |
28 |
know what his inherit line is. |
29 |
|
30 |
But what about Nth generation inherits? Suppose the foo eclass |
31 |
maintainer decides to inherit raz, and there's a raz_src_unpack, what |
32 |
then? |
33 |
|
34 |
So with reverse-logic excludes, to be sure he gets what he intended in |
35 |
the default_src_unpack wanted scenario above, an ebuild writer will have |
36 |
to create a src_unpack that simply calls default_src_unpack. Of course |
37 |
that's the way it is today too, but it's much more of a trap with reverse- |
38 |
logic as now you pretty-much have to do your src_unpack simply calling |
39 |
default_src_unpack from the get-go, while with reverse-logic, it might be |
40 |
fine from the get-go, and only break in some rather hidden and non- |
41 |
intuitive Nth-level inheritance case much later. |
42 |
|
43 |
-- |
44 |
Duncan - List replies preferred. No HTML msgs. |
45 |
"Every nonfree program has a lord, a master -- |
46 |
and if you use the program, he is your master." Richard Stallman |