Skip to contentSkip to conversation

Revert "lib/oe/go: document map_arch, and raise an error on unknown architecture"

PATCH In review Peter Marko 1 participant 2 messages Dec 10, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "lib/oe/go: document map_arch, and raise an error on unknown architecture"

From: Peter Marko <[email protected]>

This reverts commit e6de433ccb2784581d6c775cce97f414ef9334b1.

This introduced a breaking change which is not suitable for backport to stable LTS branches.

---
 meta/lib/oe/go.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
meta/lib/oe/go.py +1 -5
index 4559dc63b28..dfd957d157a 100644
@@ -7,10 +7,6 @@
 import re
 
 def map_arch(a):
-    """
-    Map our architecture names to Go's GOARCH names.
-    See https://github.com/golang/go/blob/master/src/internal/syslist/syslist.go for the complete list.
-    """
     if re.match('i.86', a):
         return '386'
     elif a == 'x86_64':
@@ -35,4 +31,4 @@ def map_arch(a):
         return 'riscv64'
     elif a == 'loongarch64':
         return 'loong64'
-    raise KeyError(f"Cannot map architecture {a}")
+    return ''
#1 lore raw

This should be taken before release.
Two users already complained about failing builds.

Peter

-----Original Message-----
From: Marko, Peter (FT D EU SK BFS1) <[email protected]>
Sent: Wednesday, December 10, 2025 20:08
To: [email protected]
Cc: Marko, Peter (FT D EU SK BFS1) <[email protected]>
Subject: [OE-core][scarthgap][PATCH] Revert "lib/oe/go: document map_arch, and raise an error on unknown architecture"

From: Peter Marko <[email protected]>

This reverts commit e6de433ccb2784581d6c775cce97f414ef9334b1.

This introduced a breaking change which is not suitable for backport to stable LTS branches.

---
 meta/lib/oe/go.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
meta/lib/oe/go.py +1 -5
index 4559dc63b28..dfd957d157a 100644
@@ -7,10 +7,6 @@
 import re
 
 def map_arch(a):
-    """
-    Map our architecture names to Go's GOARCH names.
-    See https://github.com/golang/go/blob/master/src/internal/syslist/syslist.go for the complete list.
-    """
     if re.match('i.86', a):
         return '386'
     elif a == 'x86_64':
@@ -35,4 +31,4 @@ def map_arch(a):
         return 'riscv64'
     elif a == 'loongarch64':
         return 'loong64'
-    raise KeyError(f"Cannot map architecture {a}")
+    return ''