1 |
On 06/15/2012 06:10 PM, Mike Frysinger wrote: |
2 |
> On Friday 15 June 2012 03:44:14 Samuli Suominen wrote: |
3 |
>> On 06/13/2012 06:02 AM, Mike Frysinger wrote: |
4 |
>>> i've noticed a growing trend where people put setup of variables into |
5 |
>>> pkg_setup that only matter to src_* funcs presumably so they don't have |
6 |
>>> to call the respective src_* func from an inherited eclass. |
7 |
>>> unfortunately this adds pointless overhead to binpkgs. can we please |
8 |
>>> move away from this practice ? |
9 |
>> |
10 |
>> Every Xfce ebuild in gentoo-x86 is using pkg_setup() for 3 variables, |
11 |
>> DOCS for src_install, PATCHES for src_prepare |
12 |
> |
13 |
> these are static variables, so defining them in a func is pointless |
14 |
|
15 |
"sort of" not necessarily, 'has $useflag && PATCHES+=( )' has been used |
16 |
before, not sure if it's used in tree right now or not |
17 |
|
18 |
> |
19 |
>> and XFCONF for src_configure |
20 |
> |
21 |
> now you're down to one variable which means you've got one func to /properly/ |
22 |
> define |
23 |
|
24 |
src_configure() still requires calling itself (xfconf_src_configure) in |
25 |
the end of the function |
26 |
someone suggested writing, for example, xfconf() function that accepts |
27 |
$@ arguments so you could |
28 |
src_configure() { |
29 |
xfconf \ |
30 |
$(use_enable foo) |
31 |
} |
32 |
but I don't really like that either... |
33 |
|
34 |
src_setup() would be cool and solve all the forementioned issues |
35 |
|
36 |
-Samuli |