public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: cel@kernel.org
To: Daniel Gomez <da.gomez@kernel.org>
Cc: <kdevops@lists.linux.dev>, Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH] kconfig: "output yaml" renders boolean N as a comment
Date: Thu, 17 Apr 2025 11:13:34 -0400	[thread overview]
Message-ID: <20250417151334.3135530-1-cel@kernel.org> (raw)

From: Chuck Lever <chuck.lever@oracle.com>

I found that the "disable_skipped_hosts" Kconfig setting was not
working.

Using "output yaml" with a boolean behaves somewhat counter-
intuitively. When the user specifies "Yes, please set this", the
variable appears in .extra_vars_auto.yaml with a value of True.
When the user specifies "No, please do not set this" the variable
does not appear in .extra_vars_auto.yaml at all.

A more convenient and sensible behavior would be for "output yaml"
to output false Kconfig settings with an explicit "variable: False".

Suggested-by: Daniel Gomez <da.gomez@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 scripts/kconfig/confdata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index aaab17f401e8..88bb13e6d842 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -736,7 +736,7 @@ static void __print_yaml_symbol(FILE *fp, struct symbol *sym,
 static void print_symbol_for_dotconfig(FILE *fp, FILE *yaml, struct symbol *sym)
 {
 	__print_symbol(fp, sym, OUTPUT_N_AS_UNSET, true);
-	__print_yaml_symbol(yaml, sym, OUTPUT_N_AS_UNSET, true);
+	__print_yaml_symbol(yaml, sym, OUTPUT_N, true);
 }
 
 static void print_symbol_for_autoconf(FILE *fp, struct symbol *sym)
-- 
2.49.0


             reply	other threads:[~2025-04-17 15:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17 15:13 cel [this message]
     [not found] ` <CABj0suCM=dE8hLHoxZDo+isX5qNZAumF4OCdGqsSVAtoO1DTCw@mail.gmail.com>
     [not found]   ` <1F522960-C622-4E23-8D74-5F34F32DEAFC@oracle.com>
2025-04-18  3:03     ` [PATCH] kconfig: "output yaml" renders boolean N as a comment Luis Chamberlain
2025-04-18 14:18       ` Chuck Lever
2025-04-18 18:15         ` Chuck Lever
2025-04-18 19:12           ` Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250417151334.3135530-1-cel@kernel.org \
    --to=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=da.gomez@kernel.org \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox