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

* Re: [PATCH] kconfig: "output yaml" renders boolean N as a comment
       [not found]   ` <1F522960-C622-4E23-8D74-5F34F32DEAFC@oracle.com>
@ 2025-04-18  3:03     ` Luis Chamberlain
  2025-04-18 14:18       ` Chuck Lever
  0 siblings, 1 reply; 5+ messages in thread
From: Luis Chamberlain @ 2025-04-18  3:03 UTC (permalink / raw)
  To: Chuck Lever III
  Cc: Daniel Gomez, cel@kernel.org, Daniel Gomez,
	kdevops@lists.linux.dev

On Fri, Apr 18, 2025 at 01:13:05AM +0000, Chuck Lever III wrote:
> 
> 
> After pushing the patch to kconfig / yamlconfig, I tried using
> the Makefile.subtrees targets to merge that commit into
> kdevops / main, and got this:
> 
> cel@renoir:/tmp/kdevops$ make -f Makefile.subtrees refresh-subtrees
> fatal: refusing to merge unrelated histories
 
So.. basically when I removed the old results archive to get the kdevops
tree to go on a diet (first patch in the tree now) I git added
*everyhing* back... and I forgot to add instead kconfig as a git subtree
then. So that messed up the history. There however is a trick which can
be adopted for very obscure ways to use git subtrees when this happens,
essentially we tell git -- don't worry, trust me.

The git ocult trick is documented under kdevops git commit ec5a7d94a3b99e5
("Split 'scripts/kconfig/' into commit 'd2ca2620d14b94bc94e9e0d9adc7a3d030ae13c7'".

Its why I documented carefully there as there is no man pages about this
fun way to use git subtrees this way. In fact I don't think the authors
intended for this to work, but it does.

  Luis


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

* Re: [PATCH] kconfig: "output yaml" renders boolean N as a comment
  2025-04-18  3:03     ` Luis Chamberlain
@ 2025-04-18 14:18       ` Chuck Lever
  2025-04-18 18:15         ` Chuck Lever
  0 siblings, 1 reply; 5+ messages in thread
From: Chuck Lever @ 2025-04-18 14:18 UTC (permalink / raw)
  To: Luis Chamberlain
  Cc: Daniel Gomez, cel@kernel.org, Daniel Gomez,
	kdevops@lists.linux.dev

On 4/17/25 11:03 PM, Luis Chamberlain wrote:
> On Fri, Apr 18, 2025 at 01:13:05AM +0000, Chuck Lever III wrote:
>>
>>
>> After pushing the patch to kconfig / yamlconfig, I tried using
>> the Makefile.subtrees targets to merge that commit into
>> kdevops / main, and got this:
>>
>> cel@renoir:/tmp/kdevops$ make -f Makefile.subtrees refresh-subtrees
>> fatal: refusing to merge unrelated histories
>  
> So.. basically when I removed the old results archive to get the kdevops
> tree to go on a diet (first patch in the tree now) I git added
> *everyhing* back... and I forgot to add instead kconfig as a git subtree
> then. So that messed up the history. There however is a trick which can
> be adopted for very obscure ways to use git subtrees when this happens,
> essentially we tell git -- don't worry, trust me.
> 
> The git ocult trick is documented under kdevops git commit ec5a7d94a3b99e5
> ("Split 'scripts/kconfig/' into commit 'd2ca2620d14b94bc94e9e0d9adc7a3d030ae13c7'".
> 
> Its why I documented carefully there as there is no man pages about this
> fun way to use git subtrees this way. In fact I don't think the authors
> intended for this to work, but it does.

Well, I should take a step back. The first failure is this:

cel@renoir:/tmp$ git clone git@github.com:linux-kdevops/kdevops.git
Cloning into 'kdevops'...
remote: Enumerating objects: 8356, done.
remote: Counting objects: 100% (2322/2322), done.
remote: Compressing objects: 100% (515/515), done.
remote: Total 8356 (delta 2029), reused 1848 (delta 1804), pack-reused
6034 (from 2)
Receiving objects: 100% (8356/8356), 10.94 MiB | 19.18 MiB/s, done.
Resolving deltas: 100% (4649/4649), done.
cel@renoir:/tmp$ cd kdevops/
cel@renoir:/tmp/kdevops$ git remote add kconfig
git@github.com:linux-kdevops/kconfig.git
cel@renoir:/tmp/kdevops$ git fetch kconfig
remote: Enumerating objects: 215, done.
remote: Counting objects: 100% (215/215), done.
remote: Compressing objects: 100% (111/111), done.
remote: Total 215 (delta 125), reused 189 (delta 99), pack-reused 0 (from 0)
Receiving objects: 100% (215/215), 167.43 KiB | 2.09 MiB/s, done.
Resolving deltas: 100% (125/125), done.
From github.com:linux-kdevops/kconfig
 * [new branch]                master     -> kconfig/master
 * [new branch]                yamlconfig -> kconfig/yamlconfig
cel@renoir:/tmp/kdevops$ git subtree add --prefix=scripts/kconfig
kconfig master
fatal: prefix 'scripts/kconfig' already exists.
cel@renoir:/tmp/kdevops$

I get the same error with:

cel@renoir:/tmp/kdevops$ make -f Makefile.subtrees add-subtree-remotes-dev
cel@renoir:/tmp/kdevops$ make -f Makefile.subtrees refresh-subtrees


-- 
Chuck Lever

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

* Re: [PATCH] kconfig: "output yaml" renders boolean N as a comment
  2025-04-18 14:18       ` Chuck Lever
@ 2025-04-18 18:15         ` Chuck Lever
  2025-04-18 19:12           ` Luis Chamberlain
  0 siblings, 1 reply; 5+ messages in thread
From: Chuck Lever @ 2025-04-18 18:15 UTC (permalink / raw)
  To: Luis Chamberlain, Daniel Gomez; +Cc: Daniel Gomez, kdevops@lists.linux.dev

On 4/18/25 10:18 AM, Chuck Lever wrote:
> On 4/17/25 11:03 PM, Luis Chamberlain wrote:
>> On Fri, Apr 18, 2025 at 01:13:05AM +0000, Chuck Lever III wrote:
>>>
>>>
>>> After pushing the patch to kconfig / yamlconfig, I tried using
>>> the Makefile.subtrees targets to merge that commit into
>>> kdevops / main, and got this:
>>>
>>> cel@renoir:/tmp/kdevops$ make -f Makefile.subtrees refresh-subtrees
>>> fatal: refusing to merge unrelated histories
>>  
>> So.. basically when I removed the old results archive to get the kdevops
>> tree to go on a diet (first patch in the tree now) I git added
>> *everyhing* back... and I forgot to add instead kconfig as a git subtree
>> then. So that messed up the history. There however is a trick which can
>> be adopted for very obscure ways to use git subtrees when this happens,
>> essentially we tell git -- don't worry, trust me.
>>
>> The git ocult trick is documented under kdevops git commit ec5a7d94a3b99e5
>> ("Split 'scripts/kconfig/' into commit 'd2ca2620d14b94bc94e9e0d9adc7a3d030ae13c7'".
>>
>> Its why I documented carefully there as there is no man pages about this
>> fun way to use git subtrees this way. In fact I don't think the authors
>> intended for this to work, but it does.
> 
> Well, I should take a step back. The first failure is this:
> 
> cel@renoir:/tmp$ git clone git@github.com:linux-kdevops/kdevops.git
> Cloning into 'kdevops'...
> remote: Enumerating objects: 8356, done.
> remote: Counting objects: 100% (2322/2322), done.
> remote: Compressing objects: 100% (515/515), done.
> remote: Total 8356 (delta 2029), reused 1848 (delta 1804), pack-reused
> 6034 (from 2)
> Receiving objects: 100% (8356/8356), 10.94 MiB | 19.18 MiB/s, done.
> Resolving deltas: 100% (4649/4649), done.
> cel@renoir:/tmp$ cd kdevops/
> cel@renoir:/tmp/kdevops$ git remote add kconfig
> git@github.com:linux-kdevops/kconfig.git
> cel@renoir:/tmp/kdevops$ git fetch kconfig
> remote: Enumerating objects: 215, done.
> remote: Counting objects: 100% (215/215), done.
> remote: Compressing objects: 100% (111/111), done.
> remote: Total 215 (delta 125), reused 189 (delta 99), pack-reused 0 (from 0)
> Receiving objects: 100% (215/215), 167.43 KiB | 2.09 MiB/s, done.
> Resolving deltas: 100% (125/125), done.
> From github.com:linux-kdevops/kconfig
>  * [new branch]                master     -> kconfig/master
>  * [new branch]                yamlconfig -> kconfig/yamlconfig
> cel@renoir:/tmp/kdevops$ git subtree add --prefix=scripts/kconfig
> kconfig master
> fatal: prefix 'scripts/kconfig' already exists.
> cel@renoir:/tmp/kdevops$
> 
> I get the same error with:
> 
> cel@renoir:/tmp/kdevops$ make -f Makefile.subtrees add-subtree-remotes-dev
> cel@renoir:/tmp/kdevops$ make -f Makefile.subtrees refresh-subtrees

This is what finally worked for me:

$ cd
$ git clone git@github.com:linux-kdevops/kconfig.git
$ cd kconfig
# commit your patches
$ git push origin main:yamlconfig

$ cd
$ git clone git@github.com:linux-kdevops/kdevops.git
$ cd kdevops
$ git remote add kconfig git@github.com:linux-kdevops/kconfig.git
$ git fetch kconfig
$ git subtree pull --squash --prefix=scripts/kconfig kconfig yamlconfig
$ git push origin main:main

Please examine the tip of linux-kdevops/kdevops to make sure all is
well.

${TOPDIR}/Makefile.subtrees appears to be out of date. Perhaps we need a
README.md in scripts/kconfig that explains how to make patches for these
files.

-- 
Chuck Lever


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

* Re: [PATCH] kconfig: "output yaml" renders boolean N as a comment
  2025-04-18 18:15         ` Chuck Lever
@ 2025-04-18 19:12           ` Luis Chamberlain
  0 siblings, 0 replies; 5+ messages in thread
From: Luis Chamberlain @ 2025-04-18 19:12 UTC (permalink / raw)
  To: Chuck Lever; +Cc: Daniel Gomez, Daniel Gomez, kdevops@lists.linux.dev

On Fri, Apr 18, 2025 at 02:15:29PM -0400, Chuck Lever wrote:
> On 4/18/25 10:18 AM, Chuck Lever wrote:
> > On 4/17/25 11:03 PM, Luis Chamberlain wrote:
> >> On Fri, Apr 18, 2025 at 01:13:05AM +0000, Chuck Lever III wrote:
> >>>
> >>>
> >>> After pushing the patch to kconfig / yamlconfig, I tried using
> >>> the Makefile.subtrees targets to merge that commit into
> >>> kdevops / main, and got this:
> >>>
> >>> cel@renoir:/tmp/kdevops$ make -f Makefile.subtrees refresh-subtrees
> >>> fatal: refusing to merge unrelated histories
> >>  
> >> So.. basically when I removed the old results archive to get the kdevops
> >> tree to go on a diet (first patch in the tree now) I git added
> >> *everyhing* back... and I forgot to add instead kconfig as a git subtree
> >> then. So that messed up the history. There however is a trick which can
> >> be adopted for very obscure ways to use git subtrees when this happens,
> >> essentially we tell git -- don't worry, trust me.
> >>
> >> The git ocult trick is documented under kdevops git commit ec5a7d94a3b99e5
> >> ("Split 'scripts/kconfig/' into commit 'd2ca2620d14b94bc94e9e0d9adc7a3d030ae13c7'".
> >>
> >> Its why I documented carefully there as there is no man pages about this
> >> fun way to use git subtrees this way. In fact I don't think the authors
> >> intended for this to work, but it does.
> > 
> > Well, I should take a step back. The first failure is this:
> > 
> > cel@renoir:/tmp$ git clone git@github.com:linux-kdevops/kdevops.git
> > Cloning into 'kdevops'...
> > remote: Enumerating objects: 8356, done.
> > remote: Counting objects: 100% (2322/2322), done.
> > remote: Compressing objects: 100% (515/515), done.
> > remote: Total 8356 (delta 2029), reused 1848 (delta 1804), pack-reused
> > 6034 (from 2)
> > Receiving objects: 100% (8356/8356), 10.94 MiB | 19.18 MiB/s, done.
> > Resolving deltas: 100% (4649/4649), done.
> > cel@renoir:/tmp$ cd kdevops/
> > cel@renoir:/tmp/kdevops$ git remote add kconfig
> > git@github.com:linux-kdevops/kconfig.git
> > cel@renoir:/tmp/kdevops$ git fetch kconfig
> > remote: Enumerating objects: 215, done.
> > remote: Counting objects: 100% (215/215), done.
> > remote: Compressing objects: 100% (111/111), done.
> > remote: Total 215 (delta 125), reused 189 (delta 99), pack-reused 0 (from 0)
> > Receiving objects: 100% (215/215), 167.43 KiB | 2.09 MiB/s, done.
> > Resolving deltas: 100% (125/125), done.
> > From github.com:linux-kdevops/kconfig
> >  * [new branch]                master     -> kconfig/master
> >  * [new branch]                yamlconfig -> kconfig/yamlconfig
> > cel@renoir:/tmp/kdevops$ git subtree add --prefix=scripts/kconfig
> > kconfig master
> > fatal: prefix 'scripts/kconfig' already exists.
> > cel@renoir:/tmp/kdevops$
> > 
> > I get the same error with:
> > 
> > cel@renoir:/tmp/kdevops$ make -f Makefile.subtrees add-subtree-remotes-dev
> > cel@renoir:/tmp/kdevops$ make -f Makefile.subtrees refresh-subtrees
> 
> This is what finally worked for me:
> 
> $ cd
> $ git clone git@github.com:linux-kdevops/kconfig.git
> $ cd kconfig
> # commit your patches
> $ git push origin main:yamlconfig
> 
> $ cd
> $ git clone git@github.com:linux-kdevops/kdevops.git
> $ cd kdevops
> $ git remote add kconfig git@github.com:linux-kdevops/kconfig.git
> $ git fetch kconfig
> $ git subtree pull --squash --prefix=scripts/kconfig kconfig yamlconfig
> $ git push origin main:main
> 
> Please examine the tip of linux-kdevops/kdevops to make sure all is
> well.
> 
> ${TOPDIR}/Makefile.subtrees appears to be out of date. Perhaps we need a
> README.md in scripts/kconfig that explains how to make patches for these
> files.

Thanks looks good, I was about to try it myself but glad to see it worked.
This will be important later if we decide to embrace the picosat SAT solver.

 Luis

^ permalink raw reply	[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