summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-05-29Split out helper for writing symbols in write_config()Ulf Magnusson
Gives a better overview.
2019-05-29Use os.replace() if available in _save_old()Ulf Magnusson
Gives *nix rename() semantics on Windows, with overwriting of the target file. Also limit the scope of the catch-all try-except.
2019-05-29Convert docstrings to comments in testsuite.pyUlf Magnusson
Like was done a long time ago in kconfiglib.py. These functions are not part of a standalone API. Keep the docstrings for the compatibility tests, because those get printed as the tests run.
2019-05-28Make 11.7.0 releasev11.7.0Ulf Magnusson
Adds commit 3aea9f7 ("Add '# end of <menu>' after menus in .config"), which mirrors a change in the C tools. The compatibility tests now pass again for the latest kernel.
2019-05-28Explain why node_iter() is not a good fit for write_config()Ulf Magnusson
2019-05-28Add '# end of <menu>' after menus in .configUlf Magnusson
Mirrors commit aff11cd983ec ("kconfig: Terminate menu blocks with a comment in the generated config") in the kernel. This makes the compatibility tests pass again, and is handy.
2019-05-28Touch up write_autoconf() a bitUlf Magnusson
Flatten, and unscrunch the bool/tristate case.
2019-05-28Comment location nitUlf Magnusson
Consistent with the other ones.
2019-05-27KconfigError-related documentation nitsUlf Magnusson
Not just for syntax errors when raised from Kconfig.__init__().
2019-05-27Shorten MenuNode.__str__() a bitUlf Magnusson
2019-05-27Fix "the the" docstring typoUlf Magnusson
2019-05-25Make 11.6.0 releasev11.6.0Ulf Magnusson
Brings the format returned by Symbol/Choice/MenuNode.__str__()/custom_str() closer to how things would usually be written by hand, and removes spammy propagated dependencies from property conditions. Propagated dependencies are still included in the 'depends on ...' line, so no information is lost. Properties without parent deps. propagated to their conditions are now also available as MenuNode.orig_{prompt,defaults,selects,implies,ranges}. - Commit bb33eed ("Strip direct deps. from property conditions in Symbol/Choice/MenuNode.__str__()") - Commit e1da7aa ("Display n/m/y without quotes") - Commit 9f57bf9 ("Use the '<type> "prompt"' shorthand in __str__()") Also clarifies what KconfigSyntaxError is doing: - Commit 95515d4 ("Clarify that KconfigSyntaxError = KconfigError in the docs").
2019-05-25Use the '<type> "prompt"' shorthand in __str__()Ulf Magnusson
Pro: Looks cleaner and matches how definitions are usually written. Con: Makes it harder to discover that 'bool "foo"' is just shorthand for 'bool' + 'prompt "foo"' (though it's documented). The pros probably win.
2019-05-25Display n/m/y without quotesUlf Magnusson
These are constant symbols, which is why the quotes showed up. Special-case them to remove the quotes, to match what people expect. Internally, n/m/y without quotes is taken as a shorthand for "n"/"m"/"y".
2019-05-25Strip direct deps. from property conditions in Symbol/Choice/MenuNode.__str__()Ulf Magnusson
Commit e81a77b ("Consistently put direct deps. last when propagating") makes the position of the direct deps. in property conditions predictable after dependency propagation, making it easy to strip them as needed. Use this to implement MenuNode.orig_{prompt,defaults,selects,implies,ranges}, which work like the non-orig_* versions but omit the direct deps. Use those in turn to omit the direct deps in Symbol/Choice.__str__(). The direct deps. (with propagated parent deps.) can still be seen after 'depends on ...', so there is no loss of information. This unclutters Kconfig definitions shown in menuconfig/guiconfig and in any generated documentation. The old output also had duplicated dependencies, though it doesn't matter for evaluation. Before: config A bool prompt "A" if DEP default y if FOO && DEP depends on DEP After: config A bool prompt "A" default y if FOO depends on DEP
2019-05-24Consistently put direct deps. last when propagatingUlf Magnusson
Preparation for some later additions. Previously, the 'visible if' deps appeared to the right of the 'depends on' deps. Now, the direct deps always appear last. With this change, the prompt tuple is only updated once for any given menu node too, which should be a tiny bit faster.
2019-05-24Touch up style a bit in test suiteUlf Magnusson
Ye olde code.
2019-05-23Clarify that KconfigSyntaxError = KconfigError in the docsUlf Magnusson
KconfigSyntaxError is just an older (bad) name. pydoc generates confusing documentation due to the "KconfigSyntaxError = KconfigError" assignment, so mention it in the docstring.
2019-05-22Make 11.5.0 releasev11.5.0Ulf Magnusson
Fixes a minor menuconfig interface bug in commit f962269 ("menuconfig: Fix inconsistent top/bottom scroll offset due to off-by-one"). Some doc tweaks are included as well: - Commit 841ab04 ("Mention that .config can be brought up-to-date via menuconfig/guiconfig") - Commit f8978b0 ("Say "removes" instead of "resets" in the unset_value(s)() docstring")
2019-05-22Mention that .config can be brought up-to-date via menuconfig/guiconfigUlf Magnusson
Good to know.
2019-05-22Say "removes" instead of "resets" in the unset_value(s)() docstringUlf Magnusson
Clearer.
2019-05-22menuconfig: Fix inconsistent top/bottom scroll offset due to off-by-oneUlf Magnusson
The scroll offset when scrolling up was one more than when scrolling down, due to an off-by-one.
2019-05-21Simplify iscriptconfig target in Makefile patchUlf Magnusson
Interpolate $(Kconfig) directly into the Python code and get rid of the separate argument. This also gets rid of the old ipython workaround, and might prevent similar gotchas in general.
2019-05-19Make 11.4.0 releasev11.4.0Ulf Magnusson
- Commit aed7b40 ("Add guiconfig to PHONY in Makefile patch") - Commit 50ded1d ("Make .config.old easier to discover")
2019-05-19Remove some comments re. setup.py entry pointsUlf Magnusson
Only appeared in two of the scripts, and main() is such a common convention anyway.
2019-05-19Make .config.old easier to discoverUlf Magnusson
Mention that the old version of an overwritten configuration file is saved to <filename>.old in a few different places, to make it easier to discover.
2019-05-19Add guiconfig to PHONY in Makefile patchUlf Magnusson
Oversight.
2019-05-19String repetition consistency nitUlf Magnusson
2019-05-19Comment nitUlf Magnusson
2019-05-14Add installation instructions for tkinterUlf Magnusson
Not installed by default on many Linux systems, despite being part of the Python standard library.
2019-05-11Make 11.3.0 releasev11.3.0Ulf Magnusson
Improves dependency-related documentation a bit, in commit 95b80e1 ("Clarify direct_dep and dep documentation").
2019-05-11Clarify direct_dep and dep documentationUlf Magnusson
- Mention that having no direct dependencies corresponds to having y direct dependencies - Remove the note about how direct_dep is used internally. It's also used for the select-with-unsatisfied-deps warning. - Remove the note about how checking direct_dep might be "redundant" since it's propagated. direct_dep can be useful in scripts still, and maybe it could scare people away from it. - Say 'surrounding menus and ifs' instead of of 'parent' in the 'dep' docstring - Fix two s/config/kconfig/ typos
2019-05-11Make 11.2.0 releasev11.2.0Ulf Magnusson
Improves documentation for the Symbol/Choice.referenced attribute, in commit 814e2de ("Improve the 'referenced' docstring").
2019-05-10Improve the 'referenced' docstringUlf Magnusson
- Point out why dependencies from surrounding if's and menus are included - Clarify that .referenced isn't transitive. Only "direct" references are included. - Give a hint about direct dependencies and expr_items() Prompted by https://github.com/ulfalizer/Kconfiglib/issues/69.
2019-05-10Link ESP-IDF scriptsUlf Magnusson
2019-05-10Do not set top_node location to location of 'mainmenu' statementUlf Magnusson
It's undocumented and unguessable that Kconfig.top_node.filename/linenr gets set to the location of the 'mainmenu' statement (if any). Always set it to the first line of the top-level Kconfig instead, which should be more expected.
2019-05-07guiconfig: Remove unused UNKNOWN importUlf Magnusson
2019-05-06guiconfig: Comment nitsUlf Magnusson
Move the global variable descriptions earlier, remove some redundant comments, and clarify that the Python 3-only comment in setup.py is talking about the terminal menuconfig.
2019-05-06guiconfig: Micro-optimize tree item creation some moreUlf Magnusson
Mostly to get things consistent with _update_jump_to_display().
2019-05-03Make 11.1.0 releasev11.1.0Ulf Magnusson
Adds a Python 2/3-compatible GUI menuconfig, in commit 9be6b7b ("guiconfig: Add a Tkinter-based menuconfig"). See that commit and the updated README for a longer description.
2019-05-03Mention where _USE_EMBEDDED_IMAGES isUlf Magnusson
2019-05-03Fix guiconfig.py linkUlf Magnusson
2019-05-03Fix guiconfig screenshot linkUlf Magnusson
2019-05-03guiconfig: Add a Tkinter-based menuconfigUlf Magnusson
This is a graphical configuration interface written in Tkinter. Like menuconfig.py, it supports showing all symbols (with invisible symbols in red) and jumping directly to symbols. Symbol values can also be changed directly from the jump-to dialog. When single-menu mode is enabled, a single menu is shown at a time, like in the terminal menuconfig. Only this mode distinguishes between symbols defined with 'config' and symbols defined with 'menuconfig'. Compatible with both Python 2 and Python 3. Has been tested on X11, Windows, and macOS. To avoid having to carry around a bunch of GIFs, the image data is embedded in guiconfig.py. To use separate GIF files instead, change _USE_EMBEDDED_IMAGES to False. The image files can be found in https://github.com/ulfalizer/Kconfiglib/tree/screenshots/guiconfig. A new `make guiconfig` target in the Makefile patch will run the GUI configuration interface on the Linux kernel.
2019-04-30Make 11.0.0 releasev11.0.0Ulf Magnusson
Simplifies the filename calculation for .old files, in commit 4fed39d ("Never prepend '.' to $KCONFIG_CONFIG.old"). This makes it reliable to refer to the backup file as $KCONFIG_CONFIG.old in scripts. This is a backwards-incompatible change when $KCONFIG_CONFIG is set to a filename that does not start with a '.', so the major version is increased. Note that $KCONFIG_CONFIG is usually set to <some path>/.config, so few people should be affected.
2019-04-30Never prepend '.' to $KCONFIG_CONFIG.oldUlf Magnusson
In retrospect, trying to be "helpful" by saving the old version of a $KCONFIG_CONFIG that does not start with a '.' as e.g. '.config.old' instead of 'config.old' is a bad idea, because it means that scripts can't rely on the backup file simply being called $KCONFIG_CONFIG.old. I spotted this causing compatibility issues in https://github.com/automate-lfs/jhalfs/commit/a645174fd43ba4eee84089965df85785878e7aa6. I had Vim backup files and the like in mind originally, but .config.old is much more likely to be processed by scripts. This is a small backwards compatibility break, so the major version will be increased to 11.
2019-04-28Make 10.51.0 releasev10.51.0Ulf Magnusson
Makes sync_deps() safe to use in threaded scripts, in commit a664a6d ("Avoid chdir()ing in sync_deps()").
2019-04-28Avoid chdir()ing in sync_deps()Ulf Magnusson
Temporarily changing the working directory is iffy if threads are involved, since other code will see the change. Seems like a generally rude thing for a random library function to do. dir_fd (open() relative to directory) is another option, but it's Python 3 only, only available on the low-level os.open() interface, and might not be universally supported.
2019-04-28Make 10.50.1 releasev10.50.1Ulf Magnusson
Fixes an obscure menuconfig display issue, in commit 4b387e0 ("menuconfig: Fix display issue for unsatisfied-deps selected symbol with children").
2019-04-28Remove redundant comment in _auto_menu_dep()Ulf Magnusson
Says the same thing the comment above it says.