1 |
On 06/04/2012 02:23 AM, William Hubbs wrote: |
2 |
> On Sun, Jun 03, 2012 at 01:38:32PM +0100, Ciaran McCreesh wrote: |
3 |
>> On Sun, 03 Jun 2012 12:42:45 +0300 |
4 |
>> Samuli Suominen<ssuominen@g.o> wrote: |
5 |
>>> When all there is required is dropping some "$@" to the Portage code |
6 |
>>> and be done with it, and have everything be in consistent format... |
7 |
>> |
8 |
>> The question is not about the code, but about the design. Your design |
9 |
>> doesn't make sense: there's no direct correspondence between functions |
10 |
>> and phases, so it's not obvious where arguments to "default" get sent. |
11 |
>> |
12 |
>> "default" is for the easy cases. If you're wanting to do something |
13 |
>> different, don't use it. |
14 |
> |
15 |
> Also, default can be used as the starting point for a more complex |
16 |
> install. For example, you can call default, then once that returns, |
17 |
> modify the image by adding/removing/moving files, adding init scripts, |
18 |
> etc. |
19 |
|
20 |
yeah, the default of EAPI=4 is nearly replacement for the src_install() |
21 |
provided by base.eclass |
22 |
except it is missing argument handling |
23 |
|
24 |
the number of pkgs using it are increasing steadily exactly for the |
25 |
reason you described, it is useful already, except when it's not anymore |
26 |
|
27 |
would be cool to just point src_{configure,compile,install}() to |
28 |
`default` in, for example, xfconf.eclass and then do rest like you |
29 |
described, like: |
30 |
|
31 |
xfconf_src_configure() { |
32 |
[[ ${PV} == *9999* ]] && XFCONF+=( --enable-maintainer-mode ) |
33 |
default "${XFCONF[@]}" "$@" |
34 |
} |
35 |
|
36 |
xfconf_src_compile() { |
37 |
default "$@" |
38 |
} |
39 |
|
40 |
xfconf_src_install() { |
41 |
default "$@" |
42 |
find "${ED}" -name '*.la' -exec rm -f {} + |
43 |
validate_desktop_entries |
44 |
} |
45 |
|
46 |
we could even let base.eclass go at some point for most packages. |
47 |
epatch_user and PATCHES=() to own eclass, like "patches.eclass", if you |
48 |
have better name idea, speak up. |
49 |
then when EAPI=5 is released, convert packages using base.eclass from |
50 |
EAPI<5 + base.eclass, to EAPI=5 + patches.eclass |