diff mbox series

[yocto-autobuilder-helper] scripts/yocto-supported-distros: update after changes in config.py

Message ID 20250919-udpate-ysd-script-v1-1-e5d4eacda316@bootlin.com
State New
Headers show
Series [yocto-autobuilder-helper] scripts/yocto-supported-distros: update after changes in config.py | expand

Commit Message

Antonin Godard Sept. 19, 2025, 9:23 a.m. UTC
The config.py configuration file of yocto-autobuilder2 changed, and now
"master" is listed in a worker_filters variable (same as before but
includes master).

Adapt the script to always read from that filtered list.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
For context see:
https://lore.kernel.org/r/DCW1DRNGJELA.1WL7VLD0XA7T2@bootlin.com

Should be merged along with "config.py: remove debian11 for master" on
yocto-autobuilder2.
---
 scripts/yocto-supported-distros | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)


---
base-commit: fa3e15fba7fa96da520343c2ad312cefa6fc9c87
change-id: 20250919-udpate-ysd-script-81a5cd19d756

Best regards,
--  
Antonin Godard <antonin.godard@bootlin.com>
diff mbox series

Patch

diff --git a/scripts/yocto-supported-distros b/scripts/yocto-supported-distros
index e70943d..d833327 100755
--- a/scripts/yocto-supported-distros
+++ b/scripts/yocto-supported-distros
@@ -185,7 +185,7 @@  def _possible_workers(all_workers: List[str],
     Return workers in match_workers that match the workers in all_workers.
     A match is a worker in all_workers that starts with a worker in
     match_workers.
-    This is because workers_prev_releases is defined like so in config.py.
+    This is because worker_filters is defined like so in config.py.
     """
 
     possible_workers = []
@@ -382,9 +382,9 @@  def main():
 
     possible_workers = []
 
-    stable_release = True
+    stable_release = release != "master"
 
-    if release != "master" and release not in config.workers_prev_releases:
+    if release not in config.worker_filters:
         print(f"Release {release} does not exist")
         if args.release_from_env:
             # Might be a custom branch or something else... safely exiting
@@ -392,12 +392,8 @@  def main():
         else:
             exit(1)
 
-    if release == "master":
-        stable_release = False
-        possible_workers = config.all_workers
-    else:
-        possible_workers = _possible_workers(config.workers_prev_releases[release],
-                                             config.all_workers)
+    possible_workers = _possible_workers(config.worker_filters[release],
+                                         config.all_workers)
 
     if args.check_worker_statuses:
         possible_workers = _filter_inactive_workers(possible_workers)
@@ -433,7 +429,7 @@  def main():
 
         old_distros = []
 
-        for distro in config.workers_prev_releases[release]:
+        for distro in config.worker_filters[release]:
             if not any(distro in w for w in config.all_workers):
                 old_distros.append(_mangle_worker(distro, "ab", args.output_format))