1 |
On Tuesday 19 June 2012 23:59:02 Mike Gilbert wrote: |
2 |
> On Tue, Jun 19, 2012 at 11:21 PM, Mike Frysinger <vapier@g.o> wrote: |
3 |
> > On Tuesday 19 June 2012 17:35:00 Jeroen Roovers wrote: |
4 |
> >> On Tue, 12 Jun 2012 23:02:40 -0400 Mike Frysinger wrote: |
5 |
> >> > i've noticed a growing trend where people put setup of variables into |
6 |
> >> > pkg_setup that only matter to src_* funcs presumably so they don't |
7 |
> >> > have to call the respective src_* func from an inherited eclass. |
8 |
> >> > unfortunately this adds pointless overhead to binpkgs. can we please |
9 |
> >> > move away from this practice ? |
10 |
> >> |
11 |
> >> Like this? |
12 |
> > |
13 |
> > not quite |
14 |
> > |
15 |
> >> * ERROR: cat/pkg-version failed (prepare phase): |
16 |
> >> * python_set_active_version() can be used only in pkg_setup() phase |
17 |
> >> * |
18 |
> >> * Call stack: |
19 |
> >> * ebuild.sh, line 85: Called src_prepare |
20 |
> >> * environment, line 5885: Called python_set_active_version '2' |
21 |
> >> * environment, line 5603: Called die |
22 |
> >> * The specific snippet of code: |
23 |
> >> * die "${FUNCNAME}() can be used only in pkg_setup() phase"; |
24 |
> >> * |
25 |
> >> |
26 |
> >> Shouldn't that be in src_prepare already, or does python.eclass do |
27 |
> >> something rather important here while installing a binpkg? |
28 |
> > |
29 |
> > Gentoo's python integration is an ugly beast. in this case, i believe |
30 |
> > it's screwing with your $ROOT which means it has to be in pkg_* (let's |
31 |
> > quietly ignore what happens if you try to emerge two ebuilds which need |
32 |
> > conflicting versions of python active). |
33 |
> |
34 |
> python_set_active_version basically just sets the EPYTHON and |
35 |
> PYTHON_ABI variables; nothing in ${ROOT} is modified. |
36 |
|
37 |
good to know |
38 |
|
39 |
> The variables are used in python_pkg_setup to implement use-flag |
40 |
> checks for PYTHON_USE_WITH, and also in python_mod_optimize which is |
41 |
> called in pkg_postinst. |
42 |
|
43 |
thx for the details |
44 |
-mike |