[3/3] set_versions: Add support for setting POKYVERSION found in older releases

Message ID 20220318154228.1071136-3-richard.purdie@linuxfoundation.org
State New
Headers show
Series [1/3] Makefile/set_versions: Allow poky.yaml to be autogenerated | expand

Commit Message

Richard Purdie March 18, 2022, 3:42 p.m. UTC
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 documentation/set_versions.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Michael Opdenacker March 19, 2022, 8:23 a.m. UTC | #1
Hi Richard,

On 3/18/22 16:42, Richard Purdie wrote:
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>


For all 3 patches in this series:
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
... and merged into master-next.

Many thanks!
Michael.

Patch

diff --git a/documentation/set_versions.py b/documentation/set_versions.py
index 32259238e..6452aeb14 100755
--- a/documentation/set_versions.py
+++ b/documentation/set_versions.py
@@ -34,6 +34,13 @@  bitbake_mapping = {
     "dunfell" : "1.46",
 }
 
+# 3.4 onwards doesn't have poky version
+poky_mapping = {
+    "3.3" : "25.0",
+    "3.2" : "24.0",
+    "3.1" : "23.0",
+}
+
 ourversion = None
 ourseries = None
 ourbranch = None
@@ -121,6 +128,10 @@  replacements = {
     "BITBAKE_SERIES" : bitbakeversion,
 }
 
+if release_series[ourseries] in poky_mapping:
+    pokyversion = poky_mapping[release_series[ourseries]] + "." + ourversion.rsplit(".", 1)[1]
+    replacements["POKYVERSION"] = pokyversion
+
 with open("poky.yaml.in", "r") as r, open("poky.yaml", "w") as w:
     lines = r.readlines()
     for line in lines: