Gentoo Archives: gentoo-portage-dev

From: Bertrand Simonnet <bsimonnet@××××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] per package environment: generalize the mechanism to be profile specific
Date: Tue, 16 Sep 2014 18:24:23
Message-Id: CAKQxsKZbvGRp4OnFh0-Q4oMRVkRnBtMvPP=B1Ap_A9M0OdtaNQ@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] [PATCH] per package environment: generalize the mechanism to be profile specific by Zac Medico
1 I moved the profile attributes detection logic into the python side as
2 suggested (much cleaner).
3
4 The updated patch is attached.
5
6 Thanks,
7 Bertrand
8
9 On Mon, Sep 15, 2014 at 1:40 PM, Zac Medico <zmedico@g.o> wrote:
10
11 > On 09/15/2014 11:42 AM, Bertrand Simonnet wrote:
12 > > I replaced the FEATURES gate by a profile-formats option.
13 > > I added some logic to find layout.conf for a given profile path. (find
14 > > the first
15 > > parent dir named profiles then check ../metadata/layout.conf)
16 > > Is there a corner case that I missed?
17 >
18 > I all looks good to me, except that I don't like the way that
19 > __profile_env_enabled parses the layout.conf for each directory, since
20 > it's terribly inefficient. It would be much better to parse the
21 > layout.conf data on the python side, and pass it to bash as an
22 > environment variable. For example, the PORTAGE_ECLASS_LOCATIONS variable
23 > is generated in python such that eval can be used to convert it to an
24 > array. We can add a similar array variable called
25 > PORTAGE_PROFILE_ATTRIBUTES, and each element of the array will
26 > correspond to the profile path at the same index in the path_array
27 > variable.
28 > --
29 > Thanks,
30 > Zac
31 >
32 >

Attachments

File name MIME type
0001-Make-env-bash-scripts-profile-specific.patch text/x-patch

Replies