From patchwork Thu Nov 19 07:55:53 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 104860 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.10230.1795074980146463890 for ; Wed, 18 Nov 2026 23:56:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=Zc7/+SV9; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: antonin.godard@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 505E41A1700 for ; Thu, 19 Nov 2026 07:56:18 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2773C60237; Thu, 19 Nov 2026 07:56:18 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 5D9BA11BC0F83; Thu, 19 Nov 2026 08:56:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1795074973; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=qRTkDshlKkxUehvQkISZwLRYovQYX984jQgsJUMfW1E=; b=Zc7/+SV9eETfH32pdJifm0Q+OBcBCCoZj5Y22IzqIvxF3y/HwBd35DtoNxY83yFRqGQqTh rC1brTPbVDtjnpkXDUsKqgRx8dEyZp+Q3PDFJgySEwiQkraSX1iOeTcqXG1dM3Oy9zXnYv 8Su4MRoU7Aq0Toaka2poD4vJwEK5FOeRV2dnisfsutHhsdXRQsYxnVuluIauxQL9qC2yFN RWhK8bJpj4g6dTLtg3fJWe6oj3XlkipuJMnTzeNVYuxIErqv8+wJLDdTLwiyNgxciWiAq1 RV5ZMu4ZwEM8w+F6wjKFy4ff4iEaB5efkZfQ23pROts5z9oKFyUmAkbSZFdlqw== From: Antonin Godard Date: Thu, 19 Nov 2026 08:55:53 +0100 Subject: [PATCH 1/4] tools/gen-releases-svg: use subprocess check_call instead of run MIME-Version: 1.0 Message-Id: <20261119-gen-releases-svg-fixes-v1-1-b6245fbf8294@bootlin.com> References: <20261119-gen-releases-svg-fixes-v1-0-b6245fbf8294@bootlin.com> In-Reply-To: <20261119-gen-releases-svg-fixes-v1-0-b6245fbf8294@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard , Quentin Schulz X-Mailer: b4 0.17-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=959; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=IESlDn89ySEdXW9701njtXwthuLOX6jv0KzeB4GF2X4=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBq/quMiksOhmav3b8N9bY9rETa9eCQ8boQ4Mj+Y WEtF3kW2daJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCav6rjAAKCRDRgEFAKaOo NrQLEADDk/sHtVvqLdXqQvdfMvMoK6uZbgkVR/nZ7AW2j4KB4T6TinXansbwe7ec5N63GtkOhj7 CKVWYwNLIh+jTzqBtIYGd4qqlOHdtpZduHC+xw8Rhh2ZyIUnA60DKwP3rt38mNqsdb5x1X9JkZR J0wJVIdmANKwOuvRfodcaQXaNjLdD/GIt69td4j5rjGC4y4vR9vMEQJvDqaGoUpQ9se0exOoWdL Hzn5I4ql0O8N4CpfAzc8x4ne+1nzYpRnHDaVbwdF7w6peUs6ZWsGDmhhymzaA9SxWvrtuYBRsuw hQJYIFxyC0J9AZGSjInqF539OOXRhORPe9xw7TrQrytdfht1RrHQ50W9w2OVJKmqRFctq7wdVbu 6/kvse0Mk+gkisI+UCqhl9TGOCWHk0jQFtll9PlUrJoMuB8wbzfzPWYcnR/DFoUnoxFUG5Y2QiO dmF8tOWBwwiITF8m4FFwAhnq6M5AGZzly5hHBSaTAH9TnN+4upyh/83UGUnd0q8OoVrmfB53cSn e6r9LxAmuaGiHWgxGcI/Tvj4iaQJDOiQySzLU9Ttl8/Wo0XpwIJyhbSURb1IWbq1zUfSgV02bRi Iz1R0HIjC6x5ULyJ2THg2yD3e6a+fd5gBjd3T3BecDZeIaGSTZ9Le1H6/wu1a7heWh6aJJwRKoN fDTVhdk6n1QMF9Q== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Thu, 19 Nov 2026 07:56:29 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/10795 We don't use the result of the command, so use check_call instead. Suggested-by: Quentin Schulz Signed-off-by: Antonin Godard Reviewed-by: Quentin Schulz --- documentation/tools/gen-releases-svg | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/documentation/tools/gen-releases-svg b/documentation/tools/gen-releases-svg index e091c02de..6a601b010 100755 --- a/documentation/tools/gen-releases-svg +++ b/documentation/tools/gen-releases-svg @@ -89,7 +89,4 @@ with tempfile.TemporaryDirectory() as tmpdir: mmd.write(f" {codename} {series_version}{" (LTS)" if lts else ""}" f" :{status}, {original_release_date}, {end_date}\n") - result = subprocess.run( - ["mmdc", "--input", mmdpath, "--output", args.output], - check=True, - ) + subprocess.check_call(["mmdc", "--input", mmdpath, "--output", args.output]) From patchwork Thu Nov 19 07:55:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 104861 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.10022.1795074980604966395 for ; Wed, 18 Nov 2026 23:56:21 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=Tj2RLSxJ; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: antonin.godard@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 037FF1A1701 for ; Thu, 19 Nov 2026 07:56:19 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id C587160237; Thu, 19 Nov 2026 07:56:18 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id E205F11BC0F93; Thu, 19 Nov 2026 08:56:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1795074978; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=4cLNhF1g7IeIte9q6p1+bGV7AoTD04r2c/UIGs0mbJU=; b=Tj2RLSxJQSu++tKdkxGblexmVa0rvIb1bbnad2zMo7jfGxiq8Hpa0br9Gjw8kzaBMpNdnn 54+g8WWsOfUDyl9aEK9eDsaOytfybA7gn0sQjSeKRboHssFiJt9wzmuY3TDDmOIYTA2QJS l5lmzBFRbK+EsqfI1lpR+zHaSPq23FC24J9l7+BtFW1fZDLpYvZ5lYBJax+Z1OiDVwsFPN ptg+Cu+Jvwg2LmGFEgRlH1ulDFwxxBO+HZXyYYr2IaNCFweSzWs/346/sD4vJzH+vD4AJD A6CO107L+b9wv9w/sCByiNS3xGPclU7pRQyB/TA+sL43UNdJj5s3WWIOlbMrng== From: Antonin Godard Date: Thu, 19 Nov 2026 08:55:54 +0100 Subject: [PATCH 2/4] tools/gen-releases-svg: start showing releases from oldest active one MIME-Version: 1.0 Message-Id: <20261119-gen-releases-svg-fixes-v1-2-b6245fbf8294@bootlin.com> References: <20261119-gen-releases-svg-fixes-v1-0-b6245fbf8294@bootlin.com> In-Reply-To: <20261119-gen-releases-svg-fixes-v1-0-b6245fbf8294@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard , Quentin Schulz X-Mailer: b4 0.17-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=27372; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=a2Y9JHmtxPoAs+n3jC4PX6nh7wn5CambZCGcilvL130=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBq/quNw8ELWY2TqBXpkx4vnJP6hzI7BBaaVXHRJ EFavd40c4aJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCav6rjQAKCRDRgEFAKaOo NrmtEAC7VVV7LxGVn5THQ9IYz+SdbKDn11kZdctpSHsJFMClQnwU7wuORPu0fCHIOwimlGaQcb1 CaTz8qt/M/jJWAUR4whoRD93wQeydr+zSSMXOLPlt68H8Mm8FsHPRNIRYQuAhJjVOfYHRFJ4hRC WDuNg3KuGiN1MAsyPCq0KBSVHLLnUVG4wBfCVCTPiFJO1pgU7cP2mN4yDDkiV4DQRuM/9kF9+0o bg6jSBYOZLg6sD0vVcUwRGGeEQiQrsiR154dsq5o35Yu6MNUvwpBVdAcXU/uII2P18sZ8uDQSRG IcDPJGSND9Wq7ARyXyvL5r881KTULRp30i3AFmmkNtG+7DHjd9RqE9ryIfvzQpEZjj5wgzmzyMU vb0/druNjTjCvPB69LVEWmZq2beJSdc84nqIk2nmYpFpLk6YIvvN5mbTrlsKsnOCe3Zjff7d4KF qt7RNG9K2bsdimrWrGli8NrsMFkKPR1HevAMJj190FFIbWk6vtNz4bvp+XalraNPZxZOXLAEPa/ WqBA29Jh/y6Je0dmbp+Yp7rHBFWU5KOwv6LOW8zeFNajRafqoPVAXlJLxWVp6gqoUM7YavvjmQL D1Q65jqFsieuwdFjDhQx2+azOrIpSrP87b1Wi8heZjIWEXq5W0pJJKeYO1VABpdCiYmBl0XJcX9 W0x+sUqueAthmMQ== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Thu, 19 Nov 2026 07:56:29 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/10796 Instead of a fixed date (2022-04-01, which represented the Kirkstone release date), show the releases from the oldest active one. Suggested-by: Quentin Schulz Signed-off-by: Antonin Godard Reviewed-by: Quentin Schulz --- documentation/ref-manual/svg/releases.svg | 2 +- documentation/tools/gen-releases-svg | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/documentation/ref-manual/svg/releases.svg b/documentation/ref-manual/svg/releases.svg index 386491997..c4a7b611f 100644 --- a/documentation/ref-manual/svg/releases.svg +++ b/documentation/ref-manual/svg/releases.svg @@ -1 +1 @@ -Jul 2022Jan 2023Jul 2023Jan 2024Jul 2024Jan 2025Jul 2025Jan 2026Jul 2026Jan 2027Jul 2027Jan 2028Jul 2028Jan 2029Jul 2029Jan 2030Kirkstone 4.0 Langdale 4.1 Mickledore 4.2 Nanbield 4.3 Scarthgap 5.0 (LTS) Styhead 5.1 Walnascar 5.2 Whi nlatter 5.3 Wrynose 6.0 (LTS) Blacksail 6.1 Garburn 6.2 \ No newline at end of file +Jul 2024Jan 2025Jul 2025Jan 2026Jul 2026Jan 2027Jul 2027Jan 2028Jul 2028Jan 2029Jul 2029Jan 2030Scarthgap 5.0 (LTS) Styhead 5.1 Walnascar 5.2 Whinlatter 5.3 Wrynose 6.0 (LTS) Blacksail 6.1 Garburn 6.2 \ No newline at end of file diff --git a/documentation/tools/gen-releases-svg b/documentation/tools/gen-releases-svg index 6a601b010..77281f37d 100755 --- a/documentation/tools/gen-releases-svg +++ b/documentation/tools/gen-releases-svg @@ -54,6 +54,16 @@ gantt with open(args.releases_json_path, "r") as f: releases_from_json = json.load(f) +# Find the oldest active release release date to make it the start of our timeline. +active_release_dates = [] +for release in releases_from_json: + if release["series"] == "previous": + continue + if not release["original_release_date"]: + continue + active_release_dates.append(datetime.datetime.strptime(release["original_release_date"], "%Y-%m-%dT%H:%M:%S%z")) +oldest_supported_release_date = sorted(active_release_dates)[0] + with tempfile.TemporaryDirectory() as tmpdir: mmdpath = Path(tmpdir) / "diagram.mmd" with open(mmdpath, "w", encoding="utf-8") as mmd: @@ -69,7 +79,7 @@ with tempfile.TemporaryDirectory() as tmpdir: if not release["original_release_date"]: continue original_release_date = datetime.datetime.strptime(release["original_release_date"], "%Y-%m-%dT%H:%M:%S%z") - if original_release_date < datetime.datetime(2022, 4, 1, tzinfo=datetime.timezone.utc): + if original_release_date < oldest_supported_release_date: continue original_release_date = original_release_date.date().isoformat() end_date = datetime.datetime.strptime(release["latest_release_date"], "%Y-%m-%dT%H:%M:%S%z") From patchwork Thu Nov 19 07:55:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 104862 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.10231.1795074981511346005 for ; Wed, 18 Nov 2026 23:56:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=1bS/JA3B; spf=pass (domain: bootlin.com, ip: 185.246.85.4, mailfrom: antonin.godard@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id A57E44E4165C; Thu, 19 Nov 2026 07:56:19 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 7B6AD60237; Thu, 19 Nov 2026 07:56:19 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8E98F11BC0FA4; Thu, 19 Nov 2026 08:56:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1795074979; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=EvK0LkuUR6xS0SW7PyqjY7bYB+eOzQvlgzmKRgacBdE=; b=1bS/JA3BXP8vE+BsY+vQ5KskVfTJ6AncwjEPf0fb1NEffOfXCwk7Z0xURH6vjBgyIY521t +w9lCkqI12iloX/P60VolT9mPibnXETGqHMdE01GJ8GTfp/ZYdEWd/2Oj5y8y1b7licKJP sqvTzez7uW9kYKqYkmpenx2QUoxNRZcxitnRha7lVgsgsptB7jPdMGMofem67WeZoJUOtf +MeP172MRbU9NqlV5UaJhJukRWSglTU+Gr7JmsvYZxwn7uu99URvR9CyTMReBmetJHlOJ8 rbkWQoyhNtFRrF2cMa1KQ3ekIXbAFryqzHuQTqTVEjUaZkCoXcNmSlsGuT+vKg== From: Antonin Godard Date: Thu, 19 Nov 2026 08:55:55 +0100 Subject: [PATCH 3/4] tools/gen-releases-svg: store docs root dir in variable MIME-Version: 1.0 Message-Id: <20261119-gen-releases-svg-fixes-v1-3-b6245fbf8294@bootlin.com> References: <20261119-gen-releases-svg-fixes-v1-0-b6245fbf8294@bootlin.com> In-Reply-To: <20261119-gen-releases-svg-fixes-v1-0-b6245fbf8294@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard , Quentin Schulz X-Mailer: b4 0.17-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1389; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=/diRisubuLoGbo2Y7A6oK+VqC2ef31TEy8ibyj5LnB8=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBq/quNQ3Y9CEeG271BpQKCsxgM5/QQyOmuMhtym bWgouqL89aJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCav6rjQAKCRDRgEFAKaOo Nh97D/4oZfRcKjZJISAiTnoyT8LMDp6WqQ3Kg1P30MliravwKjygerVNRmkT2e+nKlALoovTaR+ xqPxTHWA3ABS+2RFPn5Y+tZG/g8Cp/E/faNLs51Pn93KOOIpm6KNEJJ2mnj6RK1H3z+jPX02o3n hg/LsJo9kiEY/L6kQGJuc9m9nCK69MHGhw5r9/fn1A6B95oCwbMajglKzGawXB50DvpSHlYbM7i 8aVDOFIUcwRjikKYDZwGKpcZwse9n6V64Q2G3wo7X/feX3l4KMyP2pGu9YyPbLmzEBPQh2AP9Ob wCQNynw++AIl0pbD6KvKZbe85jOCapEAEUQk+ouYwwbP7bpp4sp/OibWTPU5kn7p+xHEeEMEsWq SRK+Ej/WwyImFSirrvEqM1mytWJr4eTTrhDhKjZYFJVlOglopEW7ovTxxvXLjUNLSiilcrx71vq +QhLSYJtJFn9oZLOugr9tnJMIm24ddRmeh1XsajewTSw6CIw5Ds//0BYB3RmwWqfWT7fVg4M9jp UvU1S6u7eYMaYTNCZX8lveXnDplh9GB6flh4U8kP//yyC10ANd9ryMau3agnnvATGs324IKLcLT LaRBA8TwIxq4mJZlAQnElnXJBNZ32ABhgAKTZyo7+pyyj5h02KtM+A0Qyc9Pv/MO6MJCiD4FW3d 1STthfmmhGb/7Fw== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Thu, 19 Nov 2026 07:56:29 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/10797 To improve readability, store the documentation root directory in a variable and reuse it in the default assignment for -i and -o. Suggested-by: Quentin Schulz Signed-off-by: Antonin Godard --- documentation/tools/gen-releases-svg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/documentation/tools/gen-releases-svg b/documentation/tools/gen-releases-svg index 77281f37d..be69777ce 100755 --- a/documentation/tools/gen-releases-svg +++ b/documentation/tools/gen-releases-svg @@ -18,13 +18,15 @@ import tempfile from pathlib import Path +docs_root_dir = Path(__file__).resolve().parent.parent + parser = argparse.ArgumentParser( description="Parse releases.json and output a releases.svg file" ) parser.add_argument("-i", help="Path to the releases.json file", dest="releases_json_path", - default=Path(__file__).resolve().parent.parent / "releases.json") + default=docs_root_dir / "releases.json") parser.add_argument("-o", help="Path to the output SVG", dest="output", - default=Path(__file__).resolve().parent.parent / "ref-manual/svg/releases.svg") + default=docs_root_dir / "ref-manual/svg/releases.svg") args = parser.parse_args() if not shutil.which("mmdc"): From patchwork Thu Nov 19 07:55:56 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 104863 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.10232.1795074982678963793 for ; Wed, 18 Nov 2026 23:56:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=O7ADQv2F; spf=pass (domain: bootlin.com, ip: 185.246.85.4, mailfrom: antonin.godard@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 02E564E4165B for ; Thu, 19 Nov 2026 07:56:21 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id CE46560237; Thu, 19 Nov 2026 07:56:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4423811BC2D6A; Thu, 19 Nov 2026 08:56:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1795074980; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=zJ0hQzWgSwC1O1t0QR24X454oZekSo5SbZvQ65KVm0c=; b=O7ADQv2F/ombjTTwRGYgLtra2a3YrFJ0nnu8F0l1WLFhWgtl1BGHk+K//uE7+JRmyNcPGN giz11We+FkFAPgix2TWdfAUH7zCdziMr0RW3ZgII1qtIlgxOU62tIUiE/n0niF4Xz6Psl8 dB+cholO8JUTvJb3M9kR39xyd8kqqGz30b97Sxfb3wYaUubv2U9yHwcg5/345xWmMz43Zi R05yh3WsXY2WSxstnpwd/hGllwVe/+w0UrfDq9VftUj1QLAUZzihhmY6d8+l+jyTBAoipz vVsn1tAggNH2kM0dPo5fzBzMmb9DRzNnBIWqxGwehUuNqBdv9OiDRhAO5CzKPg== From: Antonin Godard Date: Thu, 19 Nov 2026 08:55:56 +0100 Subject: [PATCH 4/4] tools/gen-releases-svg: simplify tempfile usage MIME-Version: 1.0 Message-Id: <20261119-gen-releases-svg-fixes-v1-4-b6245fbf8294@bootlin.com> References: <20261119-gen-releases-svg-fixes-v1-0-b6245fbf8294@bootlin.com> In-Reply-To: <20261119-gen-releases-svg-fixes-v1-0-b6245fbf8294@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard , Quentin Schulz X-Mailer: b4 0.17-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=4366; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=mvNYbaUJAsnpr5Ir9g+Cf1GzLk9Zi3WIMcVCNUbmUUs=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBq/quNuS7dZViziO05h+M78F1TZy9z8sxlum+31 PoxN3ET/eKJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCav6rjQAKCRDRgEFAKaOo NrPbD/sGBtVfuBdeifMyH6XLMMqhL7Mr35YtpXmcUE9DixDc0+rv0/hbJQtaI+GoClFaeQhXvrr al6LblBVWt7jhhWBIAtwum69a65FESwpfwFheJV7/GLslwH6E0hd9sg3+m1C9AqUvkNPCO1sqBX YpbPBbvjI/sZ7ioROYEYuqC3bsNNCQ1B70rdtLrmlR5Zv0oLST8/cMbkq7XsO0aZYOVo/DXZX2l txlvHgDpM4caWOmeyt/LDFL16T2qdc48xLWCk8Vs67Wr1UcIqWx+ioRJt0ClLy/jTLndDq3NnrQ BMai7fKuoesGWcqGvSdUH90hg+8pJM4SnnVXrHuB1G5nzd9yZGFKSAxxi5Htbku7njmGZc5fX9+ JL8aNsdMWG+/KhwUUtwSAas2MkgKbiAbm/c0TbqBpshrWR+CV5YgfrfYwHfj759vxyCH/qjl9h7 QHTVtiXl4u0rEt0NJ8GqBjuWHYYZ71pBEJYjBBhkNTBtBMXN7G/H5Co13AwAB8v7slblMTLq2kn U2XnetceMkcplYSHS346WEXsdm6r5AX1Z8rQdOQKA4tHth6aWX/VNXueQU9V4PZT4v8syP6+MMu Q1QGBkJ1XX4TYEwYa7tZiTj0nL7v75VSX5fAOEz5Ai6eFrHplmHm2lvU8xcUZ11tP5BXoRDwsBi XQY+m8XoxugwySA== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Thu, 19 Nov 2026 07:56:30 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/10798 We can directly use tempfile.NamedTemporaryFile() to open a temporary file and use it for the diagram passed too mmdc. Make sure it's flushed before mmdc reads it. This simplifies code complexity. Suggested-by: Quentin Schulz Signed-off-by: Antonin Godard Reviewed-by: Quentin Schulz --- documentation/tools/gen-releases-svg | 68 ++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/documentation/tools/gen-releases-svg b/documentation/tools/gen-releases-svg index be69777ce..71422da58 100755 --- a/documentation/tools/gen-releases-svg +++ b/documentation/tools/gen-releases-svg @@ -66,39 +66,39 @@ for release in releases_from_json: active_release_dates.append(datetime.datetime.strptime(release["original_release_date"], "%Y-%m-%dT%H:%M:%S%z")) oldest_supported_release_date = sorted(active_release_dates)[0] -with tempfile.TemporaryDirectory() as tmpdir: - mmdpath = Path(tmpdir) / "diagram.mmd" - with open(mmdpath, "w", encoding="utf-8") as mmd: - mmd.write(MMD_HEADER) +with tempfile.NamedTemporaryFile("w") as mmd: + mmd.write(MMD_HEADER) - first_active_rel_found = False - for release in releases_from_json: - codename = release["release_codename"] - series_version = release["series_version"] - if release["status"] == "Active Development": - mmd.write(f" {codename} {series_version} :done, after current_rel, 6M\n") - continue - if not release["original_release_date"]: - continue - original_release_date = datetime.datetime.strptime(release["original_release_date"], "%Y-%m-%dT%H:%M:%S%z") - if original_release_date < oldest_supported_release_date: - continue - original_release_date = original_release_date.date().isoformat() - end_date = datetime.datetime.strptime(release["latest_release_date"], "%Y-%m-%dT%H:%M:%S%z") - end_date = end_date.date().isoformat() - lts = False - if "LTS until" in release["status"]: - lts = True - status = "done" - if release["series"] == "current": - status = "active" - if not first_active_rel_found: - status += ", current_rel" - first_active_rel_found = True - end_date = "6M" - if lts: - end_date = "4y" - mmd.write(f" {codename} {series_version}{" (LTS)" if lts else ""}" - f" :{status}, {original_release_date}, {end_date}\n") + first_active_rel_found = False + for release in releases_from_json: + codename = release["release_codename"] + series_version = release["series_version"] + if release["status"] == "Active Development": + mmd.write(f" {codename} {series_version} :done, after current_rel, 6M\n") + continue + if not release["original_release_date"]: + continue + original_release_date = datetime.datetime.strptime(release["original_release_date"], "%Y-%m-%dT%H:%M:%S%z") + if original_release_date < oldest_supported_release_date: + continue + original_release_date = original_release_date.date().isoformat() + end_date = datetime.datetime.strptime(release["latest_release_date"], "%Y-%m-%dT%H:%M:%S%z") + end_date = end_date.date().isoformat() + lts = False + if "LTS until" in release["status"]: + lts = True + status = "done" + if release["series"] == "current": + status = "active" + if not first_active_rel_found: + status += ", current_rel" + first_active_rel_found = True + end_date = "6M" + if lts: + end_date = "4y" + mmd.write(f" {codename} {series_version}{" (LTS)" if lts else ""}" + f" :{status}, {original_release_date}, {end_date}\n") - subprocess.check_call(["mmdc", "--input", mmdpath, "--output", args.output]) + mmd.flush() + + subprocess.check_call(["mmdc", "--input", mmd.name, "--output", args.output])