From: Felix Bier <Felix.Bier@rohde-schwarz.com>
To: "gentoo-catalyst@lists.gentoo.org" <gentoo-catalyst@lists.gentoo.org>
Subject: [gentoo-catalyst] [PATCH] Fix spec file USE flag parsing
Date: Wed, 14 Oct 2020 13:38:21 +0000 [thread overview]
Message-ID: <194d64866a4f7f8f9e5e89ad2d23e6e1b3b7a54a.camel@rohde-schwarz.com> (raw)
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
next reply other threads:[~2020-10-14 13:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-14 13:38 Felix Bier [this message]
2020-10-14 17:50 ` [gentoo-catalyst] [PATCH] Fix spec file USE flag parsing Matt Turner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=194d64866a4f7f8f9e5e89ad2d23e6e1b3b7a54a.camel@rohde-schwarz.com \
--to=felix.bier@rohde-schwarz.com \
--cc=gentoo-catalyst@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox