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 9A29F1382C5 for ; Wed, 20 May 2020 03:43:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DD9A6E090A; Wed, 20 May 2020 03:43:14 +0000 (UTC) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (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 D6CFCE090A for ; Wed, 20 May 2020 03:43:14 +0000 (UTC) Received: by mail-pf1-f181.google.com with SMTP id x13so899845pfn.11 for ; Tue, 19 May 2020 20:43:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rR8INzY/uupnq/37pJq9l4W0x+7oRXgzO//I/N0iQyM=; b=nSIu+8J8eFSICBSlGAyP1YA443bbi5ylwR4j+aywcwm0HfgX5l7BVlAj20QE2DmZWD dwEt/kJgN4Re4xbD1w6qxqLrMXDIplOmR4MIorw7I1wbxHikVOJmkKaYohFVa/IlkZej hcghkMRmR6VKRMwzvZSV1nbvRSuZ4VUotcqLgIpUUMe8gk2fgZkLHaLwYxYJKOeP95p/ c/Uz0iQ4u238wcVkHdWtCeVkNZU3Ik+EGYajPJJCRPuLDDYph1CXZNgVokSE252bNCM6 BwPxK19lAvuB0rXevFic0EpEVOSTAOgaGBFFMsYXYUHKtJQ0aGVOm8pdEKltsI36X6wj brlg== X-Gm-Message-State: AOAM530M+iBD/kGCrD7obEGkDnkk165ac6Bb1HFKNrjpFzPQ6Xak4zZ9 5XGc+d06ScNHLANWqiuJoGIMYv7m X-Google-Smtp-Source: ABdhPJxhsmYXMECz7MSroI1yDiv3bBJH7ripHs3UaLrnfg9wI55Wkx7/LE3X6tw8aKGXwSrs+tsPEA== X-Received: by 2002:aa7:9e4e:: with SMTP id z14mr2185296pfq.227.1589946193536; Tue, 19 May 2020 20:43:13 -0700 (PDT) Received: from localhost ([134.134.137.77]) by smtp.gmail.com with ESMTPSA id q189sm774046pfc.112.2020.05.19.20.43.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 20:43:12 -0700 (PDT) From: Matt Turner To: gentoo-catalyst@lists.gentoo.org Cc: Matt Turner Subject: [gentoo-catalyst] [PATCH 16/21] catalyst: Don't even try to make envars from dicts Date: Tue, 19 May 2020 20:42:21 -0700 Message-Id: <20200520034226.2870937-16-mattst88@gentoo.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200520034226.2870937-1-mattst88@gentoo.org> References: <20200520034226.2870937-1-mattst88@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 41cd80eb-e5a4-4b20-b497-d0d1d4596ca1 X-Archives-Hash: 16371d346870dbc734f595c10ed4caf6 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 --- 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): -- 2.26.2