summaryrefslogtreecommitdiff
path: root/listnewconfig.py
AgeCommit message (Collapse)Author
2019-12-14listnewconfig: Add option for showing help textsUlf Magnusson
Show the help text for each new symbol if --show-help/-l is passed (-h might be confused for --help). Copycat of commit 5d8b42aa7ccb ("kconfig: Add option to get the full help text with listnewconfig") to the C tools, but with a slightly more compact output format (indented help text instead of separators).
2019-10-10Convert standard_kconfig() to argparse for better feedbackUlf Magnusson
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.
2019-06-03Have load_config() and write_(min_)config() return messagesUlf Magnusson
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).
2019-03-22Whitespace consistency nitUlf Magnusson
2019-03-22Convert some comments to module docstrings in utilitiesUlf Magnusson
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.
2019-03-06listnewconfig: Remove redundant backslashUlf Magnusson
2019-03-06Use a consistent style in small utilitiesUlf Magnusson
Also remove some no longer used imports.
2019-01-15Update copyright years for 2019Ulf Magnusson
2018-12-08listnewconfig: Add scriptUlf Magnusson
Mirrors 'make listnewconfig' in the C tools.