public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] kconfig: "output yaml" renders boolean N as a comment
@ 2025-04-17 15:13 cel
       [not found] ` <CABj0suCM=dE8hLHoxZDo+isX5qNZAumF4OCdGqsSVAtoO1DTCw@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: cel @ 2025-04-17 15:13 UTC (permalink / raw)
  To: Daniel Gomez; +Cc: kdevops, Chuck Lever

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-04-18 19:12 UTC | newest]

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox