Hi Massimo, On 2026-10-03T09:09:36, Massimo Pegorer <[email protected]> wrote: > qconfig: Improve the documentation > > Specify where the database is created and under what name. Add text > value lookup examples, including quoting, escaping and regular > expression cases. Trivial fixes. > > Signed-off-by: Massimo Pegorer <[email protected]> > > doc/develop/qconfig.rst | 24 +++++++++++++++++++----- > 1 file changed, 19 insertions(+), 5 deletions(-)
> diff --git a/doc/develop/qconfig.rst b/doc/develop/qconfig.rst > @@ -26,9 +26,10 @@ How does it work? > +in include/autoconf.mk. The tool must be run at the top of source directory > +where it stores the database file named qconfig.db. Please can you reword this to '...at the top of the source directory, where it stores the database in a file called qconfig.db'. The article and comma are missing. Also, check_top_directory() runs for every operation, not just -b, so this might fit better in its own short paragraph than in the text about building the database. > diff --git a/doc/develop/qconfig.rst b/doc/develop/qconfig.rst > @@ -95,10 +96,23 @@ boards with an empty string for > `CONFIG_DEFAULT_FDT_FILE`:: > +Text values can be looked for too, including regular expressions, but taking > +care of needed quoting and escaping. E.g.:: > + > + ./tools/qconfig.py -f TPL_LDSCRIPT='"arch/arm/cpu/u-boot-spl.lds"' > + 0 matches The examples are useful, but nothing tells the reader why the first one finds nothing. Please can you explain the rules they depend on: 1. The value is a Python regular expression and must match the whole value, since defconfig_matches() uses fullmatch(). 2. String values are stored with their double quotes, so the quotes must be part of the pattern. 3. The stored value is the one from the Kconfig file, before expansion. Here that is arch/$(ARCH)/cpu/u-boot-spl.lds, which is why the literal arch/arm gives 0 matches. 4. Single quotes are needed so the shell passes the double quotes and backslashes through unchanged. Also, the text above uses 'For example' rather than 'E.g.', so it would be good to match that. I would also say 'searched for' rather than 'looked for'. Since you are doing trivial fixes anyway, the earlier SCSI example shows names with the _defconfig suffix, but do_find_config() strips it. You could fix that output in this patch too. Regards, Simon
