diff mbox series

[2/3] set_versions.py: move the poky_mapping dict where it is used

Message ID 20260317-use-remote-bitbake-version-mappings-v1-2-3c294fe04944@bootlin.com
State New
Headers show
Series set_versions.py: Use remote bitake mappings | expand

Commit Message

Antonin Godard March 17, 2026, 10:11 a.m. UTC
The poky_mapping dict isn't used until after the replacements dict is
created. Move it's definitions to where it's used. Also fix a codestyle
issue while we're at it (whitespace before ":").

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 documentation/set_versions.py | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/documentation/set_versions.py b/documentation/set_versions.py
index b1d65b21f..25992e5a9 100755
--- a/documentation/set_versions.py
+++ b/documentation/set_versions.py
@@ -88,15 +88,6 @@  print(f"activereleases calculated to be {activereleases}")
 print(f"devbranch calculated to be {devbranch}")
 print(f"ltsseries calculated to be {ltsseries}")
 
-# 3.4 onwards doesn't have poky version
-# Early 3.4 release docs do reference it though
-poky_mapping = {
-    "3.4" : "26.0",
-    "3.3" : "25.0",
-    "3.2" : "24.0",
-    "3.1" : "23.0",
-}
-
 ourversion = None
 ourseries = None
 ourbranch = None
@@ -237,6 +228,15 @@  replacements = {
     "BITBAKE_SERIES" : bitbakeversion,
 }
 
+# 3.4 onwards doesn't have poky version
+# Early 3.4 release docs do reference it though
+poky_mapping = {
+    "3.4": "26.0",
+    "3.3": "25.0",
+    "3.2": "24.0",
+    "3.1": "23.0",
+}
+
 if release_series[ourseries] in poky_mapping:
     pokyversion = poky_mapping[release_series[ourseries]]
     if ourversion != release_series[ourseries]: