kconfig: "output yaml" renders boolean N as a comment
PATCH 1/1 kconfig: "output yaml" renders boolean N as a comment
From: Chuck Lever <[email protected]>
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".
--- scripts/kconfig/confdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kconfig/confdata.c +1 -1
@@ -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)
Signature · 1 line
2.49.0
Quoted 8 lines · Chuck Lever III
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
Quoted 17 lines · Luis Chamberlain
Quoted 8 lines · Chuck Lever III
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 historiesSo.. 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.
Quoted 6 lines
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 [email protected]: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 [email protected]: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
Signature · 1 line
Chuck Lever
Quoted 54 lines · Chuck Lever
Quoted 17 lines · Luis Chamberlain
Quoted 8 lines · Chuck Lever III
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 historiesSo.. 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.
Quoted 6 lines
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 [email protected]: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 [email protected]: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$
Quoted 4 lines
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 [email protected]:linux-kdevops/kconfig.git $ cd kconfig # commit your patches $ git push origin main:yamlconfig
$ cd $ git clone [email protected]:linux-kdevops/kdevops.git $ cd kdevops $ git remote add kconfig [email protected]: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.
Signature · 1 line
Chuck Lever
Quoted 76 lines · Chuck Lever
Quoted 54 lines · Chuck Lever
Quoted 17 lines · Luis Chamberlain
Quoted 8 lines · Chuck Lever III
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 historiesSo.. 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.
Quoted 6 lines
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 [email protected]: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 [email protected]: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$Quoted 4 lines
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-subtreesThis is what finally worked for me:
$ cd $ git clone [email protected]:linux-kdevops/kconfig.git $ cd kconfig # commit your patches $ git push origin main:yamlconfig$ cd $ git clone [email protected]:linux-kdevops/kdevops.git $ cd kdevops $ git remote add kconfig [email protected]:linux-kdevops/kconfig.git $ git fetch kconfig $ git subtree pull --squash --prefix=scripts/kconfig kconfig yamlconfig $ git push origin main:main
Quoted 6 lines
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/kconfigthat 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