From patchwork Thu Apr 2 08:13:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 85142 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60F83CC6B2B for ; Thu, 2 Apr 2026 08:13:57 +0000 (UTC) Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.10991.1775117630109921606 for ; Thu, 02 Apr 2026 01:13:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=PICqvWpS; spf=pass (domain: bootlin.com, ip: 185.171.202.116, mailfrom: antonin.godard@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 78E5FC5997B for ; Thu, 2 Apr 2026 08:14:19 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D8F925FDEB for ; Thu, 2 Apr 2026 08:13:44 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 682D410451191; Thu, 2 Apr 2026 10:13:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1775117624; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=C8iIwj/dKRFXvUrYftH7Pqtg9K7OsJqWB7P16QlJrjo=; b=PICqvWpS9kN9HIxs7rESFHnn4QFsZBxYwNxlRbm7Zl6Hxgmu7d2tgePtiVxYLGezkXyoKT SoS6z4wSueVWf04D4oti7Z8nwMinjwqj9FxZC/rHSvtxeHuI7IsmUvtYw/UwSC/JmZCjlF +NH/ZNQrPTr0gv9YVP6kmXhBctoJUftX2Fnxup3gl1HFytF0nYUoVKAT1+Urg4d2sVchdc GNprQ3qIQGWv/4FqE+V2t6ny8jTkbBOWxHBksln3viLyc9do8WW6d8Vp13y/hlF6WU/Eo+ yh6ZdyJs6jryf55RA+KzRoCtCIL8w3OlokdzRT62kNqF309ZyYYoYWgVax0cCw== From: Antonin Godard Date: Thu, 02 Apr 2026 10:13:27 +0200 Subject: [PATCH 1/2] set_versions.py: skip laverne branch for closest branch MIME-Version: 1.0 Message-Id: <20260402-set-versions-fixes-v1-1-0609a8747b96@bootlin.com> References: <20260402-set-versions-fixes-v1-0-0609a8747b96@bootlin.com> In-Reply-To: <20260402-set-versions-fixes-v1-0-0609a8747b96@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1672; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=dVdJezkaV3DXiP5Ml4lElp2dCPqb4EdeZ8RwWRbx/fE=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpziUzXq4QepMQTGBQJPvvfKy5eIbECms8K3GNL whcrvCDOfeJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCac4lMwAKCRDRgEFAKaOo NmufD/9OV5Ggnx13dFC2EEzvYIiGB60wSVlDL1mvGbUe9GetNW8ZRTbhaKUCIFOb9FtPNHS3QJb AVQR3/ReNl/VxGBOl23gJvDgeLpKbR4EulQTphwL6EOyM5UxtHyXVvNq35vy+Ww/TDDgiVzrLE8 Xj6aGYaqJaGXHYysjb8jnnCB3leNT5MJicTf9/FPNnepRMI5ULlFzI7Lra/PCmAnohlS54fLkQh 3IZY+xp6FbbdDcPAfxI/3m9+OPZNrXljp8VTZRvPJw8Wf/6VGalizgJgdmTeig/aY0aguCuqeyF c8FvsziC2zTdyGKCjNBJZWWm3NGlpBJTP0+6IEkeDJYv2JKbg3WlNeASsOc2J+VC/35Df+xXFuX sB9kEqgKsT0AoDETFo4buQj7NfA7LjcCxh6+6lysF92CVt0pwkJpjbyuxX0sgUWi83jiAX+ZgIh piBcudxVoIUAJ2e8zdk9XprZZ9vPOg87uV/q4RWu78bsJ3aOotfWb8khaE/RXejEAa/95hgjdb+ YC+HrdEluGNjQzkK/scSiiK23HIEixuuxpdz87MYf1OQrgU6NggTDW1FAMoEKsW1rbFWjiWp9Zw mTYk3bmEZlAqP4E32Ts+DNpZ+Qt4HNqzXazGR29+WQQOsUdR7kFZQ2fKXYa5QEXk15a150ewuEC eIXqJE8k8GwMELw== 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 02 Apr 2026 08:13:57 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/9158 The laverne branch was created but never branched off, which breaks the algorithm trying to determine the closest branch as it always gets count 0. Skip this branch as it is old and we'll never branch off of it now. This fixes the following issue: Branch laverne has count 0 Nearest release branch estimated to be laverne Traceback (most recent call last): File "/data/yoctoproject/ws/repos/yocto-docs/documentation/./set_versions.py", line 167, in bitbakeversion = bitbake_mapping[ourseries] ~~~~~~~~~~~~~~~^^^^^^^^^^^ KeyError: 'laverne' Signed-off-by: Antonin Godard --- documentation/set_versions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/documentation/set_versions.py b/documentation/set_versions.py index 29638b324..465204998 100755 --- a/documentation/set_versions.py +++ b/documentation/set_versions.py @@ -142,6 +142,11 @@ if ourversion is None: result = subprocess.run(["git", "log", "--format=oneline", "HEAD..origin/" + b], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) + # The laverne branch was created but never branched off, which + # breaks this algorithm as this always gets count 0. Skip this + # branch as it is old and we'll never branch off of it now. + if b == "laverne": + continue if result.returncode == 0: count = result.stdout.count('\n') if not possible_branch or count < branch_count: From patchwork Thu Apr 2 08:13:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 85141 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77907CC6B2D for ; Thu, 2 Apr 2026 08:13:57 +0000 (UTC) Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.10992.1775117630134391623 for ; Thu, 02 Apr 2026 01:13:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=d3RPgONZ; spf=pass (domain: bootlin.com, ip: 185.171.202.116, mailfrom: antonin.godard@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 76BF7C5997A for ; Thu, 2 Apr 2026 08:14:19 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 5B324603BD for ; Thu, 2 Apr 2026 08:13:45 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B127910450221; Thu, 2 Apr 2026 10:13:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1775117625; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=eibZJwC8XzK/tMMsbXpcxkCIzoczp+oUI9baWDQg7SM=; b=d3RPgONZ0I8YKFu3k02C8YVifasjTT5W3scP90KYdeeSUS70rQuNtwLlPWdZM6nOPNFExR HesUT4u+Udb94gVFE7tVFOcREFmYs65SGrC/S0UjFZorHdOe1e1hUhVjBCD7YDw+jFwURi oVO4KXHJmSJs/+sm7eXAR6p/5/kZFvvM9SIuMzdcXZseM3oxdrutxCCbH6pZFSsqPQGXtk TXFUBJ4abJRRtMomY6VXwx6JpdaLkHPDbImdX4XZv/uK4fMA1UtZ2qBmd7sZSuuaEsx3en DzNIEuHLCSMjTmM1zY0/b4mPe32Kc/6biL6eKc7njt4rpUROfRayCGhTXpk0oA== From: Antonin Godard Date: Thu, 02 Apr 2026 10:13:28 +0200 Subject: [PATCH 2/2] set_versions.py: fix get_latest_tag and milestone tags MIME-Version: 1.0 Message-Id: <20260402-set-versions-fixes-v1-2-0609a8747b96@bootlin.com> References: <20260402-set-versions-fixes-v1-0-0609a8747b96@bootlin.com> In-Reply-To: <20260402-set-versions-fixes-v1-0-0609a8747b96@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1630; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=/77qgaq82rBYZ4P+NlQ+cseoUGXJ9J2XO1wnZdwomaM=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpziU0D19ei0kbmsTRQUlW48bMHpLq7Pekj3HvE /sFFcxIh+2JAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCac4lNAAKCRDRgEFAKaOo NgKTD/wNhoaU2vYIrVi6Iz4c5QyrmujQRKZ/3d7G4SvcjuaQp5uNCFwSfXv4bXZgdb0/Tf1eQ6A sgrqmJ+o9scw4E76jYgW6CARgvR1KqmEuE5VIA5OI+fDSp9Vy7wczQmfJei3/l6ebQKxkxyes2E riFPCj2I7gz2w108dDeGjM5p5pzO5feEjIYddbw8O3ByglctqRADfaNq8YTjQ+0pWwytibvOPIu 3aSjtLOB8TIq3BK92rUzYRr8BBub7Azf9y0gffp3ET0WI9leNmJ11Zij44jgekEWQv9VtdiCNmT eEJojckQ+AXsHGhilkfvZGNo+z9UFPHiHLHlD7IpT2uh5DBf0zeIkibL8R9RYLhsV0TZX8T2i6O T55bezPo2xdgSWFCHDnQ9BvD24ef9oqwF6fzbsEVbkFqNquiyAMcRZH43Ndg3hJwzgn6KKZgnRz uo0a0iHiR3uT97iew1oBJF5YxWbwEVhdpE3pO44D3VK+VaFD6q1KEep5BArZHBWL7nFHw/p3WEB XZFqbDSaD50P2Uj2nz2IZDcnn5z9Q6oE19yVq7+UEJEXAD64HtPDpFm8TA8euvYjYFsrGwe5Yz9 Nw7pV12yYqUqAEPe4FfIDEdmM+yQEIPweEVbKgG3O+woQATIlSgvrjJhGd5vwl+CiR663hm9KKl qJnuJftm4o8u9hQ== 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 02 Apr 2026 08:13:57 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/9159 Milestone tags have a different format, e.g. 6.0_M1. This was breaking this algorithm with: File ".../yocto-docs/documentation/./set_versions.py", line 277, in get_latest_tag branch_versions = sorted( [v.replace("yocto-" + release_series[branch] + ".", "") .replace("yocto-" + release_series[branch], "0") for v in branch_versions], key=int) ValueError: invalid literal for int() with base 10: '0_M1' Signed-off-by: Antonin Godard --- documentation/set_versions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/documentation/set_versions.py b/documentation/set_versions.py index 465204998..375f96d99 100755 --- a/documentation/set_versions.py +++ b/documentation/set_versions.py @@ -274,9 +274,13 @@ def get_latest_tag(branch: str) -> str: branch_versions = subprocess.run(["git", "tag", "--list", f'yocto-{release_series[branch]}*'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout.split() + # Sort the branches as integers + # On milestone tags (e.g. 6.0_M2), remove everything after "_" (including + # "_") branch_versions = sorted( [v.replace("yocto-" + release_series[branch] + ".", "") - .replace("yocto-" + release_series[branch], "0") for v in branch_versions], + .replace("yocto-" + release_series[branch], "0") + .split("_")[0] for v in branch_versions], key=int) if not branch_versions: return ""