From patchwork Fri Feb 13 13:50:39 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 81071 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 6B125EDF166 for ; Fri, 13 Feb 2026 13:50:53 +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.71817.1770990651266242328 for ; Fri, 13 Feb 2026 05:50:51 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=J+wT8FE/; 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 D296DC1EC8E for ; Fri, 13 Feb 2026 13:50:57 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 35E11606BE for ; Fri, 13 Feb 2026 13:50:48 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 9A7D410368E88; Fri, 13 Feb 2026 14:50:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1770990647; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=PTnsl14yspt8fVIn1EXRW61TzYwX3yaqJwwrAJu+aM8=; b=J+wT8FE/E1OylzuSVq7Sug7l7qmJrx2u2XnSMAdowfhFJZXxAvRAXXKSrswXgon0DWbeeM lrgpjJq6lCdqR1ya1F927rRjKkW+FU3vGMxlxbYk4E9i5A3tSAIhduy9VFphGP7oo9FiHY lnb6SZU2Gk74OkvOAZgjNStAxLi/aRvMUjM1tKKFZnn0FYz1HcHeDSDeFzolhSiyi1MZSe r4HQBwF3gwxU6J4LnScbSil2AptiT1I/H5pXOMFrEuanmh5dzFQQRcVbn2QfxMXNb5GsBU bgUkM8jhGhgPSymEYa2uxvaNsjnX9jZvqkpUs2pPeVFWXzX7c36n66HuWDKOqA== From: Antonin Godard Date: Fri, 13 Feb 2026 14:50:39 +0100 Subject: [PATCH 1/4] bitbake-setup: define a global for the color choice MIME-Version: 1.0 Message-Id: <20260213-improve-bbsetup-readability-v1-1-41cec3b06992@bootlin.com> References: <20260213-improve-bbsetup-readability-v1-0-41cec3b06992@bootlin.com> In-Reply-To: <20260213-improve-bbsetup-readability-v1-0-41cec3b06992@bootlin.com> To: bitbake-devel@lists.openembedded.org Cc: Thomas Petazzoni , Antonin Godard X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1268; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=94QnDwJqeX6PvffO5FiWeVy+RmyBQHflyehjuFy+VxA=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpjyw1dgjS3TuD87nmCXcUPrckWjbAOtrVvgJVW 9vlk2FPfCqJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCaY8sNQAKCRDRgEFAKaOo Nn2nD/9a/rH2yemA5k8MVqaeZ2P8r9/MzgxKpqr6IAWqLI9I9bnOmd6Bt0/g6vH9x7GC7dWeED7 YVd1zGbFL8YRmmZMJOy7/osqFcZxzmwIiW5OKqS5Sn73SamGjr7Tgd/VQZ0TycZi5hmaxug+qNC G4o6dnfbCt8vUJTAUCVXApmKjQl/PU1jnm3b7r1Y1NytCoawh7MmKpV82r5/PoUBa3/JHWIEx0n oJsMZO0T5EEPKlydbcCVWenJRv+JAC9bjrxXaSDWyC7enS1gw9czgzyApdh4iT+l5+rIvMA821i rTbvxa12MM9fy+/YOncgOBushDcUtTruYHdHY81zpbI/D3yOelBPJd/6YnRSRUWh1MJmBst4GcO Ctwyh7TMqg+Oa1SuKscZSvkgxEnF4ZQADfApJy3JstjMQPBK59Bw2dUPFT/2yb4QdlrD68oI63F dXygPrOm9v9wBGDOd1LE5p6KM/oGatcXB1DeJXBQiHoTARzKFF8hOf4vjfWW5QFpuPabudOJCqx Y5Bh+dGJ74iR/D4tVgHhNi+4Zgh3YBMtAc/TNpJ83m+5204h+ouAVVnsBxHNoScGZALAhBo0nds ZMH3JPnoo+MSS1BvNgbaJZad5/hsFuHHzJQgq/zYuo5+rF7jKDy0LmzL9kMa5OXSs/tdPUSYgt0 JWM1D9wNO/AM5qA== 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, 13 Feb 2026 13:50:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19023 Define a BBSETUP_COLOR global variable that holds the color choice optionally passed from the command-line. This will be re-used in the next commits to force subprocess commands to color their outputs, as passing --color=auto in them always render without coloring. Signed-off-by: Antonin Godard --- bin/bitbake-setup | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index 927c03a1033..547d3f36bff 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -29,6 +29,8 @@ import bb.process logger = bb.msg.logger_create('bitbake-setup', sys.stdout) +BBSETUP_COLOR = False + # These settings can only be set in the global context GLOBAL_ONLY_SETTINGS = ( "top-dir-prefix", @@ -1095,6 +1097,10 @@ def main(): elif args.quiet: logger.setLevel(logging.ERROR) + global BBSETUP_COLOR + if args.color == 'always' or (args.color == 'auto' and sys.stdout.isatty() and os.environ.get('NO_COLOR', '') == ''): + BBSETUP_COLOR = True + # Need to re-run logger_create with color argument # (will be the same logger since it has the same name) bb.msg.logger_create('bitbake-setup', output=sys.stdout, From patchwork Fri Feb 13 13:50:40 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 81072 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 69A24EDF165 for ; Fri, 13 Feb 2026 13:50:53 +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.71770.1770990651262435949 for ; Fri, 13 Feb 2026 05:50:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=uDLplLYr; 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 A683EC1E4A2 for ; Fri, 13 Feb 2026 13:50:58 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 00525606BE for ; Fri, 13 Feb 2026 13:50:49 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 37987102F2783; Fri, 13 Feb 2026 14:50:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1770990648; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=WbJcg1TyKeDEAoor4Nce5DWlCgOnp8zB1h+svCwW25o=; b=uDLplLYrlZ8EFMXliHWQVKPwuTzOqkdycU37ss/XrVUN9d/4uaX5g8yRD6dC//zW7uw0hM 3WiLRdlBqoYVOsdc7bm2fU6comhCABAqQKJh+2HNrEQ4ev+ilV+U6YkyZfX55LABguEBC7 MpECavGKKwA2+h9IMnKOx1R+l3NZNQop0zda3udHOEa/kjAkTeaPhCn5sDwcir3gm/Xvx1 y1e8fykbOrRrVdAH5bQp9jrN/uS8NuG/Mk5NAemAtR9DgNfqnbTiRop28D0/c+3e2Itjg8 L3yZscm4AekHUJ/LZDiUrcbyKfEW57Jhe9xsuu+0W7WrRWnEJZPYLC/hPT9kDQ== From: Antonin Godard Date: Fri, 13 Feb 2026 14:50:40 +0100 Subject: [PATCH 2/4] bitbake-setup: improve readability of choices MIME-Version: 1.0 Message-Id: <20260213-improve-bbsetup-readability-v1-2-41cec3b06992@bootlin.com> References: <20260213-improve-bbsetup-readability-v1-0-41cec3b06992@bootlin.com> In-Reply-To: <20260213-improve-bbsetup-readability-v1-0-41cec3b06992@bootlin.com> To: bitbake-devel@lists.openembedded.org Cc: Thomas Petazzoni , Antonin Godard X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=5531; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=iumSXHGUWMiOUn5GaWksGP8ViqhmowNFVqoZ5lXvfU0=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpjyw25o+6MhALg6G/OFdIeEb9jP8feGcY93uIK Y3vEvDuszOJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCaY8sNgAKCRDRgEFAKaOo Nrl0EACgcYq2ekFXN3/RHAvH4uqa1bveZ2aUhXAdeSwTZvV88pEzVQJrbjjPp0Hqu3S99tLxx2y 0pN31bVvJCi8C3VM4wjcpfV9URHRp2b+/WSe38uTeJ/AC2KZdS3hsNYpfJnBEGNL9e+Xo/ORrQp ieQkPOShuGEeoUH3f0aS1YEz8J6K16n3YKQONRRRpP3cjukLzNLgZ4Ik6dkO11lBCyUYed7PhCA 1NHZpCjlTWVQ36yoxYh0WOLiUmeRzOLKIrdV5pJLOl3CcnTuFmEKytLyLPZIFRpm6YDWmyuAh2L V4ji1PJOHOAsCeS7mL14etSo0iH9uco88LMMrEfvxis3mPnKesR/Di17phqFV+d4L5UO4X9Tj52 eu7+e9nMybi0yddazo+TW5vRNrgq1CDlE1E379ufcW8Pwq2Qamwycv1XewTuXetxd+Lr1VQ6gOe 0I92EpW0VMy9BETPVs57tbC63BxikDlq1kF7nxoZpp1v/YJIRCrfoqQ5UeyTIK7awFfEREpulsB CTXTEXXLzHTNo6ReNJE1aYZzvDLqE6pdlX3mcmDFF5lnwLvYSKOQwZ8HtGM6jzZKrLk5+V3sK5L 1uV4pJ+u6nVVVr0DWHh4EaVcbbdkKqKHM32QE6mRcXETY7An3yr1CpRucO9r/rtfIzOEcfRMc6G t3xPXQQM25Ps55A== 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, 13 Feb 2026 13:50:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19026 Bold the configuration names and align the descriptions for improved readability. For this, define a print_configs() function which should also help factorizing the code as this is done in multiple places. Signed-off-by: Antonin Godard --- bin/bitbake-setup | 73 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 23 deletions(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index 547d3f36bff..6529e9f30b5 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -37,6 +37,32 @@ GLOBAL_ONLY_SETTINGS = ( "top-dir-name", ) +def print_configs(prompt: str,choices: list[str], descriptions: list[str] = []): + """ + Helper function to print a list of choices and align the output. + Each option name is made bold to stand out. + """ + if not prompt.endswith(':'): + prompt += ":" + logger.plain(prompt) + + if not descriptions: + descriptions = ["" for _ in choices] + + # maximum size of all choices, for alignment + cmax = max([len(c) for c in choices]) + 1 + + for n, c in enumerate(choices): + msg = f"{n + 1}. " + if BBSETUP_COLOR: + # make it bold + msg += "\033[1m" + msg += f"{c:<{cmax}}" + if BBSETUP_COLOR: + msg += "\033[0m" + msg += f" {descriptions[n]}" + logger.plain(msg) + # If bitbake is from a release tarball or somewhere like pypi where # updates may not be straightforward, prefer to use the git repo as the # default registry @@ -492,36 +518,39 @@ def choose_bitbake_config(configs, parameters, non_interactive): if non_interactive: raise Exception("Unable to choose from bitbake configurations in non-interactive mode: {}".format(configs_dict)) - logger.plain("\nAvailable bitbake configurations:") - for n, config_data in enumerated_configs: - logger.plain("{}. {}\t{}".format(n, config_data["name"], config_data["description"])) + logger.plain("") + print_configs("Available bitbake configurations", + [c["name"] for c in flattened_configs], + [c["description"] for c in flattened_configs]) config_n = int_input([i[0] for i in enumerated_configs], "\nPlease select one of the above bitbake configurations by its number: ") - 1 return flattened_configs[config_n] def choose_config(configs, non_interactive): not_expired_configs = [k for k in sorted(configs.keys()) if not has_expired(configs[k].get("expires", None))] - config_list = list(enumerate(not_expired_configs, 1)) - if len(config_list) == 1: - only_config = config_list[0][1] + if len(not_expired_configs) == 1: + only_config = not_expired_configs[0] logger.plain("\nSelecting the only available configuration {}\n".format(only_config)) return only_config if non_interactive: raise Exception("Unable to choose from configurations in non-interactive mode: {}".format(not_expired_configs)) - logger.plain("\nAvailable Configuration Templates:") - for n, config_name in config_list: - config_data = configs[config_name] - expiry_date = config_data.get("expires", None) - config_desc = config_data["description"] + descs = [] + for c in not_expired_configs: + d = configs[c]["description"] + expiry_date = configs[c].get("expires", None) if expiry_date: - logger.plain("{}. {}\t{} (supported until {})".format(n, config_name, config_desc, expiry_date)) - else: - logger.plain("{}. {}\t{}".format(n, config_name, config_desc)) - config_n = int_input([i[0] for i in config_list], - "\nPlease select one of the above Configuration Templates by its number: ") - 1 - return config_list[config_n][1] + d += f" (supported until {expiry_date})" + descs.append(d) + + logger.plain("") + print_configs("Available Configuration Templates", + [c for c in not_expired_configs], + descs) + config_n = int_input([i[0] for i in list(enumerate(not_expired_configs, 1))], + "\nPlease select one of the above configurations by its number: ") - 1 + return not_expired_configs[config_n] def choose_fragments(possibilities, parameters, non_interactive, skip_selection): choices = {} @@ -547,13 +576,11 @@ def choose_fragments(possibilities, parameters, non_interactive, skip_selection) if non_interactive: raise Exception(f"Unable to choose from options in non-interactive mode: {[o['name'] for o in options]}") - logger.plain("\n" + v["description"] + ":") + logger.plain("") + print_configs(v["description"], + [o['name'] for o in options], + [o['description'] for o in options]) options_enumerated = list(enumerate(options, 1)) - for n,o in options_enumerated: - 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]["name"] From patchwork Fri Feb 13 13:50:41 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 81073 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 864EBEDF16A for ; Fri, 13 Feb 2026 13:50:53 +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.71818.1770990651282024956 for ; Fri, 13 Feb 2026 05:50:51 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=1G5rTI2E; 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 59ACCC1E4A9 for ; Fri, 13 Feb 2026 13:50:59 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id B0F14606BE for ; Fri, 13 Feb 2026 13:50:49 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id EE2D610368EA0; Fri, 13 Feb 2026 14:50:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1770990649; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=Zz34w/TjKS30ZNqoFBiqBcoBiOmRS0I3KhR/JfczxNw=; b=1G5rTI2EgnKD3Fx4cMzRHFNIfhnmRpLlR0QCSthyWcr7XFllJp55paJWVE+vcVSMzkfnaR Hwp238VMz13g/F2MPAgHKu3HMfQV77x5U3hGXln47TGBM9Nblvf5/lvqnUyUVgMQgWVSA6 gBTy9573e0pW4DD1tF8K8lAeVcEVxwppM5mcGKNldxPA/I7eRVe1hkRYTXteUPkVe9bOs7 H4Ts6CKOHbg6RBLo0xfRfDMVVW2990jZ8nCi8btmVxkN98a7UtLLxAuIjGYpPQrum+C201 XMQLD+d1NwPHKoR3z8q4f33cCL/smsbgsHrD+Cv4dFRLpDbAqZT4Cc31C+X/mA== From: Antonin Godard Date: Fri, 13 Feb 2026 14:50:41 +0100 Subject: [PATCH 3/4] bitbake-setup: print plain messages in quiet mode MIME-Version: 1.0 Message-Id: <20260213-improve-bbsetup-readability-v1-3-41cec3b06992@bootlin.com> References: <20260213-improve-bbsetup-readability-v1-0-41cec3b06992@bootlin.com> In-Reply-To: <20260213-improve-bbsetup-readability-v1-0-41cec3b06992@bootlin.com> To: bitbake-devel@lists.openembedded.org Cc: Thomas Petazzoni , Antonin Godard X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1010; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=bpUDnkVUQCWcPByPfOFXy4LVJxmRaXf+AR83eJAIPOc=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpjyw2I2QK/1W7mbPtpt/RGNK/IpW/bfb/KRaDI ksX5qOQ9SeJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCaY8sNgAKCRDRgEFAKaOo NlaTD/sEPRKklV2tjUX6a7BQrCcUkYxwx1y0QQItPI07OFMG41eQ9zhUrO+YbkOg73jVwdaKLzI D3rMu/k/L6NLB6T0W1JlH24ej9Tgenccf8bk5Pey3FuLXVGxzwfFSx+g/6HQVPBWVLrnwdPqXlo eQ1lXIc4KxXbht3Bni3beTRyo289I9x5ApIGq32r1wsNtLanBhWV4ijlvr7Pth3CFnnHEgACi79 NutVv34h2rTs7U5kxFqYugsf+s6FhO8x6xqMIwBFOciKxCAiLc0aZnmSyw31FHrdFj+iRgYqk+O HAX7vwvz5R9jpobqOiQ32+Z6TJNPFCoEgCO/ksolxUg0Dv6xWxX2vXOmKgGoPFLxbHEr5spjXBH K6Na82oXX8SiVSUInUl2/3y+uOAKl38T/DxTs2n81FfHvSh2/REeBqdJdDXCIVYFFoR97tRPS75 WnS4EBVY4PQiVaE69RbzsXaTnIzgkMq1DiJbqzf1+SUNKw08QBCzk2hOTz8+6Ts7rtgFKoGd++0 Zfb4YlyHEen3OGYyEe6KHsBzrOnFrXQFAxqPyvSogqVNKsV4CJTDcjgrwqbR1opRDPPq3SZ8kpn dJQcMTMvd7UPKvRHQW6al7auHDGLrBlv/1iPUHrB5iKslEVeXZnigUx8U5Bbakivn0Y7nhKkNvN KvmUwCQ1wEveuzA== 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, 13 Feb 2026 13:50:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19025 At the moment, plain messages are not printed when --quiet is passed on the command line. This makes no sense since bitbake-setup prints most of the essential information with the logging.PLAIN level. Raise the quiet logger level to logging.INFO + 1, which corresponds to the PLAIN level in the BBLogFormatter class. Signed-off-by: Antonin Godard --- bin/bitbake-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index 6529e9f30b5..19db14edb3e 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -1122,7 +1122,7 @@ def main(): if args.debug: logger.setLevel(logging.DEBUG) elif args.quiet: - logger.setLevel(logging.ERROR) + logger.setLevel(logging.INFO + 1) # BBLogFormatter.PLAIN level global BBSETUP_COLOR if args.color == 'always' or (args.color == 'auto' and sys.stdout.isatty() and os.environ.get('NO_COLOR', '') == ''): From patchwork Fri Feb 13 13:50:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 81074 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 79E02EDF168 for ; Fri, 13 Feb 2026 13:50:53 +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.71819.1770990651890237560 for ; Fri, 13 Feb 2026 05:50:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=NnJ9YIbd; 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 0C286C1E4AA for ; Fri, 13 Feb 2026 13:51:00 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 590B1606BE for ; Fri, 13 Feb 2026 13:50:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A0E4210368E9A; Fri, 13 Feb 2026 14:50:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1770990650; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=5PnWtHCncfoS2w2RvO/HkGrsS/GX0vbTRC8W6CORhxI=; b=NnJ9YIbdDHyPmCuVjvFlUH/h/K7s41QoYC9pORqgAmFUkTocnoRNx5v7/yrL2LydKlOuYG OppCT/AjF0iJN5fhtO2JGmCjpGPvO3NQAMzabgrgk+Sr2ZwlTc5zbZFPWxsGYDsOETY7gB e1zcHtVsR8SsN9Le2OMbfe/rYa/tAKIaKR792LP5Wak9WDK+ZRHD6rNAKNmWP9bIvZMnCc MFBdb98OmmBpHuPEVdu64kCUmbc3Tgf6wdMQBzngo8e1qT63BnTK8qHir70nJiqCjDbM/3 orPV6mPQ777vRpR3g1yuCZpnTuMWCtxF8K8pUu0f1dIVww6fke98du/YbUxrRw== From: Antonin Godard Date: Fri, 13 Feb 2026 14:50:42 +0100 Subject: [PATCH 4/4] bitbake-setup: print colored diffs MIME-Version: 1.0 Message-Id: <20260213-improve-bbsetup-readability-v1-4-41cec3b06992@bootlin.com> References: <20260213-improve-bbsetup-readability-v1-0-41cec3b06992@bootlin.com> In-Reply-To: <20260213-improve-bbsetup-readability-v1-0-41cec3b06992@bootlin.com> To: bitbake-devel@lists.openembedded.org Cc: Thomas Petazzoni , Antonin Godard X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2255; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=sCI3gBDVMWr/XlLVjIpmgJCrxbNtTKpT3gQVKREhLSU=; b=owEBbQKS/ZANAwAKAdGAQUApo6g2AcsmYgBpjyw2f60ZK0AFal9hxv9rvjLoD/DmLjRwy6SfM 1EuoHMrd1aJAjMEAAEKAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCaY8sNgAKCRDRgEFAKaOo NvWvEACKTxMZjr0/IgDDk9o2L4zvxy5Y/SRR+hCfv5GFyUD1aZ92YwUqeVNeCZTeNyDgQgItVf3 3GKzGefu9tKwiu3qbUk+5e29L49mYTv8VfNI4QTFdSsJHuuWMOFyRrlrXw4/0ckkKGhp6A3A94E S0hxbxd2TC4NIPBUO6qVQ0l/tI3rFU+bvOix0Kc+590bhZ724/ERHSONulpeq9d0AxmcHrefB15 vCh0YU7yFLrPIk5YakhGd9WSwb1c282eVivGHTTaFVz2zs6Nx+Cvsqdlt0DDUM+bDclzMgMX5eS pWHv/VPhkn7n+DGrZ4V9JSMtqBIrOQM8O3x8QYtkhvYb/A6uHWNBJ+zvRMY0aRvccH9sbJfA8BV UXolC8sAFvACY2ysj5WqiHxVqdtFIGoEB6vQseLk85XL5Qz/ykmyzczaal0bytNTDkPAyojJ8P1 89kVbS4QjfqYXRA89kTG9eurizY8Wb/Gcd8ggaN+Q3U7y8z4ScBkkT01nsBTrNz8ZAcSEy+DnEH OfGQ48fy4t6vIUnCE9LWPig5XKHwKSNPM/BbzwT67MIvv2uurdiE+E7DxTPCBHMD1HDlERJT6YE /8dRd/dtSwZfyeov/HbB5Almnp7vGo4MYA74ggNe2Gow654TAUFtXsZpTrlaABSiWjrVomPpf91 jKZ9gVDIlfXzExw== 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, 13 Feb 2026 13:50:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19027 Use the global BBSETUP_COLOR variable to enable color or not in diff outputs. When passing "auto" to the diff or git diff commands in subprocess tasks, the color is never shown, which is why we need to force it using "always" when BBSETUP_COLOR is True. Signed-off-by: Antonin Godard --- bin/bitbake-setup | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index 19db14edb3e..b8acf972e14 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -196,7 +196,9 @@ be preserved in a backup directory.""".format(r_name, r_path)) status = bb.process.run('git -C {} status --porcelain'.format(r_path))[0] if status: return True - diff = bb.process.run('git -C {} diff {}'.format(r_path, rev))[0] + diff = bb.process.run('git -C {} diff --color={} {}'.format(r_path, + "always" if BBSETUP_COLOR else "never", + rev))[0] if diff: return True return False @@ -722,7 +724,9 @@ def init_config(top_dir, settings, args): def get_diff(file1, file2): try: - bb.process.run('diff -uNr {} {}'.format(file1, file2)) + bb.process.run('diff --color={} -uNr {} {}'.format("always" if BBSETUP_COLOR else "never", + file1, + file2)) except bb.process.ExecutionError as e: if e.exitcode == 1: return e.stdout @@ -780,7 +784,7 @@ def build_status(top_dir, settings, args, d, update=False): new_upstream_config = obtain_config(top_dir, registry, args, source_overrides, d) write_upstream_config(confdir, new_upstream_config) - config_diff = bb.process.run('git -C {} diff'.format(confdir))[0] + config_diff = bb.process.run('git -C {} diff --color={}'.format(confdir, "always" if BBSETUP_COLOR else "never"))[0] if config_diff: logger.plain('\nConfiguration in {} has changed:\n{}'.format(setupdir, config_diff))