| Age | Commit message (Collapse) | Author |
|
Stuff like this is not the pinnacle of helpful design, and hides that
the commands actually have long help texts (that can be viewed with
pydoc):
$ ./menuconfig.py --help
[Errno 2] No such file or directory: '--help'
Fix it by converting standard_kconfig() to argparse, and add a
'description' argument to it for the command-specific help text. --help
now shows the same help text shown by pydoc, and some other error
messages are improved as well.
Also fix some copy-paste errors and outdated paths in the help texts for
the all*config commands.
|
|
Hardcoding load_config() and write_(min_)config() to write any message
to stdout is awkward, because it means that the message can't be easily
reused when stdout is the wrong place to write it to (e.g. in
menuconfig/guiconfig). This gets extra bad now that there's also the "No
change to ..." message.
Modify load_config() and write_(min_)config() to return the message as a
string instead, and have them always return a message, instead of just
when 'filename' is None and verbose=True. This makes things flexible and
straightforward.
Use the new behavior in menuconfig.py and guiconfig.py. They now show
"No change to ..." when saving a file doesn't modify it.
Tools that want to write messages to stdout should now do
print(kconf.load_config()) / print(kconf.write_config()).
There's no clean way to preserve perfect backwards compatibility here,
but keep accepting the 'verbose' argument and print a deprecation
warning if a value is ever passed for it. That way, scripts will keep
running, though possibly with less output on stdout.
This changes the meaning of the load_config() return value as well,
though I suspect it was only ever used by the menuconfig/guiconfig
interfaces.
The new behavior applies for kconfiglib.VERSION >= (12, 0, 0).
|
|
|
|
This makes running pydoc(3) on the utilities helpful.
Reuse the module docstring for the --help text for utilities that use
argparse.
Also fix some copy-paste errors in the all*config.py descriptions and
clean up the language a bit.
Piggyback removal of an optimization in allmodconfig.py that's pretty
irrelevant now.
|
|
|
|
Also remove some no longer used imports.
|
|
|
|
Mirrors 'make listnewconfig' in the C tools.
|