Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Cc: Matt Turner <mattst88@g.o>
Subject: [gentoo-catalyst] [PATCH] catalyst: Use correct arch setting for setarch testing
Date: Tue, 22 Nov 2022 03:36:02
Message-Id: 20221122033549.292326-1-mattst88@gentoo.org
1 Previously we were testing against the 'host' or subarchitecture (e.g.
2 i486) instead of the architecture (e.g. x86). This manifests on x86
3 builds on x86_64; on ppc on ppc64 and sparc on sparc64 the arch and
4 subarch values happen to line up.
5
6 Fixes: cd58b37b ("catalyst: Access setarch data correctly")
7 Signed-off-by: Matt Turner <mattst88@g.o>
8 ---
9 catalyst/base/stagebase.py | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12 diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
13 index 5a3bd375..732c5939 100644
14 --- a/catalyst/base/stagebase.py
15 +++ b/catalyst/base/stagebase.py
16 @@ -129,7 +129,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
17 # Search for a subarchitecture in each arch in the arch_config
18 for arch in [x for x in arch_config if x.startswith(name) and host in arch_config[x]]:
19 self.settings.update(arch_config[arch][host])
20 - setarch = arch_config.get('setarch', {}).get(host, {})
21 + setarch = arch_config.get('setarch', {}).get(arch, {})
22 break
23 else:
24 # Didn't find a matching subarchitecture, keep searching
25 --
26 2.37.4