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 B4478138359 for ; Wed, 14 Oct 2020 17:48:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E92D9E082D; Wed, 14 Oct 2020 17:48:37 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 D1595E082D for ; Wed, 14 Oct 2020 17:48:37 +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 BCF98335DC6 for ; Wed, 14 Oct 2020 17:48:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2F60D388 for ; Wed, 14 Oct 2020 17:48:35 +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: <1602697668.5d01bda685236a8543da3a8136a4fe809f6fd9ae.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:master 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: 5d01bda685236a8543da3a8136a4fe809f6fd9ae X-VCS-Branch: master Date: Wed, 14 Oct 2020 17:48:35 +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: 085be219-547b-4ca6-a461-ec5c8bfff98a X-Archives-Hash: 28dc010f67bf19c80862d03809efdb5d commit: 5d01bda685236a8543da3a8136a4fe809f6fd9ae Author: Felix Bier rohde-schwarz com> AuthorDate: Wed Oct 14 13:38:21 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed Oct 14 17:47:48 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5d01bda6 catalyst: Fix spec file USE flag parsing In stagebase, the set_use function applies .split() to the use flags passed from the spec file, if the value is a string. However, the result is immediately overwritten after the if-statement. Therefore the .split() is ineffectual. This results in self.settings["use"] holding a string, which is then regarded as a list of characters in write_make_conf. This fix ensures that the result of the split is not overwritten (matching the similar code in set_catalyst_use). For example, setting "stage4/use: abc" in a spec file results in USE="a b c ..." in the generated make.conf. With this fix, the generated make.conf contains the expected USE="abc ...". Fixes: b30dd97d ("Unify all make.conf settings and writing") Signed-off-by: Matt Turner gentoo.org> catalyst/base/stagebase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index df1cb844..2e313bd8 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -512,7 +512,8 @@ class StageBase(TargetBase, ClearBase, GenBase): if use in self.settings: if isinstance(self.settings[use], str): self.settings["use"] = self.settings[use].split() - self.settings["use"] = self.settings[use] + else: + self.settings["use"] = self.settings[use] del self.settings[use] else: self.settings["use"] = []