From patchwork Fri Jan 23 13:24:06 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 79502 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 CE2F4D74ECF for ; Fri, 23 Jan 2026 13:24:28 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.67694.1769174659356837397 for ; Fri, 23 Jan 2026 05:24:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=g4yqma+T; 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 8AA7C1A2AC7; Fri, 23 Jan 2026 13:24:17 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 60FE06070A; Fri, 23 Jan 2026 13:24:17 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 80615119A87C6; Fri, 23 Jan 2026 14:24:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769174656; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=R653SCSX5DaiB7xR51sNuzKHbXZIQEjblooBMBY0vPY=; b=g4yqma+Tavn0PrdYYtt/reSPMigm4wOgkIQWDosqAihbIr4FocNRXFuQw4z4+z6/hgNwmt +AyjIit43p9x5JEfgOkxfiocRP3S7Inf9QJyLUr5Sm90p2eChFbbcpEdlyZIalLSOg9pk2 tel1I412bpIpaTJfh2f7NdCnlf9YmFwoagQCRaox3o6YdBYbnLjoyoq7awVY/lJiQ3YkWf jXZhmmTscUWJg8+/+3cbCeyQzMmyXQdcdaI0z5bNwyARTBsgJWftLJ7EAnAmAQnXxbwUDB G1NbyoHruD5ujSu1cUFljiQQVS3l58kn2XETwvP9Da/ey5GmIqKnb9vZ4U92xw== From: Antonin Godard Date: Fri, 23 Jan 2026 14:24:06 +0100 Subject: [PATCH v4 1/3] bin/bitbake-setup: add descriptions for fragment choices MIME-Version: 1.0 Message-Id: <20260123-bitbake-setup-choose-builtin-v4-1-99361f2128f6@bootlin.com> References: <20260123-bitbake-setup-choose-builtin-v4-0-99361f2128f6@bootlin.com> In-Reply-To: <20260123-bitbake-setup-choose-builtin-v4-0-99361f2128f6@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=gMq1Fa2C70lDztiZG3xKaAAdfvjJCMp4XBU6o4UOp88=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpc3Z9sdVjhV7pNos9gvaWDxQX8JvVS7SeAXu8B pDlSaAjoRCJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCaXN2fQAKCRDRgEFAKaOo NoBkD/9Spco23W53qyCyhdD0tg16/MRgAPVVQ59Ljd76QjtZ/Rgpw2oeKjJGGBo2QJOftrGGdQF nsLmxwDr5tsqoAMahIh2HZbpcu8z4E+DUTvoVnt6dyV0HPDxt0pdo3qtxvJu/6P1tb2Ld9f2Mp4 Gsuh7zpoUVfsZtrFJ0HSAQOmz05Sw/oSXVq1em2HlJ9wJaY4ZgR7dxZGvhEorUdh3qFZd1C6t+e ea5GU6z1F/ne30DsUQkUB12jCbTjd2EfB+VR2hk82853Qou99jbc9CVdn1feyy9ETHOVHQtiQb5 37q98mmZBzGIrerpsO06m1q1T7mQgcYyGnL8tb9HKXH1XKdU2/5WkMGgGeH9dx/i7FSW/VbnPC+ june5i+fQudPI4TgSXC6AbgpqYzHk3Mc9ooSVsiw386SIxXRDPtjkBq7rFNddELnwM7oYX1m0fb HPpWHzerlr+ETAgN9YJLCuEbvdjFXs7tbSK2mXoHe59erNfwg9gWqkhbjKNufwP0fv40J91VkI/ dLT3ZQmY99CqCbn/8HDWvNL86vNwvVQeIz9fvZHTpiun6LvXglc1bDOe4tGj+0tGfP8FKNeQuX9 zfM8mXg2IztTya7iH0YHyW9xNHQ2B02hzGTJ3XK3qZv14QDeS1/+xgHnxOxSmiLjAuUqm0HaF44 uWpEK5QWqssV8MA== 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 ; Fri, 23 Jan 2026 13:24:28 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/8637 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 0cd26814a6e..315f195a4d7 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -515,23 +515,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, registry, 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 b7212f1af41..93477d71473 100644 --- a/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst +++ b/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst @@ -778,11 +778,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": [ @@ -871,6 +881,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 Fri Jan 23 13:24:07 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 79501 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 E10CFD74ED4 for ; Fri, 23 Jan 2026 13:24:28 +0000 (UTC) Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.67696.1769174660063398872 for ; Fri, 23 Jan 2026 05:24:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=JZD1n4fA; 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 7361CC214FC for ; Fri, 23 Jan 2026 13:24:18 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2D3616070A; Fri, 23 Jan 2026 13:24:18 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 3BD18119A87D8; Fri, 23 Jan 2026 14:24:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769174657; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=jgM4Kg90qhX31I7AWOB41exSR9nYVnnPa/BevY8S2A4=; b=JZD1n4fAykJKSMoJVd3gfOI7s8gfzADIeO3LcrcLhlGeHs1BpeyZcKz65R+S1yvNZBHvFO GG8LSkJTzqKIiZWpZup2gHA0Ma/IdCAPf/Mz3fT7gDq+7TG2dS0tu5Welc0kfLMlK4XeKS KsIo8UVI03ymH5rtnebEcIauEDKcEYMGTr4txmsW1i5ZXEvC3CGhUL5ctJX6w5mBr5k6yP 3CWstyVfajgtZr+1cAAsB5f3fprEAgZ7GAHFSPxf9K1DKLr1KgjcBFCHQLUSzpEqldt69I wISRpv4Y/orp0RqtVNULW08A1gvjN0Vs8WBJCsKQVv6kA8dHgJbyt9hAJsBiBQ== From: Antonin Godard Date: Fri, 23 Jan 2026 14:24:07 +0100 Subject: [PATCH v4 2/3] default-registry: update fragments choices with descriptions MIME-Version: 1.0 Message-Id: <20260123-bitbake-setup-choose-builtin-v4-2-99361f2128f6@bootlin.com> References: <20260123-bitbake-setup-choose-builtin-v4-0-99361f2128f6@bootlin.com> In-Reply-To: <20260123-bitbake-setup-choose-builtin-v4-0-99361f2128f6@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/ZANAwAKAdGAQUApo6g2AcsmYgBpc3Z+JbAcSLDarIwgdLe89shulujdlmQueNOso TefvNmHykmJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCaXN2fgAKCRDRgEFAKaOo Nu/ZD/9oZkKMvuT33u2jl8QQFKnOpNblx+JcJbCufDC4lo7dWoiBjhl1DMeJvp9HJuy4RpitaJI ipS+yvgKs89KJthClp2U9tBJ5iiKu8OFPSGA9cHAG6kbvMRAIf5T3keCGGJT7EzPAsbgzIt2qWE PfqsGwQwyoho3rg9sEzYVwzC/bWHVw16qPj6iJfwLT+nzH6mTGmbRAB4P1Ck2TX2m/l8+s7adhc 4ofAd7whJDxiPqaJUjWlzd1EgdUsz6PbrhtsaohgKhkVizGdOQ6zyk/sK4WKYG5CLrUWMWMO2Ml 3OZCwlFfhBQ3JzCKjzv8FYvbPIgKZlS5cLjs1vS1t6WoqDAXLDcQBB7uB1/5OA7/dP6W4rSLXvX MOiVoBXxadcNU6qkVq0rtKdnSLlV+f+j0W/AsXPRq+7RZCNxmF30vKKVTboYJDII+Up/uD7sC3r QqySymosgVDG9+sdN/QRIeAUczN0C2BIpx7kT9t4afuMMt2fSSLnnt5e9GJ/AVprWZXYDNgZem8 Ji5HbZ+eyGjazX7hiUd/DmR7WPajGxzYvTncv6dEwcDIw+BK5zHTj33u/smw5uYTs0tkG8bbq/o 802JG+FbOKmzszLMA06sdz1c7gPJTV+1HjYqq677FSjC3uZVPKxRpTdPyvEnPSK5sQ5qm4FxeqW JxF/BFA8g93jRhQ== 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 ; Fri, 23 Jan 2026 13:24:28 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/8638 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 Fri Jan 23 13:24:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 79503 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 ECD14D74ED5 for ; Fri, 23 Jan 2026 13:24:28 +0000 (UTC) Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.67697.1769174661044154601 for ; Fri, 23 Jan 2026 05:24:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=pHy0MzRC; 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 763F6C20308 for ; Fri, 23 Jan 2026 13:24:19 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 390396070A; Fri, 23 Jan 2026 13:24:19 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 2838D119A879C; Fri, 23 Jan 2026 14:24:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769174658; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=g2koIJSmJjswh6P8PjjE4ZEWlWyNrD5iZxRgYd1r9ZY=; b=pHy0MzRCzw+Nigi3TSb4hC8K2XYOBn4gfE8C2Tos9MnAByP13jj6/bvpBi/Z3laRFW/RjZ kPhMyPb5zSdO+et0B1sZYBMmED8Bp+C5UOqL1Kal201es+S9/QeITStE9qiXBgEEyfTz98 mu0DOBUcV38E9Xwx01Dn2dw3YOpZhgb4n4vACS4I/fr/lbWM8A/I/T8cNp5AcoXnMaHFNK +QD0WSYAeLMAPQiN79nwJ3V3bPEqAz3KLMvo5op65hMzp1p0zWKOVKkiB2aGsjjs6cqWEM KqOqGUS2UmGRF55wI6gDV2F8C6SPxOkqKwVbd0XEaUJol1F/KVl5I7JTMBsuKA== From: Antonin Godard Date: Fri, 23 Jan 2026 14:24:08 +0100 Subject: [PATCH v4 3/3] lib/bb/tests/setup.py: add tests for oe-fragments-one-of MIME-Version: 1.0 Message-Id: <20260123-bitbake-setup-choose-builtin-v4-3-99361f2128f6@bootlin.com> References: <20260123-bitbake-setup-choose-builtin-v4-0-99361f2128f6@bootlin.com> In-Reply-To: <20260123-bitbake-setup-choose-builtin-v4-0-99361f2128f6@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=3627; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=UCnMFPZz7Di0N5U7Oen8QNvdvN3re6ulXQivsjIYkmE=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpc3Z+Pk7NmjiHrtQcz6XHzeCLdPRext/iZc7qF 7ujF8yQ4QOJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCaXN2fgAKCRDRgEFAKaOo NlW2EACfPAoE/DKMh+hQB4q1II8gF2BnWwu5PFVGI1TkjFWLiD5qHgZ+fO6P0ltB7irZh9JW59p WQN+H0EHrTDdCEbj2sJN1fQ8Viy0pyIpD9KmkXXTSo9SemSEadkUUEX+tecgOOxLBCubFaPzBMT qjDW5kYnEW9DjnXYvUJGBicMhRJHpHuP+QcIohFys2YxiR+nF4YyKlKJFbSOZLpwbvuAYqHz1CY oW3A/SrYDn0nE2+EmXZ1RIB5CpstDk9rVXp7+/+MmSe2f0LflrqmowFCld+Nd1JiBcFlCZ164Qb 78UllCsa74C9lABiaVVi33BpwvzOFHjIDH+bYh/GQzkTiPCHcQNBEsQ/lsEtfvM1a+iGQKriJWm pBuwfr6ZZhR26BrL/iKT6qVXmUqNkd225CTto9OepaFrm3XnhNJQ3ncD7+f1ezegNClsS2oK9YF 8lX1nc10zL0/4f64PJinh/do8QQCFZgLYada3qj1mvDQHiBn91Wb2eNs8GbDu0o4rBPjcssnaCF 0JPxA9fW/qcEUXg+OWmz9UuLlODmztGe92F4DPQ8hiBvudI7j7NveuSfs2CUMoTcP/3jvAFnFY+ VG/fkCBcls2Eh6Zu9ZjGY6kwrYYKP33PdVEbV1dhOeENG9NOFKXFVNm6JDK8vZlrnsALFYGdgeh YyWPe2DdFLdP+Uw== 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 ; Fri, 23 Jan 2026 13:24:28 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/8639 There were no tests of oe-fragments-one-of so modify gizmo-notemplate to gizmo-notemplate-fragments-one-of, and test both formats for the options (with or without a description). In get_setup_path(), if the configuration specified on the command-line contains fragments, join everything with "-" as this is what will be the final directory name of the setup. This does not affect other current variants. Signed-off-by: Antonin Godard --- lib/bb/tests/setup.py | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/lib/bb/tests/setup.py b/lib/bb/tests/setup.py index 8b6046c049a..744dfe903ed 100644 --- a/lib/bb/tests/setup.py +++ b/lib/bb/tests/setup.py @@ -136,10 +136,26 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) "oe-fragments": ["test-fragment-1"] }, { - "name": "gizmo-notemplate", + "name": "gizmo-notemplate-fragments-one-of", "description": "Gizmo notemplate configuration", "bb-layers": ["layerC","layerD/meta-layer"], - "oe-fragments": ["test-fragment-2"] + "oe-fragments": ["test-fragment-2"], + "oe-fragments-one-of": { + "fragment-desc": { + "description": "Test fragments (with description)", + "options" : [ + { "name": "fragment-desc-1", "description": "fragment 1 desc" }, + { "name": "fragment-desc-2", "description": "fragment 2 desc" } + ] + }, + "fragment-nodesc": { + "description": "Test fragments (no description)", + "options" : [ + "fragment-nodesc-1", + "fragment-nodesc-2" + ] + } + } }, { "name": "gizmo-notemplate-with-filerelative-layers", @@ -259,7 +275,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 @@ -327,7 +343,14 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"])) # test-config-1 is tested as a registry config and over http, test-config-2 as a local file server = HTTPService(self.registrypath, host="127.0.0.1") server.start() - variants = ('gadget','gizmo','gizmo-env-passthrough','gizmo-no-fragment','gadget-notemplate','gizmo-notemplate') + variants = ( + 'gadget', + 'gizmo', + 'gizmo-env-passthrough', + 'gizmo-no-fragment', + 'gadget-notemplate', + 'gizmo-notemplate-fragments-one-of fragment-desc-1 fragment-nodesc-1', + ) variants_local = variants + ('gizmo-notemplate-with-filerelative-layers',) test_configurations = ({'name':'test-config-1','cmdline': 'test-config-1', 'buildconfigs': variants},