| Age | Commit message (Collapse) | Author |
|
Adds commit 2a6ac31 ("Return a message from Kconfig.write_autoconf()").
|
|
Like for Kconfig.write_config() and Kconfig.write_min_config(), return a
string from Kconfig.write_autoconf() with a message saying that the
header got saved, or that there were no changes to it. Can be handy in
tools.
Also make the "no change" message for the various files more specific,
by mentioning what type of file it is (configuration, header, etc.)
Return True/False from Kconfig._write_if_changed() to indicate if the
file was updated. This also allows it to be reused in
Kconfig.write_min_config().
|
|
Adds commit 9e0a8d2 ("Use 'python3' instead of 'python' in hashbangs").
This has some breakage potential on older systems (though not when
installing via 'pip'), so the major version is increased to 14.
|
|
Adds commit 68bcecd ("menuconfig: Work around crash on resize on some
macOS systems").
|
|
It's not the 'next' attribute of the node that's added that's set, but
the 'next' attribute of the node before it.
|
|
Shortens things a bit.
|
|
Adds commit 87fab02 ("Add "error: " to the error message for a missing
endchoice/endif/endmenu").
|
|
A node already gets its .next pointer set in _parse_block() if it is
either
1. followed by another node, or
2. the last node in a menu, choice, or if.
This also works for nodes from 'source'd files, so there's no need to
special-case the ends of them. Remove the 'node.next = None' assignment
for ends of files.
Instead, special-case just the last node in all files, and set its .next
to None in Kconfig._init().
Unlikely to give a noticeable performance improvement. Just tightens up
the chaining logic a bit.
|
|
Makes it consistent with other parse errors and easier to find in logs,
etc.
|
|
|
|
Adds commit 456f821 ("menuconfig: Improve look and readability of the
aquatic theme").
|
|
'node' isn't needed. Shaves some lookups.
|
|
Adds commit 24a0204 ("Include sys.argv[0] in error messages when
suppress_traceback=True").
|
|
Handy to have the script name appear in logs.
|
|
Oversight.
|
|
Shorter, clear in context.
|
|
Shorter, clear in context.
|
|
Error reporting improvements:
- Commit 1ec9170 ("Add Kconfig.__init__() helper flag for suppressing
tracebacks")
- Commit 2122d5d ("Include "error: " in parsing error messages")
listnewconfig improvement:
- Commit 7e6b9cf ("listnewconfig: Add option for showing help texts")
Also includes a load_allconfig() API improvement:
- Commit c2414bd ("Add a member function version of load_allconfig()")
|
|
Tweak messages and variable names to match.
|
|
Oversight. Makes them easier to find in logs.
|
|
Tools that don't use standard_kconfig() currently generate spammy
tracebacks for e.g. syntax errors.
Add a suppress_traceback flag to Kconfig.__init__() for catching
"expected" exceptions and printing them to stderr and exiting with
status 1. Use it to make all tools consistently hide tracebacks.
|
|
There was no great reason for this function to be a global function to
begin with. Having it as a member function simplifies callers.
load_allconfig() is a bit special in that it fails with sys.exit(),
which is helpful for tools, but that probably doesn't influence where it
belongs.
Keep the global function for backwards compatibility. A deprecation
warning might be added at some point.
|
|
Adds two small menuconfig robustness improvements:
- Commit 7020b86 ("menuconfig: Ignore MENUCONFIG_STYLE on non-color
terminals")
- Commit 4ea8b2b ("menuconfig: Ignore errors from
use_default_colors()")
|
|
Adds a menuconfig fix for ANSI-only color terminals and a robustness
tweak for the aquatic theme:
- Commit 7a98bc7 ("menuconfig: Check that bright named colors are
< curses.COLORS")
- Commit 1ad02f5 ("menuconfig: Avoid the non-ANSI 'brightwhite' color
in the aquatic theme")
|
|
Adds two new features:
- Commit bb3be6e ("Support giving the header path in
KCONFIG_AUTOHEADER")
- Commit de45874 ("Make header strings customizable via the
environment")
|
|
This environment variable is used by the C tools. Use it when
filename=None is passed to write_autoconf(), and default to
include/generated/autoconf.h for compatibility.
Also update genconfig.py to use KCONFIG_AUTOHEADER if set when no
--header-path is passed. If KCONFIG_AUTOHEADER isn't set, keep
defaulting to 'config.h' for backwards compatibility. It's probably a
saner default for tools as well.
|
|
If no header string is specified in write_(min_)config() or
write_autoconf(), use the values of the environment variables
KCONFIG_CONFIG_HEADER and KCONFIG_AUTOHEADER_HEADER, respectively, if
set. KCONFIG_AUTOHEADER_HEADER is consistent with KCONFIG_AUTOHEADER
(the header path), which will be added soon.
Using environment variables avoids having to add separate flags to each
tool that writes configuration files or headers.
Like for $prefix and $CONFIG_, store the values of the environment
variables when the Kconfig instance is created, and expose them via
Kconfig.config_header and Kconfig.header_header. This if flexible and
avoids gotchas when working with multiple Kconfig instances.
Also remove the old default header and make the default no header. Less
advertising, but it felt a bit silly to add workarounds to keep it.
Came up in https://github.com/ulfalizer/Kconfiglib/pull/80.
|
|
Adds a helper that's handy for messages involving symbols/choices, and a
small documentation fix.
- Commit e1ccf19 ("Add public helpers for generating "<name> (defined
at ...)" strings").
- Commit 2d1cb7e ("Add missing Choice.str_value documentation")
|
|
Have Symbol/Choice.name_and_loc return strings like
"MY_SYM (defined at foo:1, bar:2)"
"<choice> (defined at foo:4)"
I've added a function like that in at least four different scripts now,
so that's probably a sign that it's a worthwhile helper.
Clean up the tests/Klocation tests a bit while adding tests.
|
|
Oversight. It's just a string version of Choice.tri_value, like for
Symbol.tri_value vs. Symbol.str_value.
Also rearrange the property documentation to put user_value next to
tri_value and str_value in the Symbol and Choice docstrings.
|
|
Adds a small fix for some just-rewritten documentation, in commit
4de95f4 ("Mention that standard_kconfig() returns the Kconfig
instance").
|
|
Accidentally left out when the docstring was rewritten.
|
|
- Commit e016deb ("Convert standard_kconfig() to argparse for better
feedback") improves feedback from the tools and makes their help
texts easier to find
- Commit 0f56dd9 ("guiconfig: Check for visible nodes before turning
off show-all in full-tree mode") fixes an obscure bug in show-all
mode in guiconfig
|
|
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.
|
|
Adds commit 21b4c1e ("Do not automatically install windows-curses on
Windows"), which fixes installation on MSYS2. See that commit for an
explanation, and this issue: https://github.com/ulfalizer/Kconfiglib/issues/77
Also adds commit 72e3d20 ("menuconfig: Give hint when 'curses' can't be
imported on Windows"), to make it easy for users to know what to do if
stuff breaks.
Sorry if this change caused problems!
|
|
Get rid of the 'else'.
|
|
Fixes a preprocessor issue, in commit 720ce88 ("Fix handling of
parentheses in macro argument values").
|
|
As an oversight, there was no check for nested parentheses in macro
arguments, making the preprocessor think the call ended after 'void)' in
def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null)
This broke the latest linux-next kernels, starting with commit
eb111869301e1 ("compiler-types.h: add asm_inline definition").
I remember seeing this when going through the C code, but somehow forgot
to put it in. Fix it, and clean up _expand_macro() a bit at the same
time.
Fixes: #76
|
|
Adds commit 26e1db6 ("Allow preprocessor user functions to access the
parsing location").
|
|
Just requires making Kconfig.filename/linenr public.
'lineno' would be a more standard name, but be consistent with
MenuNode.linenr.
|
|
Mostly to get some cleanups into a release, but adds a tiny improvement
in commit a4b5775 ("menuconfig/guiconfig: Print 'default:' with no 's'
if there's just one").
|
|
This triggers a different set-to-set code path and makes some of them a
bit smaller, e.g. 480 instead of 736 bytes for _RELATIONS.
Probably no measurable performance difference, but might as well.
|
|
- Move some assignments closer to related assignments
- Remove some blank lines between related assignments
- Remove double blank lines between sections. It's probably more
messy-looking than helpful.
|
|
Put $ after word characters, like in _command_match and
_id_keyword_match.
|
|
Not performance sensitive. Gets rid of a variable.
|
|
|
|
Makes it consistent with the other warn_assign_* variables.
Also move the initialization in Kconfig.__init__() next to the other
warn_assign_* variables.
|
|
Adds commit 29758ae ("setconfig: Use 'orig_type' instead of 'type' in
error message").
|
|
It's confusing to have tristate symbols show up as bool in the bad-value
error message when modules are disabled. set_value() validates the value
against 'orig_type' rather than 'type' as well.
Piggyback some quote consistency and make a comment in set_value() more
informative.
|
|
Adds commit e5e2fe5 ("Catch EnvironmentError instead of
OSError/IOError"), which fixes menuconfig.py crashes on I/O errors on
Python 2.
This might also improve error robustness elsewhere on Python 2 in
obscure cases.
|