Gentoo Archives: gentoo-dev

From: Daniel Robbins <drobbins.daniel@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Global ebuild variables and pkg_setup
Date: Wed, 21 Feb 2007 23:57:06
Message-Id: 226689f10702211553m70039df5j78b1c0cbb6762286@mail.gmail.com
In Reply to: [gentoo-dev] Global ebuild variables and pkg_setup by Ciaran McCreesh
1 Ciaran,
2
3 It looks like a fairly trivial thing to fix in ebuilds.
4
5 I think the problem you may be having is that people don't have any
6 incentive to make short-term changes to their ebuilds just so you can
7 get Paludis to work with them. It needs to be part of a larger
8 interoperability plan that includes all interested parties, and serves
9 the needs of everyone, not just the Paludis developers.
10
11 -Daniel
12
13 On 2/21/07, Ciaran McCreesh <ciaranm@×××××××.org> wrote:
14 > A number of ebuilds do things like this:
15 >
16 > inherit foo
17 >
18 > VAR="${FOO_VAR}"
19 >
20 > src_compile()
21 > {
22 > emake blah=${VAR}
23 > }
24 >
25 > where foo.eclass looks like this:
26 >
27 > foo_pkg_setup()
28 > {
29 > export FOO_VAR=baz
30 > }
31 >
32 > and where VAR is usually one of the KV variables from linux-info.
33 >
34 > This works with Portage as it is currently implemented because Portage
35 > re-sources everything between every phase. However, it breaks with pure
36 > environment-saving based ebuild implementations, including Paludis and
37 > possibly Portage in the future (pure environment saving is the only way
38 > to avoid the removing eclass problems). So, the question:
39 >
40 > Is this something that has to work (at the expense of never allowing
41 > eclass removal in the future), or is it a fluke and are ebuilds that
42 > use it broken? An easy workaround is to move the ebuild global
43 > variables into pkg_setup, and call the eclass_pkg_setup from within the
44 > ebuild pkg_setup.
45 >
46 > --
47 > Ciaran McCreesh
48 > Mail : ciaranm at ciaranm.org
49 > Web : http://ciaranm.org/
50 > Paludis, the secure package manager : http://paludis.pioto.org/
51 >
52 >
53 >
54 --
55 gentoo-dev@g.o mailing list