From patchwork Tue Jan 27 16:04:58 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Woolley X-Patchwork-Id: 79874 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 55866D340AA for ; Tue, 27 Jan 2026 16:05:21 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15114.1769529915105075590 for ; Tue, 27 Jan 2026 08:05:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=grlmB4Cu; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=5487f82e02=rob.woolley@windriver.com) Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RBpuZ8880612 for ; Tue, 27 Jan 2026 08:05:14 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=QeSdJdSAJDn/TYYD0RfRnNOFhR3Zj+VeZDyDLHrZNeU=; b=grlmB4CutQSY zI09zuDXMcCFAaajt+Pelb4Q5x232ZNN1cfgbq8WkemJmFsQW09C65FSn1dbfCul p8Fvz/R+5UOnsDbetaPRz/wVH/efNJM8XymHWwlauzDX+18QoZLkOp3zHzMm8oWi In9l5X8k7UarKKI41riR2i/nArvQtA0wL/JZcB9J9Yo7/XwicnJkdOJWv7ahpNON So4KMnWxyOC474HdKVyEu5m7go1q/fI0PYrgEqRatXeG8UuUqq6I95hncTzjcOsF 9RSUlAwiUH5Cro+uQ8ja5mezobsB58wC8/KSnkTxkdn6PP7l+2lSj49Hh1JJc7vk vGXMAQlyEg== Received: from ala-exchng01.corp.ad.wrs.com (ala-exchng01.wrs.com [128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4bvxfm33xy-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 08:05:14 -0800 (PST) Received: from ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Tue, 27 Jan 2026 08:05:13 -0800 Received: from ala-lpggp2.wrs.com (10.11.232.110) by ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Tue, 27 Jan 2026 08:05:13 -0800 From: Rob Woolley To: Subject: [PATCH v2 01/10] bitbake-setup: Add the conditional script stanza Date: Tue, 27 Jan 2026 08:04:58 -0800 Message-ID: <20260127160508.3392732-2-rob.woolley@windriver.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260127160508.3392732-1-rob.woolley@windriver.com> References: <20260127160508.3392732-1-rob.woolley@windriver.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: vufpZrQBmWl0SyHmcYbJGBraWZ3gRoB9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMSBTYWx0ZWRfX6TkDp5+sXhqc +E2aSJ5PGP410mjOWt3fqT6vBMACWYBiGpL0IfFQ0SpDSEGLsJEIqIrmMpWSNIR+J65eSXsTFr5 ZBeJavJ78QUfsliLf2OmfXP3GvgS6gOLINLUbxEPDKTVX56W1FXlMbGFkdBrK2c0MnV0GdXmjle flZVwcOgOJvGiySrc6JIE70lZlZ1ZzRJ4XkhnGBPx8SeK9eyHsVfboioU/LWJmwTJXrsAjhxxDz xw2gQBF3JOsescYovoakQoLntNSA2gupWphYO64QgReBL7QqgkJCWoHXHEPuLuTQslueeMPWq/N O6IxZP8XTfgtI+LR6vofL7zezPPWvdwzoKDZVT2dw7LUVSv7S2RwYxWStHOxr0bsGi3T4gEyHOB zZQTZ4ejKhdRb+yKPrgw1dj8P+s4w/ldSpumApP4Xg0SqWoC9kmGOZkffd50wICOQaiMlbIkUEV AVqMEC59sC+UG1XXbIg== X-Authority-Analysis: v=2.4 cv=Lo+fC3dc c=1 sm=1 tr=0 ts=6978e23a cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=vUbySO9Y5rIA:10 a=VkNPw1HP01LnGYTKEx00:22 a=t7CeM3EgAAAA:8 a=_k73aZGFW5cUGM1rhHsA:9 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: vufpZrQBmWl0SyHmcYbJGBraWZ3gRoB9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270131 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, 27 Jan 2026 16:05:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18890 This ensures that the main function is only executed if the module is executed in the top-level environment. Signed-off-by: Rob Woolley --- bin/bitbake-setup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index a69dc750..d23582dd 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -1106,4 +1106,5 @@ def main(): from argparse import Namespace parser.print_help() -main() +if __name__ == '__main__': + main() From patchwork Tue Jan 27 16:04:59 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Woolley X-Patchwork-Id: 79878 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 59F28D340A6 for ; Tue, 27 Jan 2026 16:05:21 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15116.1769529915542139021 for ; Tue, 27 Jan 2026 08:05:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=GMp5DY4N; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=5487f82e02=rob.woolley@windriver.com) Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RBpuZ9880612 for ; Tue, 27 Jan 2026 08:05:15 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=hTYhKnLxVNuUm/l03MebA2owk9jYisP3RLBtLE5TNng=; b=GMp5DY4Nz+TU 0d/5SVe3euhjgUWwgc/5SLZiiDTubIc0t/813wZfb75mbgc3exoOsu1820c2nOci Oy/sI0jFCdvTTlBfFpE5cJDcbdiqjtEKo791ktEfYgpmhQl1dFVd5sdFLiq4hDkJ G0T+9g7dw1DAvk6MSjLCsH6KmAvRZTPGHv14qsbUWjU5DpwUEnBzx+Dk7bK9iBp4 uTBCG71bX37PomoXcTAiH+tT9HVDifKJgOKNZmLABKtecMgIH6sTBeRL0oOD2UDH otaaS0C6y0i/2c+uGJVs6+7JhJszZTXQXmHh9JNwdEmHvTWDXQvmvYaoTrldoStR qCWOJd/vJw== Received: from ala-exchng01.corp.ad.wrs.com (ala-exchng01.wrs.com [128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4bvxfm33xy-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 08:05:14 -0800 (PST) Received: from ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Tue, 27 Jan 2026 08:05:13 -0800 Received: from ala-lpggp2.wrs.com (10.11.232.110) by ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Tue, 27 Jan 2026 08:05:13 -0800 From: Rob Woolley To: Subject: [PATCH v2 02/10] bitbake-setup: Add pypi packaging Date: Tue, 27 Jan 2026 08:04:59 -0800 Message-ID: <20260127160508.3392732-3-rob.woolley@windriver.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260127160508.3392732-1-rob.woolley@windriver.com> References: <20260127160508.3392732-1-rob.woolley@windriver.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: FhNNxPC2NPaDGleMYWiLpqxfR-E1kLLX X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMSBTYWx0ZWRfX/VPAdnJXGO1B PNbENhb5dXtzty9ot3JMbzPBuWd0gxMW6jX5iXk+2bT6j6mMg/p8ALlSxfmCcgIs/IFOLu9Vujb Cpzj/o6mhTKsG5ft8tyT5hE9CBvf0480JFWqYwMyBHrHUs1nRD5FyjeCOd2ahYnKcWdyxQKQL1g UR/Ex5HjuvRnERsVNDpcxpyyrAobjfetOsbro9E6xqnDm4aAjrMmkaGKNLEnsseIgZ3doMubemj csOYKxVFt+W4frQ+aVMdXUOyudxLS0fiPWloSJwrShepD5SoJWLbTkLGsEohn14KkzmOUMkkogi eKPOj0pQxRO35XyzkVdaU6qB7g34aNZdAnzdCZ8wdfbWpdqAsrqz0PMxU2dk6SvBmZ5uGret8BO qQE7Xdq97zpEDxtKL3fylDrdw4U3NmDd8caIkcaWd2a3ssXgwweUEU77d4uJiKF2/slW+oo34Us 13pjiJD7parcx7FfQpQ== X-Authority-Analysis: v=2.4 cv=Lo+fC3dc c=1 sm=1 tr=0 ts=6978e23b cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=vUbySO9Y5rIA:10 a=VkNPw1HP01LnGYTKEx00:22 a=24AZYWMyAAAA:8 a=iGHA9ds3AAAA:8 a=Q4-j1AaZAAAA:8 a=t7CeM3EgAAAA:8 a=qV09NasGAAAA:8 a=ue5rBGj6qoDf4QOmq34A:9 a=abPTvJue_RwA:10 a=bG88sKzkDEFeXWNnvthB:22 a=nM-MV4yxpKKO9kiQg6Ot:22 a=9H3Qd4_ONW2Ztcrla5EB:22 a=FdTzh2GWekK77mhwV6Dw:22 a=GlicbclHOgpI_Rq0ze_Y:22 X-Proofpoint-GUID: FhNNxPC2NPaDGleMYWiLpqxfR-E1kLLX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270131 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, 27 Jan 2026 16:05:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18891 Signed-off-by: Rob Woolley --- .gitignore | 1 + contrib/pypi/BUILD.md | 57 ++++++++++++++++ contrib/pypi/LICENSE | 9 +++ contrib/pypi/README.md | 42 ++++++++++++ contrib/pypi/noxfile.py | 30 +++++++++ contrib/pypi/package-bitbake-setup.py | 93 +++++++++++++++++++++++++ contrib/pypi/pyproject.toml | 97 +++++++++++++++++++++++++++ contrib/pypi/tests/test_install.py | 17 +++++ 8 files changed, 346 insertions(+) create mode 100644 contrib/pypi/BUILD.md create mode 100644 contrib/pypi/LICENSE create mode 100644 contrib/pypi/README.md create mode 100644 contrib/pypi/noxfile.py create mode 100755 contrib/pypi/package-bitbake-setup.py create mode 100644 contrib/pypi/pyproject.toml create mode 100644 contrib/pypi/tests/test_install.py diff --git a/.gitignore b/.gitignore index a6a256b2..9a5c4ec4 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ lib/toaster/contrib/tts/backlog.txt lib/toaster/contrib/tts/log/* lib/toaster/contrib/tts/.cache/* lib/bb/tests/runqueue-tests/bitbake-cookerdaemon.log +packaging_workspace/ diff --git a/contrib/pypi/BUILD.md b/contrib/pypi/BUILD.md new file mode 100644 index 00000000..3c50b6e1 --- /dev/null +++ b/contrib/pypi/BUILD.md @@ -0,0 +1,57 @@ +# Development Instructions + +## Requirements + +- Python >= 3.9 +- pip >= 19 (for installation) +- git (for SCM-based versioning) + +## Automated testing + +The steps to lint, build, and test the bitbake-setup pypi packaging have been automated with the nox tool. This tool automatically creates a Python virtual environment for you. + +To run the linters do: +```bash +nox -s lint +``` + +To run the build do: +```bash +nox -s build +``` + +To run the tests do: +```bash +nox -s tests +``` + +## Manual Steps + +### Building + +To install the development tools manually run: +```bash +python3 -m pip install -e '.[dev]' +``` + +To build a wheel (.whl) then use: +```bash +python3 -m build +``` + +This produces a wheel (.whl) file in the dist directory. This may be installed using pip. + +### Testing + +```bash +python3 -m pip install -e '.[test]' +pytest +``` + +### Linting + +```bash +python3 -m pip install -e '.[lint]' + +ruff check src/bitbake_setup +``` \ No newline at end of file diff --git a/contrib/pypi/LICENSE b/contrib/pypi/LICENSE new file mode 100644 index 00000000..f9b44182 --- /dev/null +++ b/contrib/pypi/LICENSE @@ -0,0 +1,9 @@ +bitbake-setup is licensed under the GNU General Public License version 2.0. See +LICENSE.GPL-2.0-only for further details. + +Individual files contain the following style tags instead of the full license text: + + SPDX-License-Identifier: GPL-2.0-only + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/contrib/pypi/README.md b/contrib/pypi/README.md new file mode 100644 index 00000000..a6dd99e0 --- /dev/null +++ b/contrib/pypi/README.md @@ -0,0 +1,42 @@ +# bitbake-setup + +This package provides the `bitbake-setup` command and the Python modules +required to support BitBake setup and configuration. + +## Usage + +Instructions on uses of bitbake-setup can be found in +[Setting Up the Environment With bitbake-setup](https://docs.yoctoproject.org/bitbake/dev/bitbake-user-manual/bitbake-user-manual-environment-setup.html) from the Yocto Project manual. + +List the available configurations; +```bash +bitbake-setup list +``` + +Show the help for the bitbake-setup init subcommand: +```bash +bitbake-setup init --help +usage: bitbake-setup init [-h] [--non-interactive] [--source-overrides SOURCE_OVERRIDES] [--setup-dir-name SETUP_DIR_NAME] [--skip-selection SKIP_SELECTION] [-L SOURCE_NAME PATH] + [config ...] + +positional arguments: + config path/URL/id to a configuration file (use 'list' command to get available ids), followed by configuration options. Bitbake-setup will ask to choose from available + choices if command line doesn't completely specify them. + +options: + -h, --help show this help message and exit + --non-interactive Do not ask to interactively choose from available options; if bitbake-setup cannot make a decision it will stop with a failure. + --source-overrides SOURCE_OVERRIDES + Override sources information (repositories/revisions) with values from a local json file. + --setup-dir-name SETUP_DIR_NAME + A custom setup directory name under the top directory. + --skip-selection SKIP_SELECTION + Do not select and set an option/fragment from available choices; the resulting bitbake configuration may be incomplete. + -L SOURCE_NAME PATH, --use-local-source SOURCE_NAME PATH + Symlink local source into a build, instead of getting it as prescribed by a configuration (useful for local development). +``` + +To initialize a workspace for the Poky reference distro using the development branch (ie. "master") of OpenEmbedded: +```bash +bitbake-setup init poky-master +``` \ No newline at end of file diff --git a/contrib/pypi/noxfile.py b/contrib/pypi/noxfile.py new file mode 100644 index 00000000..ab226547 --- /dev/null +++ b/contrib/pypi/noxfile.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python3 + +import glob +import nox +from pathlib import Path + +nox.options.sessions = ["lint", "tests", "build"] + +@nox.session +def lint(session): + session.install("ruff", "mypy") + session.run("ruff", "check", "src/bitbake_setup") + # Ignore mypy for now as there are too many errors in imported modules + # session.run("mypy", "src/bitbake_setup") + +@nox.session +def tests(session): + session.install(".[test]") + session.run("pytest") + +@nox.session +def build(session): + session.install("build", "twine") + session.run("python", "-m", "build") + + # Verify the wheel installs cleanly + wheels = list(Path("dist").glob("*.whl")) + session.install(str(wheels[0])) + session.run("bitbake-setup", "--help") + session.run("bitbake-setup", "list") \ No newline at end of file diff --git a/contrib/pypi/package-bitbake-setup.py b/contrib/pypi/package-bitbake-setup.py new file mode 100755 index 00000000..3a07e911 --- /dev/null +++ b/contrib/pypi/package-bitbake-setup.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 + +import argparse +import logging +import os +import shutil +from pathlib import Path + +def create_packaging_workspace(directory): + # Create the directory for packaging workspace + if len(directory or "") > 0: + workspace_dir = Path(directory) + else: + # This script is located in contrib/pypi/package-bitbake-setup.py + workspace_dir = Path(__file__).parents[2] / "packaging_workspace" + + if not workspace_dir.exists(): + logging.debug(f"Created packaging workspace at: {workspace_dir}") + workspace_dir.mkdir(exist_ok=True) + else: + logging.debug(f"Packaging workspace already exists at: {workspace_dir}") + + # Copy packaging files to the workspace + files_to_copy = [ + "contrib/pypi/pyproject.toml", + "contrib/pypi/README.md", + "contrib/pypi/LICENSE", + "contrib/pypi/noxfile.py", + "LICENSE.MIT", + "LICENSE.GPL-2.0-only" + ] + + for file in files_to_copy: + src_path = Path(__file__).parents[2] / file + dest_path = workspace_dir / Path(file).name + + if src_path.is_dir(): + shutil.copytree(src_path, dest_path, dirs_exist_ok=True) + logging.debug(f"Copied directory: {src_path} to {dest_path}") + else: + shutil.copy2(src_path, dest_path) + logging.debug(f"Copied file: {src_path} to {dest_path}") + + + # Copy necessary modules to the workspace + modules_to_copy = [ + "lib/bb", + "lib/bs4", + "lib/ply" + ] + + for module in modules_to_copy: + src_path = Path(__file__).parents[2] / module + dest_path = workspace_dir / "src" / Path(module).name + + if src_path.is_dir(): + shutil.copytree(src_path, dest_path, dirs_exist_ok=True) + logging.debug(f"Copied module directory: {src_path} to {dest_path}") + else: + shutil.copy2(src_path, dest_path) + logging.debug(f"Copied module file: {src_path} to {dest_path}") + + # Create bitbake_setup module + bitbake_setup_dir = Path(workspace_dir / "src" / "bitbake_setup") + bitbake_setup_dir.mkdir(exist_ok=True) + Path(bitbake_setup_dir / "__init__.py").touch() + shutil.copy2(Path(__file__).parents[2] / "bin" / "bitbake-setup", str(bitbake_setup_dir / "__main__.py")) + + # Create codegen module + codegen_dir = Path(workspace_dir / "src" / "codegen") + codegen_dir.mkdir(exist_ok=True) + Path(codegen_dir / "__init__.py").touch() + shutil.copy2(Path(__file__).parents[2] / "lib" / "codegen.py", str(codegen_dir / "__main__.py")) + + # Copy tests + tests_dir = Path(workspace_dir / "tests") + tests_dir.mkdir(exist_ok=True) + shutil.copytree(Path(__file__).parents[2] / "contrib" / "pypi" / "tests", str(tests_dir), dirs_exist_ok=True) + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') + + parser = argparse.ArgumentParser(description='Package bitbake-setup for PyPI') + parser.add_argument('-v', '--verbose', action='store_true', help='increase output verbosity.') + parser.add_argument('-d', '--directory', type=str, help='specify the directory to create the packaging workspace in.') + + args = parser.parse_args(); + + if args.verbose: + logging.getLogger().setLevel(logging.DEBUG) + + create_packaging_workspace(args.directory); diff --git a/contrib/pypi/pyproject.toml b/contrib/pypi/pyproject.toml new file mode 100644 index 00000000..53d5ffc1 --- /dev/null +++ b/contrib/pypi/pyproject.toml @@ -0,0 +1,97 @@ +[build-system] +requires = [ + "setuptools>=64", + "setuptools_scm[toml]>=8", +] +build-backend = "setuptools.build_meta" + +[project] +name = "bitbake-setup" +dynamic = ["version"] +description = "bitbake-setup" +readme = "README.md" +requires-python = ">=3.9" +license = "GPL-2.0-only AND MIT" +authors = [ + { name = "OpenEmbedded BitBake Developers", email = "bitbake-devel@lists.openembedded.org" } +] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: POSIX :: Linux", +] + +dependencies = [ + # BitBake is mostly self-contained +] + +[project.optional-dependencies] +test = [ + "pytest>=7", +] + +lint = [ + "ruff>=0.3", + "mypy>=1.8", +] + +dev = [ + "nox>=2022.11.21", + "pytest>=7", + "ruff>=0.3", + "mypy>=1.8", + "build", + "twine", +] + +[project.scripts] +bitbake-setup = "bitbake_setup.__main__:main" + +[project.urls] +Homepage = "https://git.openembedded.org/bitbake/" +Documentation = "https://docs.yoctoproject.org/bitbake/dev/bitbake-user-manual/" +Repository = "https://git.openembedded.org/bitbake/" + +[tool.mypy] +python_version = "3.9" +warn_unused_configs = true +ignore_missing_imports = true +no_implicit_optional = true +check_untyped_defs = false + +[tool.ruff] +target-version = "py39" +line-length = 88 +src = ["src"] + +[tool.ruff.lint] +select = [ + "E", # pycodestyle + "F", # pyflakes + "B", # flake8-bugbear + "I", # import sorting +] +ignore = [ + "E501", # line length (handled by formatter) +] + +[tool.ruff.format] +quote-style = "double" +indent-style = "space" + +[tool.setuptools] +package-dir = { "" = "src" } +zip-safe = false +include-package-data = true + +[tool.setuptools.packages.find] +where = ["src"] +include = [ + "bb*", + "bitbake_setup", + "bs4*", + "codegen", + "ply" +] + +[tool.setuptools_scm] +fallback_version = "0.0.0" \ No newline at end of file diff --git a/contrib/pypi/tests/test_install.py b/contrib/pypi/tests/test_install.py new file mode 100644 index 00000000..26c28261 --- /dev/null +++ b/contrib/pypi/tests/test_install.py @@ -0,0 +1,17 @@ +import subprocess +import sys + +def test_imports(): + import bb + import bs4 + import ply + import bitbake_setup + +def test_console_script(): + result = subprocess.run( + ["bitbake-setup", "--help"], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True, + ) + assert result.returncode == 0 From patchwork Tue Jan 27 16:05:00 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Woolley X-Patchwork-Id: 79870 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 27E73D340A1 for ; Tue, 27 Jan 2026 16:05:21 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15117.1769529915803519081 for ; Tue, 27 Jan 2026 08:05:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=IRWiE7go; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=5487f82e02=rob.woolley@windriver.com) Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RBpuZA880612 for ; Tue, 27 Jan 2026 08:05:15 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=Vu7ViNbw0FT5GHkXZi45/KNPUFZcCCbMRbqd9a14dUA=; b=IRWiE7gozWPt orLjQ9xLgshdglocfZUUSf8EGIA3oq5uAzPyXDduDq41NbEaLLJ0HVk6J2KRp2OV Jvf1zlid3iCduILJEoU3DgVb0iIA7Y0aqhlDFomU7aQ2zzWuO4ruphnAGj1mUdP/ rz7wZnjzJ91blwda+p5MlVSh4Gih3k9wAnKZBXtd87DocPwB7bES72FwwcB/M8fn mwTnROEe3ak6W/e5xxUhFuhPxfcpoPGzxSC/0dNwdfqYZpqb8JhK2oILyDuXcl0j p6bGtYD7vHo0f+63o6lkitcPM+RBdOpL2LMXtKKVYFMEJvBCkrkjMCyIPIt+ZehP t4u0Dkz5FA== Received: from ala-exchng01.corp.ad.wrs.com (ala-exchng01.wrs.com [128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4bvxfm33xy-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 08:05:15 -0800 (PST) Received: from ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Tue, 27 Jan 2026 08:05:14 -0800 Received: from ala-lpggp2.wrs.com (10.11.232.110) by ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Tue, 27 Jan 2026 08:05:14 -0800 From: Rob Woolley To: Subject: [PATCH v2 03/10] bitbake-setup: Remove extraneous variable from str.format() Date: Tue, 27 Jan 2026 08:05:00 -0800 Message-ID: <20260127160508.3392732-4-rob.woolley@windriver.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260127160508.3392732-1-rob.woolley@windriver.com> References: <20260127160508.3392732-1-rob.woolley@windriver.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: L89GWLr-Qh3S62_PH7LpEya7xZEUaTZZ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMSBTYWx0ZWRfXyENWek++9x5f iKNmB473Fl4iJ8aFSpoNT+bOv8V/yHV3UnsTVW0FkZgDOmZ7us4k7dhHYSj5LUGQvvcPNDBCTUQ i+BsvAm3e4RcE9Lq3fGewF0za0DhnY+tkBov3Sz7oTAguOunpCVrOBbo4Zmz5MEocsIW5TCSflk agDBFqcfhCNCU016y4zTOqo0RcDdAA3ChjWb8uorThHkCr/senXzGk1SPiJnUV1Gvc8g9P9BBmO 4A/J6JJGsKbPHhaL05IHNu/EAm5Oh5QjiMpl0JARZPPTXZ3LZYBhSrt/pvLN2FVelrRg6rzNsIF 3ut83Vc82PNY6MMw0oAj6vDScjUa9JvinYy52sDQMQSccm7nlRv9/e7781ySDlAAfjbZkIctK9+ EnwuWyk8OHIxKXNSBJDbq0oIQmT5N2sTD4oa8cs43e1rRqrOfMTqVeQdzyGDtVChJ9UNz4jxfpR Pfksk1fqwpJaDqgiQeA== X-Authority-Analysis: v=2.4 cv=Lo+fC3dc c=1 sm=1 tr=0 ts=6978e23b cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=vUbySO9Y5rIA:10 a=VkNPw1HP01LnGYTKEx00:22 a=t7CeM3EgAAAA:8 a=2V6DY6BgAAAA:8 a=njUzwRyDVfN587gzVRIA:9 a=FdTzh2GWekK77mhwV6Dw:22 a=ldqKKs2zR4t-S6fqr-1n:22 X-Proofpoint-GUID: L89GWLr-Qh3S62_PH7LpEya7xZEUaTZZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270131 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, 27 Jan 2026 16:05:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18892 The invocation of str.format() supplied an extra parameter that was not being referenced in the string. Signed-off-by: Rob Woolley --- bin/bitbake-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index d23582dd..a52a95b8 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -1093,7 +1093,7 @@ def main(): list_configs(all_settings, args) return - logger.info('Bitbake-setup is using {} as top directory.'.format(top_dir, global_settings_path(args))) + logger.info('Bitbake-setup is using {} as top directory.'.format(top_dir)) if args.func == init_config: init_config(top_dir, all_settings, args) From patchwork Tue Jan 27 16:05:01 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Woolley X-Patchwork-Id: 79873 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 38362D340A4 for ; Tue, 27 Jan 2026 16:05:21 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14886.1769529916172075486 for ; Tue, 27 Jan 2026 08:05:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=iEXmsqMX; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=5487f82e02=rob.woolley@windriver.com) Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RBpuZB880612 for ; Tue, 27 Jan 2026 08:05:15 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=HZnmh1DoO1RQUKcBrz2BjZsGjon5gv84p3593IPKBS4=; b=iEXmsqMX2Byc n1L70DZ00DlRlpqaORilF6QVkO8dxS1QG0whgbtK3VwadSURdNyziY9CN8p69j4G Ot/16DnwKkZNoY9EiiMlco417X+XSdv+3wOHpPwykG3tk1LZt2IJZKIkTE/wLxMm ftz5448Ed1ktgIezCesdz/DyMqm1NjrMwKzDwMkKFZH20kyY3BYcWcSSqCFx45n7 +s05FLxKTsusdUQfMmPU0kpEnzcZViA2NXlLs1Bc8jaV+5eRqsAHJRMErYqtpkDO K1GJMVdX8BSE7IpxQh7uVR6m5wsVKUynmHkcxuyT5GcYuQuKVXD5gtAe6/2Oo5c1 VVoV4t352A== Received: from ala-exchng01.corp.ad.wrs.com (ala-exchng01.wrs.com [128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4bvxfm33xy-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 08:05:15 -0800 (PST) Received: from ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Tue, 27 Jan 2026 08:05:14 -0800 Received: from ala-lpggp2.wrs.com (10.11.232.110) by ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Tue, 27 Jan 2026 08:05:14 -0800 From: Rob Woolley To: Subject: [PATCH v2 04/10] bitbake-setup: Sort and format imports Date: Tue, 27 Jan 2026 08:05:01 -0800 Message-ID: <20260127160508.3392732-5-rob.woolley@windriver.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260127160508.3392732-1-rob.woolley@windriver.com> References: <20260127160508.3392732-1-rob.woolley@windriver.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: gyy0ktMBI06G0OF1Aw8YIgg0NWkmN26R X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMSBTYWx0ZWRfX2PmLV4hS36Ze 5oezsjStBV6gMWuATmOLFG5PBejo1jIp/V1PRmQ87sefo4bk3RzvECBAiaNjCQYvWmiBSWt8kHg UJgCFSrtUp/5WegzfUHMH80U+P+65ZLHUWxm8dXl3EDJaWC9WdiL0YX8zo7dwH3t4kz0Y/ExQlR Zb2itmM+basDLyfenQziHfZ/sochDhPwjyxLzjG9snFxrWmIs599aydvxeIMf3oQyd4A5zlzC52 /teTBvJbqkiVci5s9Wiu5Apyt6jzwnJ0UARe+nq7NYBowMvQ24JeYWtIadvU4qtS+Xv9ZN90B9d 6LW28A5QcWVnvTMaiEcpkbOhyNGJkegcVLZY7oV+n2W+eLTh7KVjeR3NUGjHfGg73PupJlxb+Xm ynUchFr2Fvw9ayiSeVWULI6Jt0/zJTj1bcRjKT6PVx7EhYyGSXIy8gEuq7rfUhC7144+bHgNBzj LHPi494BIZ2AC0hlqxQ== X-Authority-Analysis: v=2.4 cv=Lo+fC3dc c=1 sm=1 tr=0 ts=6978e23b cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=vUbySO9Y5rIA:10 a=VkNPw1HP01LnGYTKEx00:22 a=t7CeM3EgAAAA:8 a=NhU3BdNfeI68Uu5h_4oA:9 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: gyy0ktMBI06G0OF1Aw8YIgg0NWkmN26R X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270131 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, 27 Jan 2026 16:05:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18893 The ruff linting tool reported 2 problems: I001 Import block is un-sorted or un-formatted E402 Module level import not at top of file Signed-off-by: Rob Woolley --- bin/bitbake-setup | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index a52a95b8..2b611864 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -4,29 +4,28 @@ # SPDX-License-Identifier: GPL-2.0-only # -import logging -import os -import sys import argparse -import json -import shutil -import time import configparser +import copy import datetime +import functools import glob -import subprocess -import copy -import textwrap +import json +import logging +import os +import shutil import signal -import functools import string - -bindir = os.path.abspath(os.path.dirname(__file__)) -sys.path[0:0] = [os.path.join(os.path.dirname(bindir), 'lib')] +import subprocess +import sys +import textwrap +import time import bb.msg import bb.process +bindir = os.path.abspath(os.path.dirname(__file__)) +sys.path[0:0] = [os.path.join(os.path.dirname(bindir), 'lib')] logger = bb.msg.logger_create('bitbake-setup', sys.stdout) # These settings can only be set in the global context From patchwork Tue Jan 27 16:05:02 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Woolley X-Patchwork-Id: 79872 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 468B3D340A5 for ; Tue, 27 Jan 2026 16:05:21 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14888.1769529916485594113 for ; Tue, 27 Jan 2026 08:05:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=dZLuEe99; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=5487f82e02=rob.woolley@windriver.com) Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RBpuZC880612 for ; Tue, 27 Jan 2026 08:05:16 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=dYnHEIL01zf43US/m5Ynn28q9dBjsHpUUoHr3TWpUk8=; b=dZLuEe99r63u afIDUXwKKzQYa9C0r15+OVgwkAGWx4hxFA6NHZUiqfWep01tPju312PxSlZr1P9N 4n/PaJZDnI79ivas0hj6PJCsNeFnKX9YFeyIlGVJ7D5NWCswcrAIxN+gJ2TxboBX UPf0GXS4Oaf/AGujj8eO3q80pbPlukwzA6UXAYEpAP8PF0sqIxSnAT9eA9DicZl0 nih6HyvS72W2m1fSghLgnr30Tidg9fJ4vkFdQKmziNWRkkLYLySHy1utEOOg6Cnj Uj3V6lnQgfpB067QxtIVR4S77uP+d7dEmBToIwCifvvNOvRZ+3ECWJ3/Fe+UILrt hk3PRLjQ9A== Received: from ala-exchng01.corp.ad.wrs.com (ala-exchng01.wrs.com [128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4bvxfm33xy-6 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 08:05:16 -0800 (PST) Received: from ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Tue, 27 Jan 2026 08:05:14 -0800 Received: from ala-lpggp2.wrs.com (10.11.232.110) by ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Tue, 27 Jan 2026 08:05:14 -0800 From: Rob Woolley To: Subject: [PATCH v2 05/10] bitbake-setup: Resolve unused loop control variables Date: Tue, 27 Jan 2026 08:05:02 -0800 Message-ID: <20260127160508.3392732-6-rob.woolley@windriver.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260127160508.3392732-1-rob.woolley@windriver.com> References: <20260127160508.3392732-1-rob.woolley@windriver.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: m17v5-rM3qFuGVOg9VIyFC6tWGM5mcY9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMSBTYWx0ZWRfX9Deebjs6Kz5g ZX3SqOWsWltIpNqh4pzR3Ovpmjv3Yvp1+LoXKk2LggrOB1snI/JN5TOFheZfmXJpF0X93VOyNW3 Tl9G/TGQazEXB+dSAtsq/xN2r13oCfEnwT6SAmjgvp6aKxl3zC7xbsabdxMzOKVqVLIxRR5QTFU Fo7MpYzMJobVo4dgh09EcdaB2v1NRHX/5WftMBHJ/Z4cgFACsMt2siBppFOY886cf5nDK8JF5AW EXwT65v2k7G+VpWVegoQGvhoIfnkl7zGNX3xQIdBHvO1RdSe5ikUMcMtkpM35fqesCs0aWaprfF hGtbJIH7EjfHPBBpB8YQTzZqFqmQq8HYFVzjXY3SJj/gikmHbPsPZGMQBUewDkkfTL5dAECyF32 rcUV/YdyAElbf5JnBvSIinlIBUK2bnQkMQsVKuO1PFEZVsj8E8jZpeb5hMQV7paehOW4y8pLFNR A1gsJMq/UV9P1ZrzHPQ== X-Authority-Analysis: v=2.4 cv=Lo+fC3dc c=1 sm=1 tr=0 ts=6978e23c cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=vUbySO9Y5rIA:10 a=VkNPw1HP01LnGYTKEx00:22 a=t7CeM3EgAAAA:8 a=IJQjoT7YMls2vlgdCqcA:9 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: m17v5-rM3qFuGVOg9VIyFC6tWGM5mcY9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270131 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, 27 Jan 2026 16:05:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18894 The ruff lint tool reported loop control variables that were not being used: B007 Loop control variable `dirs` not used within loop body Adding underscore as a prefix helps indicate that it is not being used inside the loop. Signed-off-by: Rob Woolley --- bin/bitbake-setup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index 2b611864..bfd04771 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -94,7 +94,7 @@ def commit_config(config_dir): def _write_layer_list(dest, repodirs): layers = [] for r in repodirs: - for root, dirs, files in os.walk(os.path.join(dest,r)): + for root, _dirs, files in os.walk(os.path.join(dest,r)): if os.path.basename(root) == 'conf' and 'layer.conf' in files: layers.append(os.path.relpath(os.path.dirname(root), dest)) layers_f = os.path.join(dest, ".oe-layers.json") @@ -388,7 +388,7 @@ The bitbake configuration files (local.conf, bblayers.conf and more) can be foun logger.plain("The bitbake configuration files (local.conf, bblayers.conf and more) can be found in\n {}/conf\n".format(bitbake_builddir)) def get_registry_config(registry_path, id): - for root, dirs, files in os.walk(registry_path): + for root, _dirs, files in os.walk(registry_path): for f in files: if f.endswith('.conf.json') and id == get_config_name(f): return os.path.join(root, f) @@ -766,7 +766,7 @@ def has_expired(expiry_date): def list_registry(registry_path, with_expired): json_data = {} - for root, dirs, files in os.walk(registry_path): + for root, _dirs, files in os.walk(registry_path): for f in files: if f.endswith('.conf.json'): config_name = get_config_name(f) From patchwork Tue Jan 27 16:05:03 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Woolley X-Patchwork-Id: 79875 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 562B2D340AB for ; Tue, 27 Jan 2026 16:05:21 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15118.1769529916894885606 for ; Tue, 27 Jan 2026 08:05:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=rqbUsMd6; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=5487f82e02=rob.woolley@windriver.com) Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RBpuZD880612 for ; Tue, 27 Jan 2026 08:05:16 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=mpp1Ab61qQydCDxKK/MSSVX6l5kCWDKJSIzlK7WiaVY=; b=rqbUsMd6XtSq NUEJ0+6UikUOgwnh/1F7g2CD79d5GaUo8UKxHnEjcUFVfiAaJcVfxlMTTOPlf3wq RAWkpaZPWBQerFdg4PV3NFXcfw3ptN2zl8hzUhAwZOVynVnwgGRsVmMC16SLI3IB wHquFwJCvN+vQoSvjMAu1sw09X4XgGRX6OchHGEVyDkzeAnNjhvxEu2V6MhjOSXY wGpaRXFWNHcUy6dMlGloxARVhc4hDk2fPplW4fJRDRRHDyiRSOUT7oHZdDL2cjXF y7I6VklagvQoy/80wx4QO8Gc/26oheedg8WUK2G9t5aXuBp6hagFByTD+P3rN6yh P6v1UVYxnQ== Received: from ala-exchng01.corp.ad.wrs.com (ala-exchng01.wrs.com [128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4bvxfm33xy-7 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 08:05:16 -0800 (PST) Received: from ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Tue, 27 Jan 2026 08:05:14 -0800 Received: from ala-lpggp2.wrs.com (10.11.232.110) by ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Tue, 27 Jan 2026 08:05:14 -0800 From: Rob Woolley To: Subject: [PATCH v2 06/10] bitbake-setup: Fix ambiguous variable names Date: Tue, 27 Jan 2026 08:05:03 -0800 Message-ID: <20260127160508.3392732-7-rob.woolley@windriver.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260127160508.3392732-1-rob.woolley@windriver.com> References: <20260127160508.3392732-1-rob.woolley@windriver.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: bQ24iOK98B-KiGfCNWx4oB2GhwLRteRz X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMSBTYWx0ZWRfX28WzUKAqZAOs C2eQZSWoL9RafrHIduLq/ImEXMeXJ9G4ep9KHbd5A3PT/O6Uol/cty6EvPUMjr/ym3RFvgxwsAj HZvC/UmJyRyS6D34LlzYTU76o+Hk0BLt2SPpvyCcW8NsKb16NmQ8AzQBKbA0B6lTxUBRX40nhEd 7zvf21X+wR62cnQB1E94do0hj+2fTGvq31pgsZljPd/ZIA1AxYNUJYANcxBb1SwI/ABHvi1WbYA R7f6DfW5eAA6V9Ous7DUOOXd9AS0/T9GW/VCLb2ydQ5Ux7nUFvSxDOcQkeWUodWnQV5sMn1VdSr KF2rpletIbSQX/JvbB5YSQu0LcHvbfK6UhErbzO83TT+7sQ07e/Y1h3PEvHPwrrHahA9ENoi1u2 rHBYaEq2c5hxfJVIbyvVKiUaI+hydEkdbaujhOPMBwRpr89RbF+teaV1DjPnYqrJtykUTOuhouE AkzApuWgh6JMd3IT0sw== X-Authority-Analysis: v=2.4 cv=Lo+fC3dc c=1 sm=1 tr=0 ts=6978e23c cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=vUbySO9Y5rIA:10 a=VkNPw1HP01LnGYTKEx00:22 a=t7CeM3EgAAAA:8 a=Aatwvv_jfEF2aNKkGsIA:9 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: bQ24iOK98B-KiGfCNWx4oB2GhwLRteRz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270131 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, 27 Jan 2026 16:05:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18895 The ruff lint tool detected use of ambiguous variables that were named with a single letter: E741 Ambiguous variable name: `l` E741 Ambiguous variable name: `f` This replaces the variables with a descriptive variable to add clarity. Signed-off-by: Rob Woolley --- bin/bitbake-setup | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index bfd04771..59412588 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -204,11 +204,11 @@ bitbake-setup init -L {} /path/to/repo/checkout""".format( if oesetupbuild: links = {'setup-build': oesetupbuild, 'oe-scripts': os.path.dirname(oesetupbuild), 'oe-init-build-env-dir': oeinitbuildenvdir} - for l,t in links.items(): - symlink = os.path.join(layerdir, l) + for link,item in links.items(): + symlink = os.path.join(layerdir, link) if os.path.lexists(symlink): os.remove(symlink) - os.symlink(os.path.relpath(t,layerdir),symlink) + os.symlink(os.path.relpath(item,layerdir),symlink) return layers_fixed_revisions @@ -217,19 +217,19 @@ def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir, update_bb_c os.makedirs(build_conf_dir) layers_s = [] - for l in layers: - l = os.path.join(layerdir, l) - layers_s.append(" {} \\".format(l)) + for layer in layers: + layer = os.path.join(layerdir, layer) + layers_s.append(" {} \\".format(layer)) - for l in filerelative_layers: + for layer in filerelative_layers: if thisdir: - l = os.path.join(thisdir, l) + layer = os.path.join(thisdir, layer) else: raise Exception("Configuration is using bb-layers-file-relative to specify " \ "a layer path relative to itself. This can be done only " \ "when the configuration is specified by its path on local " \ "disk, not when it's in a registry or is fetched over http.") - layers_s.append(" {} \\".format(l)) + layers_s.append(" {} \\".format(layer)) layers_s = "\n".join(layers_s) bblayers_conf = """BBLAYERS ?= " \\ @@ -389,9 +389,9 @@ The bitbake configuration files (local.conf, bblayers.conf and more) can be foun def get_registry_config(registry_path, id): for root, _dirs, files in os.walk(registry_path): - for f in files: - if f.endswith('.conf.json') and id == get_config_name(f): - return os.path.join(root, f) + for file in files: + if file.endswith('.conf.json') and id == get_config_name(file): + return os.path.join(root, file) raise Exception("Unable to find {} in available configurations; use 'list' sub-command to see what is available".format(id)) def merge_overrides_into_sources(sources, overrides): @@ -767,10 +767,10 @@ def list_registry(registry_path, with_expired): json_data = {} for root, _dirs, files in os.walk(registry_path): - for f in files: - if f.endswith('.conf.json'): - config_name = get_config_name(f) - config_data = json.load(open(os.path.join(root, f))) + for file in files: + if file.endswith('.conf.json'): + config_name = get_config_name(file) + config_data = json.load(open(os.path.join(root, file))) config_desc = config_data["description"] expiry_date = config_data.get("expires", None) if expiry_date: From patchwork Tue Jan 27 16:05:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Woolley X-Patchwork-Id: 79877 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 63D3DD340B0 for ; Tue, 27 Jan 2026 16:05:21 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14890.1769529917224937637 for ; Tue, 27 Jan 2026 08:05:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=H8tbTntO; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=5487f82e02=rob.woolley@windriver.com) Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RBpuZE880612 for ; Tue, 27 Jan 2026 08:05:17 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=ap34Q+Q4tt+VHNdtJqy4PV2oIzk4Uvv0VG6I2CNx2NI=; b=H8tbTntOVb0t ejXw4YrgSKfeQ+XOZOaOWcMQNoZ413x7PYqFX1pKiUkFCTTFLMFHqV7pT8J0iX0w zZJhjrku3JlCDfJFPNgfUth5nJzngzzWyB0QPdDRtL5Rfn+1eWDCa8QYqOek2NHT fYDe8+igQNTyPlLZRRP2L15j7M6yKD+7h1rXh667IwqkKYFi99wPmtMnneNDfcro n29UlC5iIuqqXi/+y5gXMmjB+9p7b1sR+c033uY+H4a/ROTKuvfh+WOxboTisnwe 5IuEITnpG8lX2NaRTv9RQmpiW07OfGFB7wZfta2TVGB45eL+DNh7GpeX8iA7JpV8 R0t89Ah7cg== Received: from ala-exchng01.corp.ad.wrs.com (ala-exchng01.wrs.com [128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4bvxfm33xy-8 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 08:05:16 -0800 (PST) Received: from ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Tue, 27 Jan 2026 08:05:14 -0800 Received: from ala-lpggp2.wrs.com (10.11.232.110) by ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Tue, 27 Jan 2026 08:05:14 -0800 From: Rob Woolley To: Subject: [PATCH v2 07/10] bitbake-setup: Remove unused stdout variable Date: Tue, 27 Jan 2026 08:05:04 -0800 Message-ID: <20260127160508.3392732-8-rob.woolley@windriver.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260127160508.3392732-1-rob.woolley@windriver.com> References: <20260127160508.3392732-1-rob.woolley@windriver.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: t8RR6rHzzpV8rMHjiapRVPadFs2VPKUN X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMSBTYWx0ZWRfX5NaHYoyM7QWd UAyorDWhjVXSVIw6BZM3pg4CWHbRER+vVjW0GAwseeThq/xBxCr5MRYrvOvVcrgfhFPV3LA6i+w R9orR5JiPLrpfwUg5sNbbf9YJCDGydW28AiCZn2IHgNfRj2g5Ag97k+6o1cMn0s6xvqr9iYTqb5 +AD0nFEpmrBQq8moaDZkk2T+h8GlMai8P1ef39GAbqjW/yD0SI9gUPO1u5oLSJ4n/XFqcLWKlQQ BDfYsqfhfskf4s9BV4x79ku2Jh2KzVCLqIj8zwgWVUQSgsTk+l/lU9LbM4Ph/xaiKqbYlB0OniZ TMKygiac7fPWjn4kFktUQlwEefT7sD3SNPiZT7q2WBU51D6eJSEo44kEpdBV3htQ+Psl9FOkFrp A6SgQGbpbBjE6NByziTxNITWVMynZ1UP5sAAQtmWWuFZ5G6mLubwACfYyOLU3/sg7hAc5YjlmXA ua0drrMwz2+ONa9iMFA== X-Authority-Analysis: v=2.4 cv=Lo+fC3dc c=1 sm=1 tr=0 ts=6978e23c cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=vUbySO9Y5rIA:10 a=VkNPw1HP01LnGYTKEx00:22 a=t7CeM3EgAAAA:8 a=CQvzJwAhJbFv5xpNHCAA:9 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: t8RR6rHzzpV8rMHjiapRVPadFs2VPKUN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270131 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, 27 Jan 2026 16:05:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18896 The ruff lint tool reported that stdout was never used: F841 Local variable `stdout` is assigned to but never used Signed-off-by: Rob Woolley --- bin/bitbake-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index 59412588..e3e577e9 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -583,7 +583,7 @@ def init_config(top_dir, settings, args): create_siteconf(top_dir, args.non_interactive, settings) d = init_bb_cache(top_dir, settings, args) - stdout = sys.stdout + def handle_task_progress(event, d): rate = event.rate if event.rate else '' progress = event.progress if event.progress > 0 else 0 From patchwork Tue Jan 27 16:05:05 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Woolley X-Patchwork-Id: 79876 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 63CF0D340AF for ; Tue, 27 Jan 2026 16:05:21 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14891.1769529917691352126 for ; Tue, 27 Jan 2026 08:05:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=ho1Mf2Av; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=5487f82e02=rob.woolley@windriver.com) Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RBpuZG880612 for ; Tue, 27 Jan 2026 08:05:17 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=B+RNrQBMcKVNsCo4vT3lFqa8nW8mKWcCXqzkFYn0x6Y=; b=ho1Mf2Av9umr 11Q7vzaSVOfGcmHD5EYrrPLArgEZv91mULCd0qfCtiQB+NUmFzCbAI+Hdcio/+Ck zoDb6tsCwhMXMzH2uC32YR6Vh++rhgInjOXLpX7RrSHq4/13yFcA0DLcBS4QcTlR RrWZ0FIeBY6ccKEPdErynGbxCSCQHr5hZY7ulZUvKOftuzw6jNbH7rbIkF1mCQur w91q08bNFmi8noyJXC2EX4f0b+iwxvf3liFSKBHjn/Nx7Xen1MN4UKT4WQ4jGiOR zKVZv6qs0Qy4yL/2QiX6HaiQzQ4T1m+4jusIhzOBg26jrlCCH0nk6SHV7VjCwXaa vxh4sqe5hg== Received: from ala-exchng01.corp.ad.wrs.com (ala-exchng01.wrs.com [128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4bvxfm33xy-9 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 08:05:17 -0800 (PST) Received: from ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Tue, 27 Jan 2026 08:05:14 -0800 Received: from ala-lpggp2.wrs.com (10.11.232.110) by ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Tue, 27 Jan 2026 08:05:14 -0800 From: Rob Woolley To: Subject: [PATCH v2 08/10] bitbake-setup: Replace f-string without placeholders Date: Tue, 27 Jan 2026 08:05:05 -0800 Message-ID: <20260127160508.3392732-9-rob.woolley@windriver.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260127160508.3392732-1-rob.woolley@windriver.com> References: <20260127160508.3392732-1-rob.woolley@windriver.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: iJgzE4j3pVUPOLsFEWuEeitdAeqRawx8 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMSBTYWx0ZWRfX1pGeJhQxXI/w lKqYlLE0tEV6lpFaGBslas7RMDbtjA8KM8Uf/APqRs9CAV06oxnzJvkjAPPCB+N0WAhbZCmV2JF aL/LnXvrQpZnbdUlmeJjvlmtfUKhdkJAm4afAK1DGRB1sc9DKpKynFW4FsMzaHH6n7C5Q8b1gZ7 GAjlsQI32X5NDjOOUzKffbo2YQxjz67hhhTJCPOx7EUSapK79nVPJDbQ0D79JQ/57LtNyNUeCT6 yH4zmfNahiBGl6pCPswo42tiBjpb+6jI95drpy6ajwL14JqvBTzIebO7+88YSG0ybuHR45IFmFW C6p9w1GHRSM+7rEt7+oQIh+WGj+qy+5NIBNdBFsYdrXASueolxHcC7Iw5AJU70EqA1hlLYhNXTC saMNqBU1CtN5DHzp/P2XfefQ6yCdOCKidiYgKrg9u8MLaGvp84z/kO5R1ag07OU+yXvgpkWsD7E cn/kQWQ267d95hBAusA== X-Authority-Analysis: v=2.4 cv=Lo+fC3dc c=1 sm=1 tr=0 ts=6978e23d cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=vUbySO9Y5rIA:10 a=VkNPw1HP01LnGYTKEx00:22 a=t7CeM3EgAAAA:8 a=DX4I7EJYZ07sDsrzdd8A:9 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: iJgzE4j3pVUPOLsFEWuEeitdAeqRawx8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270131 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, 27 Jan 2026 16:05:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18897 The ruff lint tool reported an f-string that didn't include any placeholders: F541 f-string without any placeholders Signed-off-by: Rob Woolley --- bin/bitbake-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index e3e577e9..d19b5394 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -957,7 +957,7 @@ def merge_settings(builtin_settings, global_settings, topdir_settings, cmdline_s return all_settings def sigint_handler(sig, frame, func, top_dir): - logger.plain(f'\nShutting down...') + logger.plain('\nShutting down...') if isinstance(top_dir, str) and os.path.exists(top_dir): if func in [init_config, build_update]: logger.warning(f'{top_dir} may contain an incomplete setup!') From patchwork Tue Jan 27 16:05:06 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Woolley X-Patchwork-Id: 79871 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 14BC2D3409E for ; Tue, 27 Jan 2026 16:05:21 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15119.1769529918077853438 for ; Tue, 27 Jan 2026 08:05:18 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=EC9t+mm0; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=5487f82e02=rob.woolley@windriver.com) Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RBpuZI880612 for ; Tue, 27 Jan 2026 08:05:17 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=KwqWEccu88eLeftI6CQVirprzAW7FlD8aIIwLCxerT8=; b=EC9t+mm0SFvT PEQY+opa27hw325zWxt7e8cPb91Q0kNmJlIRhIaOgVvTDvacSecffUhx/yez3Nb3 GtBerGOj1WCaqOqunOPSfxyQyyabw/VQIjo2jEIi9epTrtsZ0ZRXR3eFbJzFbKwZ AjqRmLNdY+MoZUUOcQriQUYn8UvaiQ2vhvNEJRC/YI9tMMdf/yaFaTzJpD4vJsf8 IEiEldL9X1H2nKE/E7SJpNp6mDTbs/sM+6QAGHdkt/jkZIiAl/j2s4dh5vpRFC4Z p//1hSAmVdnOlRkmZAEcyHrP9/ZP7mH/9dxR/8vj5Luf7vKpRpU0CCr2J6eJYZ9A Lu/a9UPZaQ== Received: from ala-exchng01.corp.ad.wrs.com (ala-exchng01.wrs.com [128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4bvxfm33xy-10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 08:05:17 -0800 (PST) Received: from ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Tue, 27 Jan 2026 08:05:15 -0800 Received: from ala-lpggp2.wrs.com (10.11.232.110) by ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Tue, 27 Jan 2026 08:05:14 -0800 From: Rob Woolley To: Subject: [PATCH v2 09/10] bitbake-setup: Remove unused Namespace import Date: Tue, 27 Jan 2026 08:05:06 -0800 Message-ID: <20260127160508.3392732-10-rob.woolley@windriver.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260127160508.3392732-1-rob.woolley@windriver.com> References: <20260127160508.3392732-1-rob.woolley@windriver.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: ksRpBhZA95RdzMmXPYH3x9Pmze5KYLW7 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMSBTYWx0ZWRfX0WKAzGhmH2m2 YqKIHBr/85UFBD5E70MaRt7pw09IwaBYy+qLuLoKWlpjJFDAEDHnagX5EuK+wvRyHztd7bkcmlP IX51jCjz0s4rZtauYRF1ZVVP2egGCsrLM6okODL7RsUwJy36q8NqUTi2z7nhzb6lm7g7Fb9XvDY rCdv2fqCnXf27lzL8Qu0/yZLCbpDQ1z8b7y5+hBvprEHjho8Fn2YmZOoF1YlETwQjnmqs3Kco6G Jsl4Ysmvc7HNLgfYPvqsK+67ZGCiHu3mcg1THn72nVjbDEyLyhivaUjPipx3T2p2WQPi4j+JJy3 +DDS6xJh1Vn4HFXhsLugheGWN4UpA38SqXP/4gk0fbLWfLMtA9ei6RcpW7i7MgjuaU1bFqHEh+v gfLhB7klT8lyp9Nfs0RhYew8F5NcEWeVsRYXTuu/sOXHSkOwm3IjaJGzHd5uFww5xbQSxudC9wb ScKfpUmXege4v+2tC1A== X-Authority-Analysis: v=2.4 cv=Lo+fC3dc c=1 sm=1 tr=0 ts=6978e23d cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=vUbySO9Y5rIA:10 a=VkNPw1HP01LnGYTKEx00:22 a=t7CeM3EgAAAA:8 a=rPNT3So2aFC0sl9B09QA:9 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: ksRpBhZA95RdzMmXPYH3x9Pmze5KYLW7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270131 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, 27 Jan 2026 16:05:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18898 The ruff lint tool reported that Namespace was not used: F401 `argparse.Namespace` imported but unused Signed-off-by: Rob Woolley --- bin/bitbake-setup | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index d19b5394..a67c10af 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -1102,7 +1102,6 @@ def main(): save_bb_cache() else: - from argparse import Namespace parser.print_help() if __name__ == '__main__': From patchwork Tue Jan 27 16:05:07 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Woolley X-Patchwork-Id: 79868 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 04A7ED3409C for ; Tue, 27 Jan 2026 16:05:21 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14893.1769529918544146982 for ; Tue, 27 Jan 2026 08:05:18 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=EyGsVRlf; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=5487f82e02=rob.woolley@windriver.com) Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60RBpuZJ880612 for ; Tue, 27 Jan 2026 08:05:18 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=634tE9Sw/VsMgBpiWvlM4anjAnGOT8xug5Gj3kXg3oQ=; b=EyGsVRlfTm74 1BnTZUdY8E64oGHaQrQY5vjeq/3g4IBBkDG9PrC8HlKm38UKGce4OBW1Xc7w2Sy9 QibvhMCjLZRWgA8ISJybQC6OLgvuczc3tdmOCgpwVz+qbwjajEIHN3XxKbivYPRX T8Om88WvkwjHo/SqylBxcyevrS9pLtkxLFtHdcHUBYJe2zAKGPj/vrmP1lq55VTU WzSAFDWdyV3b9A/ovEG8igsch5CS709JLYZLYDiNe0mDxLvlVVxHffcZ4CEfy/qU GMKa2GrV4k7hpyf4Ut39u/8htUDoYOuJ4On/mIrNKa6FO1CPICMKcXEneSI3llUq ol2SyaQ4kg== Received: from ala-exchng01.corp.ad.wrs.com (ala-exchng01.wrs.com [128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4bvxfm33xy-11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 27 Jan 2026 08:05:17 -0800 (PST) Received: from ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Tue, 27 Jan 2026 08:05:15 -0800 Received: from ala-lpggp2.wrs.com (10.11.232.110) by ALA-EXCHNG02.corp.ad.wrs.com (10.11.224.122) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Tue, 27 Jan 2026 08:05:15 -0800 From: Rob Woolley To: Subject: [PATCH v2 10/10] bitbake-setup: Remove unused parser_settings_list Date: Tue, 27 Jan 2026 08:05:07 -0800 Message-ID: <20260127160508.3392732-11-rob.woolley@windriver.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260127160508.3392732-1-rob.woolley@windriver.com> References: <20260127160508.3392732-1-rob.woolley@windriver.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: twzKIG_klRweZnd4zOLaxiGJjTeF7CIN X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEzMSBTYWx0ZWRfX9EytG0w2cBto 7/vLkt0o1Aclex49nFJXu+lBPG8Iq+fS3Y9561Ik+qdNzPqihn2HmgldsPu1h6Q8bzUhFtZnV0a 9tKIrEMUWSbkbsnf94ApXMuPntDL+aD5wtbK6QsUA1yMyyoDGipQwKCOSLCrHRZr3V3YEUxtws/ hHjLswLU374WAKG0kMSzaW10KQ4wp4Xn2YtYJIclNrx9A8k2xTnmBgJwjr7dPt99N3/OS3iDYKE qtvbEeT/fodjm8tn7CAx/8v/Hkp3ulKXrdZAGdyGZBy8V2PlI22CedD3s86M8pGkegf28E9cMEk zaafejWM1qyRa9/TrH1oxBpBA3G14iRrwfsoKYPEKPKqVUXuQnWUGvY0obJ7vARPYC9lNv9YvEg +HhCe5BjfWHMcWcw0m+tJAiUN/nehdaKXuQQhEewVZumMB/0J/oXa3Its/P0eZMXyqldYLEisb3 /toLwUAQyPVdEAbM9qg== X-Authority-Analysis: v=2.4 cv=Lo+fC3dc c=1 sm=1 tr=0 ts=6978e23e cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=vUbySO9Y5rIA:10 a=VkNPw1HP01LnGYTKEx00:22 a=t7CeM3EgAAAA:8 a=RdzD27zFivnYBFE9EGsA:9 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: twzKIG_klRweZnd4zOLaxiGJjTeF7CIN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601270131 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, 27 Jan 2026 16:05:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18899 The ruff lint tool detected an used variable: F841 Local variable `parser_settings_list` is assigned to but never used The list_settings function gets invoked through the parent command's settings_func function. This means that creating this variable is unnecessary. Signed-off-by: Rob Woolley --- bin/bitbake-setup | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index a67c10af..7eedf221 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -1026,8 +1026,7 @@ def main(): subparser_settings = parser_settings.add_subparsers(dest="subcommand", required=True, help="The action to perform on the settings file") - parser_settings_list = subparser_settings.add_parser('list', - help="List all settings with their values") + subparser_settings.add_parser('list', help="List all settings with their values") parser_settings_set = subparser_settings.add_parser('set', parents=[parser_settings_arg_global], help="In a Section, set a setting to a certain value")