Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: man/, lib/portage/package/ebuild/
Date: Tue, 08 Sep 2020 00:47:54
Message-Id: 1599526034.16262dc8ab9ab6cc03565bcefc444726b4dfb32f.zmedico@gentoo
1 commit: 16262dc8ab9ab6cc03565bcefc444726b4dfb32f
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Sat Sep 5 22:37:05 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 8 00:47:14 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=16262dc8
7
8 make.conf: Treat __* variables as local and do not propagate them.
9
10 Bug: https://bugs.gentoo.org/740588
11 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
12 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
13
14 lib/portage/package/ebuild/config.py | 6 ++++++
15 man/make.conf.5 | 4 +++-
16 2 files changed, 9 insertions(+), 1 deletion(-)
17
18 diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py
19 index b62ad3069..a09fdbced 100644
20 --- a/lib/portage/package/ebuild/config.py
21 +++ b/lib/portage/package/ebuild/config.py
22 @@ -370,6 +370,9 @@ class config:
23 _("Found 2 make.conf files, using both '%s' and '%s'") %
24 tuple(make_conf_paths), noiselevel=-1)
25
26 + # __* variables set in make.conf are local and are not be propagated.
27 + make_conf = {k: v for k, v in make_conf.items() if not k.startswith("__")}
28 +
29 # Allow ROOT setting to come from make.conf if it's not overridden
30 # by the constructor argument (from the calling environment).
31 locations_manager.set_root_override(make_conf.get("ROOT"))
32 @@ -621,6 +624,9 @@ class config:
33 tolerant=tolerant, allow_sourcing=True,
34 expand=expand_map, recursive=True) or {})
35
36 + # __* variables set in make.conf are local and are not be propagated.
37 + mygcfg = {k: v for k, v in mygcfg.items() if not k.startswith("__")}
38 +
39 # Don't allow the user to override certain variables in make.conf
40 profile_only_variables = self.configdict["defaults"].get(
41 "PROFILE_ONLY_VARIABLES", "").split()
42
43 diff --git a/man/make.conf.5 b/man/make.conf.5
44 index 1b997ad37..8a1ea0603 100644
45 --- a/man/make.conf.5
46 +++ b/man/make.conf.5
47 @@ -1,4 +1,4 @@
48 -.TH "MAKE.CONF" "5" "Jun 2020" "Portage VERSION" "Portage"
49 +.TH "MAKE.CONF" "5" "Sep 2020" "Portage VERSION" "Portage"
50 .SH "NAME"
51 make.conf \- custom settings for Portage
52 .SH "SYNOPSIS"
53 @@ -36,6 +36,8 @@ make.defaults to make.globals to make.conf to the environment
54 settings. Clearing these variables requires a clear\-all as in:
55 export USE="\-*"
56 .br
57 +__* variables set in make.conf are local and are not be propagated.
58 +.br
59 In order to create per\-package environment settings, refer to
60 \fBpackage.env\fR in \fBportage\fR(5).
61 .SH "VARIABLES"