From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 916F21382C5 for ; Wed, 20 May 2020 03:39:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D5FD6E0831; Wed, 20 May 2020 03:39:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9D7EBE07A5 for ; Wed, 20 May 2020 03:39:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D01A534F1C2 for ; Wed, 20 May 2020 03:39:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 44059244 for ; Wed, 20 May 2020 03:39:36 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1589943487.d97ef9d0879cc935258f5d30b84dd31d464abc9f.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/stagebase.py X-VCS-Directories: catalyst/base/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: d97ef9d0879cc935258f5d30b84dd31d464abc9f X-VCS-Branch: wip/mattst88 Date: Wed, 20 May 2020 03:39:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ff66861b-a5b6-4637-a7eb-a98e12e4a5dd X-Archives-Hash: 025ae4b11a81223d8fcc0734977d819a Message-ID: <20200520033936.cK43P36Dp3S4eWA1BLJ_L8dHG_c_8pw-ZiFKPbP6alQ@z> commit: d97ef9d0879cc935258f5d30b84dd31d464abc9f Author: Matt Turner gentoo org> AuthorDate: Wed May 20 02:55:15 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed May 20 02:58:07 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d97ef9d0 catalyst: Don't even try to make envars from dicts With the removal of the arch modules (presumably), the two exceptions (compress_definitions and decompress_definitions) are the only dicts in self.settings. Signed-off-by: Matt Turner gentoo.org> catalyst/base/stagebase.py | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 9410f151..8e2b08da 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -1285,28 +1285,10 @@ class StageBase(TargetBase, ClearBase, GenBase): self.env[varname] = "true" else: self.env[varname] = "false" - # This handles a dictionary of objects just one level deep and no deeper! - # Its currently used only for USE_EXPAND flags which are dictionaries of - # lists in arch/amd64.py and friends. If we wanted self.settigs[var] - # of any depth, we should make this function recursive. elif isinstance(self.settings[x], dict): - if x in ["compress_definitions", - "decompress_definitions"]: + if x in ['compress_definitions', 'decompress_definitions']: continue - self.env[varname] = ' '.join(self.settings[x].keys()) - for y in self.settings[x].keys(): - varname2 = "clst_" + y.replace("/", "_") - varname2 = varname2.replace("-", "_") - varname2 = varname2.replace(".", "_") - if isinstance(self.settings[x][y], str): - self.env[varname2] = self.settings[x][y] - elif isinstance(self.settings[x][y], list): - self.env[varname2] = ' '.join(self.settings[x][y]) - elif isinstance(self.settings[x][y], bool): - if self.settings[x][y]: - self.env[varname] = "true" - else: - self.env[varname] = "false" + log.warning("Not making envar for '%s', is a dict", x) if "makeopts" in self.settings: if isinstance(self.settings["makeopts"], str):