Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
Date: Thu, 21 May 2020 20:25:42
Message-Id: 1589943487.d97ef9d0879cc935258f5d30b84dd31d464abc9f.mattst88@gentoo
1 commit: d97ef9d0879cc935258f5d30b84dd31d464abc9f
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 20 02:55:15 2020 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Wed May 20 02:58:07 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d97ef9d0
7
8 catalyst: Don't even try to make envars from dicts
9
10 With the removal of the arch modules (presumably), the two exceptions
11 (compress_definitions and decompress_definitions) are the only dicts in
12 self.settings.
13
14 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
15
16 catalyst/base/stagebase.py | 22 ++--------------------
17 1 file changed, 2 insertions(+), 20 deletions(-)
18
19 diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
20 index 9410f151..8e2b08da 100644
21 --- a/catalyst/base/stagebase.py
22 +++ b/catalyst/base/stagebase.py
23 @@ -1285,28 +1285,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
24 self.env[varname] = "true"
25 else:
26 self.env[varname] = "false"
27 - # This handles a dictionary of objects just one level deep and no deeper!
28 - # Its currently used only for USE_EXPAND flags which are dictionaries of
29 - # lists in arch/amd64.py and friends. If we wanted self.settigs[var]
30 - # of any depth, we should make this function recursive.
31 elif isinstance(self.settings[x], dict):
32 - if x in ["compress_definitions",
33 - "decompress_definitions"]:
34 + if x in ['compress_definitions', 'decompress_definitions']:
35 continue
36 - self.env[varname] = ' '.join(self.settings[x].keys())
37 - for y in self.settings[x].keys():
38 - varname2 = "clst_" + y.replace("/", "_")
39 - varname2 = varname2.replace("-", "_")
40 - varname2 = varname2.replace(".", "_")
41 - if isinstance(self.settings[x][y], str):
42 - self.env[varname2] = self.settings[x][y]
43 - elif isinstance(self.settings[x][y], list):
44 - self.env[varname2] = ' '.join(self.settings[x][y])
45 - elif isinstance(self.settings[x][y], bool):
46 - if self.settings[x][y]:
47 - self.env[varname] = "true"
48 - else:
49 - self.env[varname] = "false"
50 + log.warning("Not making envar for '%s', is a dict", x)
51
52 if "makeopts" in self.settings:
53 if isinstance(self.settings["makeopts"], str):