Gentoo Archives: gentoo-dev

From: Marius Mauch <genone@g.o>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] how long does it take portage to parse an ebuild?
Date: Tue, 28 Oct 2003 20:17:54
Message-Id: 20031028211713.4d1cbfb5.genone@gentoo.org
In Reply to: Re: [gentoo-dev] how long does it take portage to parse an ebuild? by Andrew Gaffney
1 On 10/27/03 Andrew Gaffney wrote:
2
3 > Mike Frysinger wrote:
4 > > On Tuesday 28 October 2003 10:04, Andrew Gaffney wrote:
5 > >
6 > >>Is there a quicker
7 > >>way to determine the USE flags on the fly?
8 > >
9 > > portageq envvar USE
10 >
11 > How does Portage determine USE? I assume it gets the default from
12 > '/etc/make.profile/make.defaults'. Does it then add any that are in
13 > '/etc/make.conf' and remove any that are in '/etc/make.conf' preceeded
14 > by a '-'? Is the same process then repeated for any USE that may be
15 > passed on the command line?
16
17 It's a bit more complex: It's adding the USE settings from make.globals,
18 make.defaults, make.conf and the environment (you can specify a
19 different order, but I don't think anybody is using that feature). Then
20 it has a big list like USE="foo bla -* bar foo -bar". So it iterates
21 over the space delimited elements, adds all flags without - to the final
22 list, removes flags with - from that list (if present) and clears the
23 list if it finds a -* (one exception is the x86/ppc/... flag, that is
24 always in the list).
25
26 Marius
27
28 --
29 Public Key at http://www.genone.de/info/gpg-key.pub
30
31 In the beginning, there was nothing. And God said, 'Let there be
32 Light.' And there was still nothing, but you could see a bit better.