Gentoo Archives: gentoo-dev

From: Alexis Ballier <aballier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] new vala.eclass
Date: Mon, 27 Aug 2012 12:21:06
Message-Id: 20120827081956.1db290e4@gentoo.org
In Reply to: Re: [gentoo-dev] [RFC] new vala.eclass by Alexandre Rostovtsev
1 On Mon, 27 Aug 2012 00:45:45 -0400
2 Alexandre Rostovtsev <tetromino@g.o> wrote:
3
4 > On Sun, 2012-08-26 at 22:45 -0400, Alexis Ballier wrote:
5 > > On Sun, 26 Aug 2012 19:43:32 -0400
6 > > Alexandre Rostovtsev <tetromino@g.o> wrote:
7 > > > The variables that vala_pkg_setup sets are needed only at build
8 > > > time.
9 > >
10 > > so it should be vala_src_prepare / unpack instead ?
11 > > definitely not anything pkg_* imho
12 >
13 > IMHO src_prepare or src_unpack would be misleading because the
14 > function does not modify the package's source and has nothing to do
15 > with unpacking.
16
17 it creates files as far as i understood the code;
18 the point of vala.eclass is to prepare the environment for building
19 the package, right ?
20
21 you can probably get a valid point for a src_setup phase in a
22 future eapi, but so far with current eapi, src_prepare seems the best
23 choice
24
25 > It's not an unusual idiom to set various environment
26 > variables in pkg_setup even if those variables are relevant only at
27 > build time; gnome-extra/zeitgeist and xfce4-vala/xfce4-vala are
28 > typical examples that already export VALAC in their pkg_setup().
29
30 lots of bad examples does not make it good :)
31 this is just wasted cpu cycles for binpkgs, moreover these two examples
32 only set a variable and call type -P; the eclass does set a couple
33 more of variables and writes to $T
34
35
36 anyway its your call, but given that the eclass is only useful for
37 building it seems bad practices to put its code in a pkg_ phase.