1 |
Discard parent profile USE from the expand_map variable before |
2 |
it is used to evaluate a child profile. This prevents accidents |
3 |
triggered by USE="${USE} ..." settngs at the top of make.defaults |
4 |
which caused parent profile USE to override parent profile |
5 |
package.use settings. |
6 |
|
7 |
Bug: https://bugs.gentoo.org/771549 |
8 |
Signed-off-by: Zac Medico <zmedico@g.o> |
9 |
--- |
10 |
lib/portage/package/ebuild/config.py | 13 ++++++++++--- |
11 |
1 file changed, 10 insertions(+), 3 deletions(-) |
12 |
|
13 |
diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py |
14 |
index e5ec681af..638c72959 100644 |
15 |
--- a/lib/portage/package/ebuild/config.py |
16 |
+++ b/lib/portage/package/ebuild/config.py |
17 |
@@ -612,9 +612,16 @@ class config: |
18 |
|
19 |
mygcfg = {} |
20 |
if profiles_complex: |
21 |
- mygcfg_dlists = [getconfig(os.path.join(x.location, "make.defaults"), |
22 |
- tolerant=tolerant, expand=expand_map, recursive=x.portage1_directories) |
23 |
- for x in profiles_complex] |
24 |
+ mygcfg_dlists = [] |
25 |
+ for x in profiles_complex: |
26 |
+ # Prevent accidents triggered by USE="${USE} ..." settings |
27 |
+ # at the top of make.defaults which caused parent profile |
28 |
+ # USE to override parent profile package.use settings. |
29 |
+ expand_map.pop("USE", None) |
30 |
+ mygcfg_dlists.append( |
31 |
+ getconfig(os.path.join(x.location, "make.defaults"), |
32 |
+ tolerant=tolerant, expand=expand_map, |
33 |
+ recursive=x.portage1_directories)) |
34 |
self._make_defaults = mygcfg_dlists |
35 |
mygcfg = stack_dicts(mygcfg_dlists, |
36 |
incrementals=self.incrementals) |
37 |
-- |
38 |
2.26.2 |