diff mbox series

[2/2] set_versions.py: make active releases unique

Message ID 20260413-set-versions-no-current-release-v1-2-9c40207c8604@bootlin.com
State Under Review
Headers show
Series set_versions.py fixes (continued) | expand

Commit Message

Antonin Godard April 13, 2026, 7:35 a.m. UTC
In case the new current release is an LTS release, the previous code
would have this release twice in the list of active releases.
De-duplicate items in this list.

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

Patch

diff --git a/documentation/set_versions.py b/documentation/set_versions.py
index bd4b91082..c9a6012b9 100755
--- a/documentation/set_versions.py
+++ b/documentation/set_versions.py
@@ -86,7 +86,9 @@  if releases_from_json:
     if not current_branch:
         sys.exit("Unable to find a current release! Exiting...")
 
-    activereleases = [current_branch] + ltsseries
+    # make the list of releases unique, there can be duplication when the
+    # current releases is also an LTS
+    activereleases = list(dict.fromkeys([current_branch] + ltsseries))
 
 # used by run-docs-builds to get the default page
 if len(sys.argv) > 1 and sys.argv[1] == "getlatest":