set_versions: Add support for setting POKYVERSION found in older releases

(From yocto-docs rev: 9c7a4318920d468cca10448901868bad080cd895)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2022-03-18 15:41:25 +00:00
parent b04eda7447
commit 767eb1c71c

View File

@ -39,6 +39,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
@ -126,6 +133,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: