1 |
On Tue, Jun 19, 2012 at 11:21 PM, Mike Frysinger <vapier@g.o> wrote: |
2 |
> On Tuesday 19 June 2012 17:35:00 Jeroen Roovers wrote: |
3 |
>> On Tue, 12 Jun 2012 23:02:40 -0400 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 |
6 |
>> > have 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 |
>> Like this? |
11 |
> |
12 |
> not quite |
13 |
> |
14 |
>> * ERROR: cat/pkg-version failed (prepare phase): |
15 |
>> * python_set_active_version() can be used only in pkg_setup() phase |
16 |
>> * |
17 |
>> * Call stack: |
18 |
>> * ebuild.sh, line 85: Called src_prepare |
19 |
>> * environment, line 5885: Called python_set_active_version '2' |
20 |
>> * environment, line 5603: Called die |
21 |
>> * The specific snippet of code: |
22 |
>> * die "${FUNCNAME}() can be used only in pkg_setup() phase"; |
23 |
>> * |
24 |
>> |
25 |
>> Shouldn't that be in src_prepare already, or does python.eclass do |
26 |
>> something rather important here while installing a binpkg? |
27 |
> |
28 |
> Gentoo's python integration is an ugly beast. in this case, i believe it's |
29 |
> screwing with your $ROOT which means it has to be in pkg_* (let's quietly |
30 |
> ignore what happens if you try to emerge two ebuilds which need conflicting |
31 |
> versions of python active). |
32 |
> -mike |
33 |
|
34 |
python_set_active_version basically just sets the EPYTHON and |
35 |
PYTHON_ABI variables; nothing in ${ROOT} is modified. |
36 |
|
37 |
The variables are used in python_pkg_setup to implement use-flag |
38 |
checks for PYTHON_USE_WITH, and also in python_mod_optimize which is |
39 |
called in pkg_postinst. |