Gentoo Archives: gentoo-portage-dev

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

Replies