From patchwork Tue Mar 17 10:11:40 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 83617 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 36A54FD706A for ; Tue, 17 Mar 2026 10:12:01 +0000 (UTC) Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.72702.1773742311899628653 for ; Tue, 17 Mar 2026 03:11:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=h8UXG4S5; 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 5CD9D4E42639 for ; Tue, 17 Mar 2026 10:11:50 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 35E815FC9A for ; Tue, 17 Mar 2026 10:11:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8491B10450405; Tue, 17 Mar 2026 11:11:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1773742309; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=4hwKeFi1QzyrAewM8B3MpmUMDaWmK+7gWiQtmdTHIEY=; b=h8UXG4S5LA7VcTbl6JyTymOWZfavusglo83g5eyP2Bi8hesAe609mLmXHoBuqB+9pSsp05 Z+0S/I2xy2H2waqeTb0EAyqjgfX4BhfOuOv2m+TseL+Vb5CXQx61zlQEZfOqJmknKz6Xm5 xiYRavczhQeXIXmKo9SZxCi60b5xPt8ozQ9KSeOKEIbCB7XyZil4lSkVcugEweNRXTOFHo Cbj9Tiyy1AFUhqp7lM2rRNXMFj44FhA1tAixDeYd3sg0TWC6mqPZywidxCFBp3w+AyA47F NZklEOfZBNzNEikXIitLrxMzx10hUNJHzSTWcwLcexxWmj5EKmKBSgaWTn76ig== From: Antonin Godard Date: Tue, 17 Mar 2026 11:11:40 +0100 Subject: [PATCH 1/3] set_versions.py: use bitbake mappings from remote releases.json MIME-Version: 1.0 Message-Id: <20260317-use-remote-bitbake-version-mappings-v1-1-3c294fe04944@bootlin.com> References: <20260317-use-remote-bitbake-version-mappings-v1-0-3c294fe04944@bootlin.com> In-Reply-To: <20260317-use-remote-bitbake-version-mappings-v1-0-3c294fe04944@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2113; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=bCCFZrT5fm3/hQFMkhLRmtrhfQkTLi0ifrMI6Yu3rXM=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpuSjkxx56tAci/DHQO+7Yk0jmeXrRQzVvohfpi ImLnOFCuaiJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCabko5AAKCRDRgEFAKaOo NtItEACXtnW8wl6H+Gth5FcO1sA8zTAVMEVHP58baFZcnPawJnqzEcmjn+s8Nq8H8bWH0aGJhHa OkYD42AIiDO3Fe17S2EJhQ/hi5pXEiyr0UDWxZ0LXFPpc+6EoJczTbETtEnb+/L+WJpbnfgmPp+ eWlFF6kzknoEXmP1svUVrkJ0tx6f8n70yfCA+jkV7h3RTLNfCempWWVA7X+oo5wq2TyhZKYgJ6Z AMxhUVqS3f2RI1EyPkWygf3gXfCzaO+1Hvk3LizBDJyws57ujeVDYsWPyM5IF+1bmsDJqIhCM0/ bdcg2K2R6qPdTmaE0+Hmz3xuSmjMG77A9/svrlGi6iLDpvjbtRy4dlTZkPcqaSWk9eJqRO/Q1ti 2FsRv0E7JDLV6ziN5FcuH54FpXXOSTditGXUIquy2Z5+wDiDwkJ+q97LtSgsro71s4+q6rx7yoU rnkAtifPu42hiS2B0uPoUrYxNO9zZFQZrxruvO66XYVyief9T72lM/ZwOJx0pd3//GMlYLZxtg3 r2L4hpVBVMCDwj1zbpkl2L7bkXC7nbPd1l95hV7VSvXQtHk/R3X4OkKSiPV3f1Qu+t3bUUhlpYC UHG0J5qQOLsXiHFBrf7XK6ZaQPFraV0dGcBQnLB9/ST6PdYJ0lrA1qDbPTDiSiAmuLGddg7Icl5 4FKklI9YGneLQyA== 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 ; Tue, 17 Mar 2026 10:12:01 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/9091 After [1] we can now use the bitbake version mappings maintained in the remote releases.json file, allowing to reduce maintenance effort here. [1]: Signed-off-by: Antonin Godard --- documentation/set_versions.py | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/documentation/set_versions.py b/documentation/set_versions.py index 08be8c665..b1d65b21f 100755 --- a/documentation/set_versions.py +++ b/documentation/set_versions.py @@ -31,6 +31,12 @@ release_series = collections.OrderedDict({ "scarthgap": "5.0", "kirkstone": "4.0", }) +bitbake_mapping = collections.OrderedDict({ + "wrynose": "2.18", + "whinlatter": "2.16", + "scarthgap": "2.8", + "kirkstone": "2.0", +}) releases_from_json = {} @@ -57,6 +63,7 @@ if releases_from_json: activereleases = [] devbranch = "" ltsseries = [] + bitbake_mapping = collections.OrderedDict() for release in releases_from_json: codename = release["release_codename"].lower() @@ -67,6 +74,8 @@ if releases_from_json: activereleases.append(codename) if "LTS until" in release["status"]: ltsseries.append(codename) + if release["bitbake_version"]: + bitbake_mapping[codename] = release["bitbake_version"] activereleases.remove(devbranch) @@ -79,22 +88,6 @@ print(f"activereleases calculated to be {activereleases}") print(f"devbranch calculated to be {devbranch}") print(f"ltsseries calculated to be {ltsseries}") -bitbake_mapping = { - "wrynose" : "2.18", - "whinlatter" : "2.16", - "walnascar" : "2.12", - "styhead" : "2.10", - "scarthgap" : "2.8", - "nanbield" : "2.6", - "mickledore" : "2.4", - "langdale" : "2.2", - "kirkstone" : "2.0", - "honister" : "1.52", - "hardknott" : "1.50", - "gatesgarth" : "1.48", - "dunfell" : "1.46", -} - # 3.4 onwards doesn't have poky version # Early 3.4 release docs do reference it though poky_mapping = { From patchwork Tue Mar 17 10:11:41 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 83616 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 CE778FD7066 for ; Tue, 17 Mar 2026 10:12:00 +0000 (UTC) Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.72500.1773742312352866616 for ; Tue, 17 Mar 2026 03:11:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=Q0Cd0Ae4; 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 C90324E4263E for ; Tue, 17 Mar 2026 10:11:50 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id A16D05FC9A for ; Tue, 17 Mar 2026 10:11:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 189B410450447; Tue, 17 Mar 2026 11:11:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1773742310; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=LyhEq/vTVxSOOYmmrS+qR8HS0BZcssewK2vr1ZNSoG8=; b=Q0Cd0Ae47YRex4rRWh96ee22ryxcYU8zsyblS7CAos0REK8fda2HyxLonK0hhxISSbQpFu fTBum+1bcEvfsSqHMMZKYxqr/yQUY7zg8A+c22haothTTsQ0lsTWiYoXVdakdQebMeucbp +bTX6EGX9ozyRosdA6ZegOasPfCFUC4MH/RD0ecmwvyqbIvibDuhSQ1K7h3S7vscsfimZP BKeYg/m7idY88Ib2p7pFpA4oyZHeAtJT/pC9bteCT8lTGzC+DWmtMYJnZ4Tpt4FQHCbfsv YGLzlNGYxz0QC0Tr/Cn0rRKh3S6QyXqkIFOkcfUVoYw8OouhiKbz4Ci4Npowhw== From: Antonin Godard Date: Tue, 17 Mar 2026 11:11:41 +0100 Subject: [PATCH 2/3] set_versions.py: move the poky_mapping dict where it is used MIME-Version: 1.0 Message-Id: <20260317-use-remote-bitbake-version-mappings-v1-2-3c294fe04944@bootlin.com> References: <20260317-use-remote-bitbake-version-mappings-v1-0-3c294fe04944@bootlin.com> In-Reply-To: <20260317-use-remote-bitbake-version-mappings-v1-0-3c294fe04944@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1464; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=L1LaUKv0WCkrGOvRjaD3OxRHffJHhWQdnpATKVYCDkg=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpuSjkpAyYel9/0jCrY42ZgPdpd8YYOGMXjBOgC s4UigeKUISJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCabko5AAKCRDRgEFAKaOo NlLrD/9Lmvww2K9Kzg4pR1sqgC8IJBSoMfBUbUbEUl4MIADNPqTokO5tJMvcIFv2UzPMCrG6rad RY0fFHMl7xsnN36Z/WnFLMkbVQXqVHMMYGU+Ri69R4S1ZLyVwvLzZ0gI6vueIzpFt3Ug9ANCZin Y3zYv3A5gbtqelktc7Tcn+sQc7TOyp86yhR7HDb7x0sY8Zuqi9wWhGYS+y6wwaVnVVTsAp8GAr/ QWLfCmUmGk1+/ZO3CwV/YdTTQafp5hggi/B+XagP7p8IsTcFscB/U/gQ/glT0rEZEDiVjG8Avh9 0G+ar2j3GhiWbcqEIvrIdCCkq6BjUNWxkZf6ZyT0iRoM7x0DBVKBZmmHvFCb0pjH1Q22JEYIHWS b9zFo9PHyY3xTg1fmSma6BNDHKp0pk5uSWrzC6vcSIteGbAijpG7g/j0tlys3fuXtpAHKYkGFNe shycEc2Wbnw+JDNu0Zf57hBzjwNa9vdB/u4vbRcPjB64E4Vp8dudk2O0/aosC+fbr/+FXMf9YDi RdyyfX017LibTqVuy/96J7UY9urg2kHYUwvm5rJRbkja9ai8Lo45+rKQy+IaKjTtujmGJeip25L NooYfTPrQfv4Wd8zhzJ8DsDR/YbbjkVSiMG4MtKeVTF5JnniTQ5GWCQ8Len2OZUtdT5FsVyKpfo LzAftrxp1U0cANQ== 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 ; Tue, 17 Mar 2026 10:12:00 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/9092 The poky_mapping dict isn't used until after the replacements dict is created. Move it's definitions to where it's used. Also fix a codestyle issue while we're at it (whitespace before ":"). Signed-off-by: Antonin Godard --- documentation/set_versions.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/documentation/set_versions.py b/documentation/set_versions.py index b1d65b21f..25992e5a9 100755 --- a/documentation/set_versions.py +++ b/documentation/set_versions.py @@ -88,15 +88,6 @@ print(f"activereleases calculated to be {activereleases}") print(f"devbranch calculated to be {devbranch}") print(f"ltsseries calculated to be {ltsseries}") -# 3.4 onwards doesn't have poky version -# Early 3.4 release docs do reference it though -poky_mapping = { - "3.4" : "26.0", - "3.3" : "25.0", - "3.2" : "24.0", - "3.1" : "23.0", -} - ourversion = None ourseries = None ourbranch = None @@ -237,6 +228,15 @@ replacements = { "BITBAKE_SERIES" : bitbakeversion, } +# 3.4 onwards doesn't have poky version +# Early 3.4 release docs do reference it though +poky_mapping = { + "3.4": "26.0", + "3.3": "25.0", + "3.2": "24.0", + "3.1": "23.0", +} + if release_series[ourseries] in poky_mapping: pokyversion = poky_mapping[release_series[ourseries]] if ourversion != release_series[ourseries]: From patchwork Tue Mar 17 10:11:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 83618 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 49E0EFD706C for ; Tue, 17 Mar 2026 10:12:01 +0000 (UTC) Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.72703.1773742312781090941 for ; Tue, 17 Mar 2026 03:11:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=Hil5mGgX; 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 413604E42645 for ; Tue, 17 Mar 2026 10:11:51 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 179155FC9A for ; Tue, 17 Mar 2026 10:11:51 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 83E5B1045044A; Tue, 17 Mar 2026 11:11:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1773742310; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=I7GEuEmAGl3VKEb1yLAHtj40kb1DSCRCrtpikBy+o44=; b=Hil5mGgXeGSGJlJh4EZndX87PN+hhN1TD/Lv8xc1/S0XvXWuD4ZftwZuTCT7iCQ9Vjsz1u aYpakBiuSZ4te5DHbJDoBuWtL72eJElT8hc2tKOQx9KgcIE/d7fowo5A+NsUgNj8Sy0D7/ giQ4C1RdyTE97UfMKDDKqZizhIxRj14JsiatDsYVmyuAVze8DU6nO0pSd2ofrwlIMcWPz2 28PRcVDe7CN82dadj78wF1lxyKxO//qXITPTYC9zaNTbKp2xx+RMbUtRN88PB37ZWEVQ2c /Ws8NWaMDdLnGC/+VHCvJ+AMuagMejINiB+6rHF+haecTJqMY52GW8FpjnBELQ== From: Antonin Godard Date: Tue, 17 Mar 2026 11:11:42 +0100 Subject: [PATCH 3/3] set_versions.py: fix codestyle/formatting issues MIME-Version: 1.0 Message-Id: <20260317-use-remote-bitbake-version-mappings-v1-3-3c294fe04944@bootlin.com> References: <20260317-use-remote-bitbake-version-mappings-v1-0-3c294fe04944@bootlin.com> In-Reply-To: <20260317-use-remote-bitbake-version-mappings-v1-0-3c294fe04944@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=6380; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=5zy3C7ZRPq9NNVLZoynYKasX7umTycOzgPE7wwksbrw=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpuSjk8Y5yOnZwXNUCb5sGtDsG/oqUMVbrGVAid hxG9Qb0n5+JAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCabko5AAKCRDRgEFAKaOo NnrbEADJ0AaVUnokKEywa+vpiAqZZUOYr/02SMjH+h72LC1Qobv5ehHPOACE6UT67Wgs6ElIYGG mSjoGfEHjS981t0G0PWMfEy3G1Yvj63D284b6SLpkp/ORXHDx/ZYXrEAavwHuO1MoIfAduEGVqh vVntf0/gSSQXoVyLUiQkvbO4UGITVzbuNyeAswUyX6ApjD/LtXZ1A8QOJlsa+fUPT6zF5OMgVrn wWeHhIMdm60uhm5/1VwFcXYlhrXaAuF0kkeh2wRCSRjWOGfcOlPJW9DhN7THr9TDNoJq1q3frq6 1XLCT2pn8M9cYEmFL3Ct2xS5/4HdlLYR1wuTERVZYYSbJMTE95AwJGKTYQFdgdSzSjfGvVXAL/L pNZ6RQda+m0lSb3KTlpDxe7J8UFS59DdAXeM5VBEIHHo/vuPiocjNOB5C5pHpDR/PGoi+YDLGeJ dHNvvq6YcSPDHWVc18kPUOJIh0g3ytrZdzwffOZU8ZH9uidnBW38zseaHi9YGKXxYAuKuU3AU0d MLt2UrqeosKmSRXa2n2yoCoT2r27KanpBmuJaE2ArMJw6ogSPF3m/LTx4wnWQioChJwAKk8fOmN W+Gz9Pb32LAC2V1S4k8I6gv7fxLkHQdQUCF+SQOoaKdWkrXgpkjqME4nCBWUU1SIbe+IttYu8O0 8MV8rRJ+/MGvTpg== 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 ; Tue, 17 Mar 2026 10:12:01 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/9093 Fix issues reported by pycodestyle (long lines, spurious or missing whitespaces, underindented lines), and add the missing description of the get_abbrev_hash() function. Signed-off-by: Antonin Godard --- documentation/set_versions.py | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/documentation/set_versions.py b/documentation/set_versions.py index 25992e5a9..29638b324 100755 --- a/documentation/set_versions.py +++ b/documentation/set_versions.py @@ -98,7 +98,8 @@ is_branch_tip = False # Test that we are building from a Git repository try: - subprocess.run(["git", "rev-parse", "--is-inside-work-tree"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True) + subprocess.run(["git", "rev-parse", "--is-inside-work-tree"], + stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True) except subprocess.CalledProcessError: sys.exit("Building yocto-docs must be done from its Git repository.\n" "Clone the documentation repository with the following command:\n" @@ -106,12 +107,14 @@ except subprocess.CalledProcessError: # Test tags exist and inform the user to fetch if not try: - subprocess.run(["git", "show", "yocto-%s" % release_series[activereleases[0]]], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True) + subprocess.run(["git", "show", "yocto-%s" % release_series[activereleases[0]]], + stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True) except subprocess.CalledProcessError: sys.exit("Please run 'git fetch --tags' before building the documentation") # Try and figure out what we are -tags = subprocess.run(["git", "tag", "--points-at", "HEAD"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout +tags = subprocess.run(["git", "tag", "--points-at", "HEAD"], + stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout for t in tags.split(): if t.startswith("yocto-"): ourversion = t[6:] @@ -167,8 +170,8 @@ if ourversion is None: stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout.strip() branch_commit = subprocess.run(["git", "rev-parse", "--short", branch], - stdout=subprocess.PIPE, stderr=subprocess.PIPE, - universal_newlines=True).stdout.strip() + stdout=subprocess.PIPE, stderr=subprocess.PIPE, + universal_newlines=True).stdout.strip() if head_commit != branch_commit: ourversion += f"-{head_commit}" else: @@ -176,10 +179,11 @@ if ourversion is None: ourversion += "-tip" series = [k for k in release_series] -previousseries = series[series.index(ourseries)+1:] or [""] +previousseries = series[series.index(ourseries) + 1:] or [""] lastlts = [k for k in previousseries if k in ltsseries] or "dunfell" -latestreltag = subprocess.run(["git", "describe", "--abbrev=0", "--tags", "--match", "yocto-*"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout +latestreltag = subprocess.run(["git", "describe", "--abbrev=0", "--tags", "--match", "yocto-*"], + stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout latestreltag = latestreltag.strip() if latestreltag: if latestreltag.startswith("yocto-"): @@ -216,16 +220,16 @@ elif distro in ["dev", "next"]: print(f"DISTRO calculated to be {distro}") replacements = { - "DISTRO" : distro, + "DISTRO": distro, "DISTRO_LATEST_TAG": latesttag, "DISTRO_RELEASE_SERIES": release_series[ourseries], - "DISTRO_NAME_NO_CAP" : ourseries, - "DISTRO_NAME" : ourseries.capitalize(), - "DISTRO_NAME_NO_CAP_MINUS_ONE" : previousseries[0], - "DISTRO_NAME_NO_CAP_LTS" : lastlts[0], - "YOCTO_DOC_VERSION" : ourversion, - "DOCCONF_VERSION" : ourversion, - "BITBAKE_SERIES" : bitbakeversion, + "DISTRO_NAME_NO_CAP": ourseries, + "DISTRO_NAME": ourseries.capitalize(), + "DISTRO_NAME_NO_CAP_MINUS_ONE": previousseries[0], + "DISTRO_NAME_NO_CAP_LTS": lastlts[0], + "YOCTO_DOC_VERSION": ourversion, + "DOCCONF_VERSION": ourversion, + "BITBAKE_SERIES": bitbakeversion, } # 3.4 onwards doesn't have poky version @@ -266,7 +270,7 @@ def get_latest_tag(branch: str) -> str: stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout.split() branch_versions = sorted( - [v.replace("yocto-" + release_series[branch] + ".", "")\ + [v.replace("yocto-" + release_series[branch] + ".", "") .replace("yocto-" + release_series[branch], "0") for v in branch_versions], key=int) if not branch_versions: @@ -279,7 +283,7 @@ def get_latest_tag(branch: str) -> str: def get_abbrev_hash(ref: str) -> str: """ - Get the abbreviated hash of + Get the abbreviated hash of a ref using a call to git rev-parse. """ return subprocess.run(["git", "rev-parse", "--short", ref], stdout=subprocess.PIPE, stderr=subprocess.PIPE, @@ -310,7 +314,8 @@ print("switchers.js generated from switchers.js.in") # generate releases.rst -yocto_tags = subprocess.run(["git", "tag", "--list", "--sort=version:refname", "yocto-*"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout.split() +yocto_tags = subprocess.run(["git", "tag", "--list", "--sort=version:refname", "yocto-*"], + stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout.split() tags = [tag[6:] for tag in yocto_tags] with open('releases.rst', 'w') as f: @@ -354,5 +359,3 @@ with open('releases.rst', 'w') as f: if tag == release_series[series] or tag.startswith('%s.' % release_series[series]): f.write('- :yocto_docs:`%s Documentation `\n' % (tag, tag)) f.write('\n') - -