Discussions in #6524 have shown that there are various possible uses of the kconfig module and even disagreements in the exact file format between Python-based kconfiglib and the tools in Linux. Instead of trying to reconcile them, just rename the module to something less suggestive and leave any policy to meson.build files. In the future it may be possible to add some kind of parsing through keyword arguments such as bool_true, quoted_strings, etc. and possibly creation of key-value lists too. For now, configuration_data objects provide an easy way to access quoted strings. Note that Kconfig stores false as "absent" so it was already necessary to write "x.has_key('abc')" rather than the more compact "x['abc']". Therefore, having to use configuration_data does not make things much more verbose.pull/7115/head
parent
a535ef6719
commit
7e15295018
17 changed files with 40 additions and 33 deletions
@ -0,0 +1,6 @@ |
||||
## `unstable-kconfig` module renamed to `unstable-keyval` |
||||
|
||||
The `unstable-kconfig` module is now renamed to `unstable-keyval`. |
||||
We expect this module to become stable once it has some usage experience, |
||||
specifically in the next or the following release |
||||
|
@ -1,6 +1,6 @@ |
||||
project('kconfig basic test') |
||||
project('keyval basic test') |
||||
|
||||
k = import('unstable-kconfig') |
||||
k = import('unstable-keyval') |
||||
conf = k.load('.config') |
||||
|
||||
if not conf.has_key('CONFIG_VAL1') |
@ -1,5 +1,5 @@ |
||||
|
||||
k = import('unstable-kconfig') |
||||
k = import('unstable-keyval') |
||||
|
||||
conf = k.load(meson.source_root() / '.config') |
||||
|
@ -1,4 +1,4 @@ |
||||
project('kconfig subdir test') |
||||
project('keyval subdir test') |
||||
|
||||
# Test into sub directory |
||||
subdir('dir') |
@ -1,5 +1,5 @@ |
||||
|
||||
k = import('unstable-kconfig') |
||||
k = import('unstable-keyval') |
||||
|
||||
conf = k.load(files('config')) |
||||
|
@ -1,4 +1,4 @@ |
||||
project('kconfig subdir test') |
||||
project('keyval subdir test') |
||||
|
||||
# Test into sub directory |
||||
subdir('dir') |
@ -1,6 +1,6 @@ |
||||
project('kconfig builddir test') |
||||
project('keyval builddir test') |
||||
|
||||
k = import('unstable-kconfig') |
||||
k = import('unstable-keyval') |
||||
|
||||
out_conf = configure_file(input: 'config', output: 'out-config', copy: true) |
||||
conf = k.load(out_conf) |
Loading…
Reference in new issue