From patchwork Thu Jan 22 15:01:58 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 79403 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 D835BD3EE7F for ; Thu, 22 Jan 2026 15:02:29 +0000 (UTC) Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.39171.1769094143801258491 for ; Thu, 22 Jan 2026 07:02:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=1d7hEdHW; 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 E07FFC21AA6 for ; Thu, 22 Jan 2026 15:02:21 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 1505D606B6; Thu, 22 Jan 2026 15:02:22 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 289E8119B82C8; Thu, 22 Jan 2026 16:02:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769094141; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=2ZGEPt+4v/RyZV4sMzJbPe5hi+in9DOkXCMf+lyuY7Y=; b=1d7hEdHWq8evc6+p4TBRp0Ox1+6pSPJfqiOY7bknhtWuTCAp7LDHsTX5Xu74ONOSb/5MDf ZOkJNYXuWmHenHEUOrOLc/k7JXi3s5qZjIPwQRUgqbEnMWWScK93v5lqki1ffM8ibZ46XB htxqEtnssdqqpFylh2SmheALm9FZDKkZbPcDsEZLp0Q0MkvxWQ5iWg9ug9rAJiooE+agAo ydgtdofcLjcwdeKirkkYHal8cr+0VChHRISqWTAPThrKb7WP7pyFnIin3eDR24JzixZWht z66kRURU2XhqL1WXqmHzymcdJkmUtUwyKTfx2OatMLemgm4j5/qpviQeHbeAxg== From: Antonin Godard Date: Thu, 22 Jan 2026 16:01:58 +0100 Subject: [PATCH v3 1/3] bin/bitbake-setup: add descriptions for fragment choices MIME-Version: 1.0 Message-Id: <20260122-bitbake-setup-choose-builtin-v3-1-c55291acc1a7@bootlin.com> References: <20260122-bitbake-setup-choose-builtin-v3-0-c55291acc1a7@bootlin.com> In-Reply-To: <20260122-bitbake-setup-choose-builtin-v3-0-c55291acc1a7@bootlin.com> To: bitbake-devel@lists.openembedded.org Cc: Thomas Petazzoni , Alexander Kanavin , docs@lists.yoctoproject.org, Antonin Godard X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=8159; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=afytrESbCE7KTnmirGBuEgjb8HMwyH4hCj3g5uHb2Jo=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpcjv6eEMWViqzbc+rzHzRkuFZLxXxDTfae8d0b 4mUdcQCAiOJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCaXI7+gAKCRDRgEFAKaOo Nj0cEACtD49NhzETKalLQD0Fy7d7sPhsjH4vDeyCDogjnGG91oJNE7lN+2mF+UezI3/qt/T0Wui G8D/h1gNYFEz/lrKmPKe0MS/+srLVqpKYlcuawLgkSZ1hG8+f81S0f9KbcCjybm/rAEo6y72izy FmCxlpofoDNVknp1vM6P99EEh2LBSH0ALwS2R1fs/EQBrpQzJTUrUorhEXZUtgNGgD9fG5ZM4jc C0FayzdZIvCNjYp6Gf1VyIuyZXKsykEJRDbmz5sgldo40MtpEalc0i1Y6DWifMO3zphE9ebWWv3 nmC630oIbBUK6HxxPe45BggtbItwzuHuCzZ2oOxUCR2cM9FcvP9sFwPquFpxVNcn396CrDD8ZY0 q2aJ2w21MP1Wx+n1tKJwnzEMwStsbgpfKPK6u1chfNiOnyjJ3APTyk38zafSZAC/P7Yhd8H/MtW go61a442LfR2D4qkKDYpGU9rEwIw3IcEoq2nI4SYDDTf8le96+3oJ8x8IWDhXEFcJMASe5fgvgd /yB5iHAHWhmbtPEj8hbX2ESryleWOKV3fb4hxK3yn7LZ8g9mBNYqDThyRi1t5cw4zw7GCAoyJRJ Fd6uob88KKtNMP/8oXp4BXvZMUXO04aAihUuXtB2ycP2Ft1YjpcQ4oZgr6Pr9E3oWPQTmig03wK pON7BZIpuO6dhvQ== 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, 22 Jan 2026 15:02:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18848 Make it possible to give fragments descriptions as it can help users determine which fragments to pick during bitbake-setup init. It is still possible to provide a list (with no descriptions) for backwards-compatibility. Update the documentation accordingly. Signed-off-by: Antonin Godard --- bin/bitbake-setup | 23 ++++++++++++++----- .../bitbake-user-manual-environment-setup.rst | 26 ++++++++++++++++++++-- setup-schema/bitbake-setup.schema.json | 21 ++++++++++++++++- 3 files changed, 61 insertions(+), 9 deletions(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index abe7614c832..b0d14e7c1b8 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -494,23 +494,34 @@ def choose_fragments(possibilities, parameters, non_interactive, skip_selection) if skip_selection and k in skip_selection: logger.info("Skipping a selection of {}, as requested on command line. The resulting bitbake configuration may require further manual adjustments.".format(k)) continue - choice = [o for o in v["options"] if o in parameters] + + # options can be a list of strings or a list of dicts + options = v["options"] + if len(options) > 0 and isinstance(v["options"][0], str): + options = [{"name": o, "description": ""} for o in v["options"]] + + choice = [o["name"] for o in options if o["name"] in parameters] if len(choice) > 1: - raise Exception("Options specified on command line do not allow a single selection from possibilities {}, please remove one or more from {}".format(v["options"], parameters)) + raise Exception("Options specified on command line do not allow a single selection " + f"from possibilities {[o['name'] for o in options]}, please " + f"remove one or more from {parameters}") if len(choice) == 1: choices[k] = choice[0] continue if non_interactive: - raise Exception("Unable to choose from options in non-interactive mode: {}".format(v["options"])) + raise Exception(f"Unable to choose from options in non-interactive mode: {[o['name'] for o in options]}") logger.plain("\n" + v["description"] + ":") - options_enumerated = list(enumerate(v["options"], 1)) + options_enumerated = list(enumerate(options, 1)) for n,o in options_enumerated: - logger.plain("{}. {}".format(n, o)) + opt_str = f"{n}. {o['name']}" + if o["description"]: + opt_str += f"\t{o['description']}" + logger.plain(opt_str) option_n = int_input([i[0] for i in options_enumerated], "\nPlease select one of the above options by its number: ") - 1 - choices[k] = options_enumerated[option_n][1] + choices[k] = options_enumerated[option_n][1]["name"] return choices def obtain_config(top_dir, settings, args, source_overrides, d): diff --git a/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst b/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst index 3b6a73fd8d3..92fedd7d969 100644 --- a/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst +++ b/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst @@ -759,11 +759,21 @@ They contain the following sections: "oe-fragments-one-of": { "machine": { "description": "Target machines", - "options" : ["machine/qemux86-64", "machine/qemuarm64", "machine/qemuriscv64", "machine/genericarm64", "machine/genericx86-64"] + "options" : [ + { "name": "machine/qemux86-64", "description": "Machine configuration for running an x86-64 system on QEMU" }, + { "name": "machine/qemuarm64", "description": "Machine configuration for running an ARMv8 system on QEMU" }, + { "name": "machine/qemuriscv64", "description": "Machine configuration for running an RISC-V system on QEMU" }, + { "name": "machine/genericarm64", "description": "Machine configuration for Arm64 SystemReady IR/ES platforms" }, + { "name": "machine/genericx86-64", "description": "Machine configuration for generic x86_64 (64-bit) PCs and servers" } + ] }, "distro": { "description": "Distribution configuration variants", - "options" : ["distro/poky", "distro/poky-altcfg", "distro/poky-tiny"] + "options" : [ + { "name": "distro/poky", "description": "Distro configuration for Poky (Yocto Project Reference Distro)" }, + { "name": "distro/poky-altcfg", "description": "Distro configuration for Poky (systemd init manager)" }, + { "name": "distro/poky-tiny", "description": "Distro configuration for Poky (optimized for size)" } + ] } }, "configurations": [ @@ -852,6 +862,18 @@ They contain the following sections: - ``oe-fragments-one-of`` (*optional*, OpenEmbedded specific): the OpenEmbedded fragments to select as part of the build. + This can one of two formats: + + - A list of dictionaries with ``name`` and a ``description``, + corresponding to respectively the fragments names and fragment + descriptions (like in the example above). + + - A list of fragment names. For example: + + .. code-block:: json + + "options" : ["machine/qemux86-64", "machine/qemuarm64", "machine/qemuriscv64", "machine/genericarm64", "machine/genericx86-64"] + This will trigger choices to make during the :ref:`ref-bbsetup-command-init` command execution. diff --git a/setup-schema/bitbake-setup.schema.json b/setup-schema/bitbake-setup.schema.json index e51fef3b97c..be8772db1b2 100644 --- a/setup-schema/bitbake-setup.schema.json +++ b/setup-schema/bitbake-setup.schema.json @@ -64,7 +64,26 @@ "type": "array", "description": "List of BitBake configuration fragments to enable", "items": { - "type": "string" + "oneOf": [ + { + "type": "string", + "description": "Configuration fragment name" + }, + { + "type": "object", + "description": "Dictionary of BitBake configuration fragments to enable (with description)", + "properties": { + "name": { + "type": "string", + "description": "Configuration fragment name" + }, + "description": { + "type": "string", + "description": "Human-readable description of the fragment" + } + } + } + ] } }, "oe-fragments-one-of": { From patchwork Thu Jan 22 15:01:59 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 79402 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 C9364D3EE7B for ; Thu, 22 Jan 2026 15:02:29 +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.39449.1769094144608348861 for ; Thu, 22 Jan 2026 07:02:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=hEmguzlh; 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 0172E4E421F2; Thu, 22 Jan 2026 15:02:23 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id C271D606B6; Thu, 22 Jan 2026 15:02:22 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id DA6CE119B82C9; Thu, 22 Jan 2026 16:02:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769094142; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=jgM4Kg90qhX31I7AWOB41exSR9nYVnnPa/BevY8S2A4=; b=hEmguzlhjieD4r6BuE9hkf+mpwbi1DK3CB51chaYXmmEgNEKslaXTX70W3z6KKQFpazqdN 0FU8y0/R6YcVyQJHATGkkpPnM6VIcaF7K08KQwosdgeued1xlJePy/kFagX9r/aNBFx0V4 67o6mtUQds0dx08X7/yPrcyttamoZ4zdDTu3x6rHlUSZper3Mw76N3imTao8edQznqBkVQ abAjLmzyc2S0YLiklXItCP79Y2mGHDCLcpCNBtZWo/WnsZX1bZ7i9O7+Iggxygl4LwefdJ EGzrF+P60P2qKYEvonKrMNXagU6HJlddhCdUYdnBOS9nlcnpKhFqhjPmDhp/oA== From: Antonin Godard Date: Thu, 22 Jan 2026 16:01:59 +0100 Subject: [PATCH v3 2/3] default-registry: update fragments choices with descriptions MIME-Version: 1.0 Message-Id: <20260122-bitbake-setup-choose-builtin-v3-2-c55291acc1a7@bootlin.com> References: <20260122-bitbake-setup-choose-builtin-v3-0-c55291acc1a7@bootlin.com> In-Reply-To: <20260122-bitbake-setup-choose-builtin-v3-0-c55291acc1a7@bootlin.com> To: bitbake-devel@lists.openembedded.org Cc: Thomas Petazzoni , Alexander Kanavin , docs@lists.yoctoproject.org, Antonin Godard X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=3676; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=jWpA35XcRtNFx/OZh7hKYjjVUJYcHpz6omjTxj5vqeI=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpcjv7IvkfZmnRhS1pFIJ/h9TXYpLgz6ickCWgE NrxEGwmTzCJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCaXI7+wAKCRDRgEFAKaOo NttRD/9qHBoNNSrl8f14c03JzsbcNxjHK+O4N3KTpTLdu7N4nKVx641fu5G06z7M5xltFGYTVgT c69MFNPHoavDDFpT37UPDC0k61tNR4Mjbb9bBtsHsY1eXUZPoh+12IO10965RfW9YDThYpfrk+b sxWz2pFpchlq6GWrmmLihxKOZIMtmGACoAdOi8xgZHPOJigZ3kwc1r+yrNm5kDsVSh1RX9HV6cb 7Rvn8UbnqSWLLDunAxj4dVOU0yru/LEnIc8IwS1wKJ8Kgd2sRGOYaE/nMWlucP5lq2AnwEhxpbo aUdYoWBk8aAoGHXz1cnpPuRx7LkyjONTLYWVFYvHE6eh06EDPghv+XGxLjOWzHGjlz2HTefoqjl RpAtNK7mFwW5X9ATxNeWC3JUR2Jsq3/p7ChAKjp5cTAkCI7qOxNFo0pnfkDMkQXIapEooj+MIGm AjpzfGPbBLQEiP73tSGAh7LriQtyzJUyKTb9bc0SUeDWKl0h9IgrYOfsbYoAaa/I5s1K54PXf65 S8eczJV2dJNbpZfFhcthfSayRWftL3URWKL9YgCBOynx7OQ6Mf9RMKUTmg50JM3jQP7C3/o4hB8 y1y8nWqoMFuzNWFKc7sR66X5x0IK69OHKo5JlzfTwmb+BzQVAKJdRCsLOiVyEeIZJTFzUCLZVeB SQMJMZgEq1ktQYw== 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, 22 Jan 2026 15:02:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18850 Give descriptions to the fragment choices to help the user know what to pick during 'bitbake-setup init'. These descriptions were based on the descriptions found in the corresponding configuration files in OE-Core/meta-yocto. Signed-off-by: Antonin Godard --- .../configurations/oe-nodistro-master.conf.json | 6 +++++- default-registry/configurations/poky-master.conf.json | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/default-registry/configurations/oe-nodistro-master.conf.json b/default-registry/configurations/oe-nodistro-master.conf.json index 180d2008a72..00c4befb1ac 100644 --- a/default-registry/configurations/oe-nodistro-master.conf.json +++ b/default-registry/configurations/oe-nodistro-master.conf.json @@ -45,7 +45,11 @@ "oe-fragments-one-of": { "machine": { "description": "Target machines", - "options" : ["machine/qemux86-64", "machine/qemuarm64", "machine/qemuriscv64"] + "options" : [ + { "name": "machine/qemux86-64", "description": "Machine configuration for running an x86-64 system on QEMU" }, + { "name": "machine/qemuarm64", "description": "Machine configuration for running an ARMv8 system on QEMU" }, + { "name": "machine/qemuriscv64", "description": "Machine configuration for running an RISC-V system on QEMU" } + ] } } } diff --git a/default-registry/configurations/poky-master.conf.json b/default-registry/configurations/poky-master.conf.json index 1de038babe7..18657ece103 100644 --- a/default-registry/configurations/poky-master.conf.json +++ b/default-registry/configurations/poky-master.conf.json @@ -54,11 +54,21 @@ "oe-fragments-one-of": { "machine": { "description": "Target machines", - "options" : ["machine/qemux86-64", "machine/qemuarm64", "machine/qemuriscv64", "machine/genericarm64", "machine/genericx86-64"] + "options" : [ + { "name": "machine/qemux86-64", "description": "Machine configuration for running an x86-64 system on QEMU" }, + { "name": "machine/qemuarm64", "description": "Machine configuration for running an ARMv8 system on QEMU" }, + { "name": "machine/qemuriscv64", "description": "Machine configuration for running an RISC-V system on QEMU" }, + { "name": "machine/genericarm64", "description": "Machine configuration for Arm64 SystemReady IR/ES platforms" }, + { "name": "machine/genericx86-64", "description": "Machine configuration for generic x86_64 (64-bit) PCs and servers" } + ] }, "distro": { "description": "Distribution configuration variants", - "options" : ["distro/poky", "distro/poky-altcfg", "distro/poky-tiny"] + "options" : [ + { "name": "distro/poky", "description": "Distro configuration for Poky (Yocto Project Reference Distro)" }, + { "name": "distro/poky-altcfg", "description": "Distro configuration for Poky (systemd init manager)" }, + { "name": "distro/poky-tiny", "description": "Distro configuration for Poky (optimized for size)" } + ] } }, "configurations": [ From patchwork Thu Jan 22 15:02:00 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 79401 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 A76C4D3EE75 for ; Thu, 22 Jan 2026 15:02:29 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.39175.1769094145510361766 for ; Thu, 22 Jan 2026 07:02:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=PU3017xX; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: antonin.godard@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 07DE51A2AB7; Thu, 22 Jan 2026 15:02:24 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D2202606B6; Thu, 22 Jan 2026 15:02:23 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 9FB19119B82CA; Thu, 22 Jan 2026 16:02:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769094143; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=w6YpKyhVEVkY2m3oUrvIRe72GLcX/x2doVwwHuBXJAM=; b=PU3017xXy4QUPTlImuv/nK/3ALxhsgwfaimgZ4EEYySJcETb28+MJKqUdoJdYC0JfRIwiF P9pfGA5GCCuiQ0J6cgtAAcHTklyP6gMea7RCCexAXz37BDLeQfCrOb31aDch+iHTH/VRA/ mN4ArNXqAMXxVvmR3AVH+AjlNR2t5anZI3UyfJe/G/6lhi/HwgSQMIYQLzFXVK2aKsAxeL pkn0szjA0Bh5oe86nTiF3pEDXQAL75UdbTi8KONlMqQqZzQGnX8z7X8V+ue6vQ1oNJmKp5 GcHiXV8UXHUtjcB0LHFnYzFLQ01OTcckc6ZRKvJOmdWfLO24yJmcktCXbbFq6g== From: Antonin Godard Date: Thu, 22 Jan 2026 16:02:00 +0100 Subject: [PATCH v3 3/3] lib/bb/tests/setup.py: add tests for oe-fragments-one-of MIME-Version: 1.0 Message-Id: <20260122-bitbake-setup-choose-builtin-v3-3-c55291acc1a7@bootlin.com> References: <20260122-bitbake-setup-choose-builtin-v3-0-c55291acc1a7@bootlin.com> In-Reply-To: <20260122-bitbake-setup-choose-builtin-v3-0-c55291acc1a7@bootlin.com> To: bitbake-devel@lists.openembedded.org Cc: Thomas Petazzoni , Alexander Kanavin , docs@lists.yoctoproject.org, Antonin Godard X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=3282; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=ufSG9isX7KWwE+vhuAsJ6JUlLpPim390Gv0zZ9uNxpI=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpcjv7aHx+k3Tq2ys5NdgwGfhdb/6L+WSx9x0Bw UzxwwT/DsqJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCaXI7+wAKCRDRgEFAKaOo NrxlD/9Ye0tTP4tQU8R22a+Ogu8bzajDEnC6u9IGhAgfPHG3CJ8TV5/D7kcsLVkj7g3damfnmX+ bHDjgc9/0ZgyGT6Hyb5uGhHH9kVnvHeNKXiEs+y7BCpnfyJMJxsX4uPhl1znnNw9H4KTyrOeGdG 3hXflKjcOwNNXOWMT2QChmce7Dv0oHslSl1M84HtrOi/dbf82doqWhpDHeuzPY2+23vvnGcHEgm DJTlKIVFLTsiC+OGaC6e+2hPe66bEriKQ+VkI7sqzHIk/fqDYkSYcZdbOCjv5jC6Zc/Fr0MFqfy bXPntS1uVxYipBYk31JJKL5jY/WdEz5uBZj++B6BHQCjvi9UPR2Opoo8e+Ao8j296jDR4ilSTjW MTv5Zk9BanCikqrknn9JOV14opgT/5+L+Gd4K/j6J6ycRArCZDInUsnRU39U71v/D4/dD7IX6/9 IsrkC++78wz4MHuwB041LVSkXkOgU/va5sj4dAPHYioPE0x91lhnyvqlrBYpEZjMN51j3fv6WAf +EY+NewbLaTW5473Zijmj3a/5SyITH0H0qpktcChx+hdbTGX6TQkEA+RzSgx0OQXn3n5stSjDyS nUOa1nN2hlvFHxJmXN78Hirnd239sHtdN3qhO67XshVQIILHFjQ25u8pCoIdj8tdYNql1mvfKb/ MtvcEzkV6tq9Wdw== 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, 22 Jan 2026 15:02:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18851 There were no tests of oe-fragments-one-of so add a new configuration for it, and test both formats for the options (with or without a description). Signed-off-by: Antonin Godard --- lib/bb/tests/setup.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/lib/bb/tests/setup.py b/lib/bb/tests/setup.py index 834d098547c..eaada3ce1e7 100644 --- a/lib/bb/tests/setup.py +++ b/lib/bb/tests/setup.py @@ -146,6 +146,25 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) "bb-layers": ["layerC","layerD/meta-layer"], "bb-layers-file-relative": ["layerE/meta-layer"], "oe-fragments": ["test-fragment-2"] + }, + { + "name": "gizmo-fragments-one-of", + "description": "Gizmo configuration using oe-fragments-one-of, both formats", + "oe-template": "test-configuration-gizmo", + "oe-fragments-one-of": { + "fragment-desc": { + "description": "Test fragments (with description)", + "options" : [ + { "name": "fragment-desc-1", "description": "fragment 1 desc" } + ] + }, + "fragment-nodesc": { + "description": "Test fragments (no description)", + "options" : [ + "fragment-nodesc-1" + ] + } + } } ] }, @@ -258,7 +277,7 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) def get_setup_path(self, cf, c): if c == 'gizmo': return os.path.join(self.tempdir, 'bitbake-builds', 'this-is-a-custom-gizmo-build') - return os.path.join(self.tempdir, 'bitbake-builds', '{}-{}'.format(cf, c)) + return os.path.join(self.tempdir, 'bitbake-builds', '{}-{}'.format(cf, "-".join(c.split()))) def test_setup(self): # unset BBPATH to ensure tests run in isolation from the existing bitbake environment @@ -328,7 +347,9 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) 'buildconfigs':('gadget','gizmo', 'gizmo-env-passthrough', 'gizmo-no-fragment', - 'gadget-notemplate','gizmo-notemplate')}, + 'gadget-notemplate', + 'gizmo-notemplate', + 'gizmo-fragments-one-of fragment-desc-1 fragment-nodesc-1')}, 'test-config-2': {'cmdline': os.path.join(self.registrypath,'config-2/test-config-2.conf.json'), 'buildconfigs': ('gadget','gizmo', 'gizmo-env-passthrough',