Gentoo Archives: gentoo-portage-dev

From: Bertrand Simonnet <bsimonnet@××××××××.org>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [PATCH] per package environment: generalize the mechanism to be profile specific
Date: Thu, 11 Sep 2014 11:18:47
Message-Id: CAKQxsKZv_fSP=af4-Oos4OjExRfQWLpU4-eUJkiW6XBPTqLeCw@mail.gmail.com
1 Hi guys,
2
3 I have been working on a patch to make package.env (and env/ files)
4 stackable with the profiles.
5 The main goal would be to have a mechanism to be able to define a
6 per-package, per-profile environment in a simple way.
7
8 We can currently do this with profile.bashrc but we have to add some logic
9 there to decide which package are relevant which already exist in ebuild.sh
10 and pym/*.
11
12 I attached my current patch which contain two main modifications:
13 - ebuild.sh walk the profile and source all scripts with path:
14 ${profile_path}/env/${category}/${PN}
15 - config.py imports package.env from all profiles and then from
16 /etc/portage/package.env
17
18 Note:
19 * I gated the env/$CATEGORY/$PN scripts with a new feature: per-profile-env.
20 I couldn't do this with package.env as the scripts are parsed before we
21 initialize self.features.
22 * I am not particularly attach to both package.env and env/$CATEGORY/$PN.
23 It might make more sense to have only env/$CATEGORY/$PN, especially
24 considering the problem with package.env.
25
26 Do you have any suggestions on this patch ?
27
28 Would you be willing to accept this patch once the few problems are sorted
29 out ?
30
31 Thanks!

Attachments

File name MIME type
0001-per-profile-package-env.patch application/octet-stream

Replies