Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] ebuild laziness and binpkg overhead
Date: Wed, 20 Jun 2012 03:59:56
Message-Id: CAJ0EP42nhu4Df4=HK8oM+706K-oQ6YV-cxwPJmrwsHYLLU8Xxw@mail.gmail.com
In Reply to: Re: [gentoo-dev] ebuild laziness and binpkg overhead by Mike Frysinger
On Tue, Jun 19, 2012 at 11:21 PM, Mike Frysinger <vapier@g.o> wrote:
> On Tuesday 19 June 2012 17:35:00 Jeroen Roovers wrote: >> On Tue, 12 Jun 2012 23:02:40 -0400 Mike Frysinger wrote: >> > i've noticed a growing trend where people put setup of variables into >> > pkg_setup that only matter to src_* funcs presumably so they don't >> > have to call the respective src_* func from an inherited eclass. >> > unfortunately this adds pointless overhead to binpkgs.  can we please >> > move away from this practice ? >> >> Like this? > > not quite > >>  * ERROR: cat/pkg-version failed (prepare phase): >>  *   python_set_active_version() can be used only in pkg_setup() phase >>  * >>  * Call stack: >>  *     ebuild.sh, line   85:  Called src_prepare >>  *   environment, line 5885:  Called python_set_active_version '2' >>  *   environment, line 5603:  Called die >>  * The specific snippet of code: >>  *           die "${FUNCNAME}() can be used only in pkg_setup() phase"; >>  * >> >> Shouldn't that be in src_prepare already, or does python.eclass do >> something rather important here while installing a binpkg? > > Gentoo's python integration is an ugly beast.  in this case, i believe it's > screwing with your $ROOT which means it has to be in pkg_* (let's quietly > ignore what happens if you try to emerge two ebuilds which need conflicting > versions of python active). > -mike
python_set_active_version basically just sets the EPYTHON and PYTHON_ABI variables; nothing in ${ROOT} is modified. The variables are used in python_pkg_setup to implement use-flag checks for PYTHON_USE_WITH, and also in python_mod_optimize which is called in pkg_postinst.

Replies

Subject Author
Re: [gentoo-dev] ebuild laziness and binpkg overhead Mike Frysinger <vapier@g.o>