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 1C782138359 for ; Wed, 14 Oct 2020 17:50:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 732C2E0837; Wed, 14 Oct 2020 17:50:58 +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 19974E0837 for ; Wed, 14 Oct 2020 17:50:58 +0000 (UTC) Received: by mail-ed1-f49.google.com with SMTP id dg9so305342edb.12 for ; Wed, 14 Oct 2020 10:50:56 -0700 (PDT) X-Gm-Message-State: AOAM532jmsFB3uaED+QjAnjZQ8U6yXG+lbfxpc8Rx3lx2DPTtPQG8CKA +iSyASb3tVQjQZ1w+83lmt0uQkzJ4flGy7XwKDs= X-Google-Smtp-Source: ABdhPJzGxFTYhgEt1IrgDViJdox4IAGVyGwtXCJnM1+xX5e+PMUjEmtHHAOpRveTVo0jaE6HFqYUacqJueAl6LiST6E= X-Received: by 2002:aa7:d394:: with SMTP id x20mr100090edq.14.1602697853384; Wed, 14 Oct 2020 10:50:53 -0700 (PDT) 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 References: <194d64866a4f7f8f9e5e89ad2d23e6e1b3b7a54a.camel@rohde-schwarz.com> In-Reply-To: <194d64866a4f7f8f9e5e89ad2d23e6e1b3b7a54a.camel@rohde-schwarz.com> From: Matt Turner Date: Wed, 14 Oct 2020 10:50:41 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [gentoo-catalyst] [PATCH] Fix spec file USE flag parsing To: gentoo-catalyst@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: a8559aa3-65ce-456a-8414-8716f3ba6ba3 X-Archives-Hash: c3a3e207ffdb5a6b563f2031b3308242 On Wed, Oct 14, 2020 at 6:38 AM Felix Bier wrote: > > 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 ...". > --- > 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"] = [] > -- > 2.28.0 Thanks, this indeed looks broken. It was broken by b30dd97d672d by the looks of it. Reviewed-by: Matt Turner and committed.