1 |
In stagebase, the set_use function applies .split() to the use flags
|
2 |
passed from the spec file, if the value is a string. However, the
|
3 |
result is immediately overwritten after the if-statement. Therefore the
|
4 |
.split() is ineffectual.
|
5 |
|
6 |
This results in self.settings["use"] holding a string,
|
7 |
which is then regarded as a list of characters in write_make_conf.
|
8 |
This fix ensures that the result of the split is not overwritten
|
9 |
(matching the similar code in set_catalyst_use).
|
10 |
|
11 |
For example, setting "stage4/use: abc" in a spec file results
|
12 |
in USE="a b c ..." in the generated make.conf.
|
13 |
With this fix, the generated make.conf contains the expected
|
14 |
USE="abc ...".
|
15 |
---
|
16 |
catalyst/base/stagebase.py | 3 ++-
|
17 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
18 |
|
19 |
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
|
20 |
index df1cb844..2e313bd8 100644
|
21 |
--- a/catalyst/base/stagebase.py
|
22 |
+++ b/catalyst/base/stagebase.py
|
23 |
@@ -512,7 +512,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
|
24 |
if use in self.settings:
|
25 |
if isinstance(self.settings[use], str):
|
26 |
self.settings["use"] = self.settings[use].split()
|
27 |
- self.settings["use"] = self.settings[use]
|
28 |
+ else:
|
29 |
+ self.settings["use"] = self.settings[use]
|
30 |
del self.settings[use]
|
31 |
else:
|
32 |
self.settings["use"] = []
|
33 |
--
|
34 |
2.28.0 |