| Age | Commit message (Collapse) | Author |
|
|
|
Be consistent with the other utilities.
|
|
Make kconfiglib.py consistent with the utilities.
|
|
Have BOOL/TRISTATE/... match _T_BOOL/_T_TRISTATE/... so that _set_type()
doesn't have to do any conversion in the common case. Conversion is
still needed for _T_DEF_BOOL/_T_DEF_TRISTATE/..., but those are rare.
Also make use of UNKNOWN being falsy.
Piggyback some rearranging of global constants so that related stuff
appears closer together, for readability.
|
|
|
|
Adds a silly small optimization in commit 8ddefea ("Import 'platform'
and 'subprocess' as needed").
|
|
Saves around 10 ms of startup time when they aren't, as measured with
'-X importtime'.
|
|
Does more than just parsing.
|
|
|
|
|
|
Make the exception argument to _KconfigIOError() harder to miss.
|
|
- Commit 132e579 ("Give more helpful error messages when files are
missing") makes the hint in error messages for missing files more
helpful.
- Commit faa4476 ("setconfig: Fix help text format") fixes the format
of 'setconfig --help'.
- Commit 553cca8 ("Use a consistent style in small utilities") and
commit 66557ed ("Use a consistent style in examples") cleans the
utilities and examples up a bit and removes some unused imports.
|
|
Need to use RawDescriptionHelpFormatter to preserve newlines in the
description.
Also fix a typo in the help text (s/assignments/assignment/)
|
|
The current error message talks a lot about $srctree, but $srctree is
seldom the culprit in practice. More common is
'source "$(SOME_ENV_VAR)/foo"`, where SOME_ENV_VAR hasn't been set.
Include the complete 'source ...' line for missing Kconfig files, and
mention unset environment variables as a hint. Only mention $srctree
briefly.
Also shorten the message when a .config can't be a found a bit. This
message would usually only be seen when working directly with the
library.
|
|
Also remove some unused imports.
|
|
Also remove some no longer used imports.
|
|
Used in a single place.
|
|
|
|
Adds a small documentation improvement in commit 99a7af7 ("Document that
kconfig_filenames keeps absolute paths as-is").
|
|
|
|
Use a set comprehension.
|
|
|
|
Came up in https://github.com/ulfalizer/Kconfiglib/issues/67.
|
|
Adds a utility for setting configuration values from the command line,
in commit 22d3cc3 ("setconfig: Add script").
|
|
This is a simple script for updating configuration values from the
command line, with (optional) checking that the assigned value matches
the actual symbol value afterwards (which it might not if there are
unsatisfied dependencies).
Sample usage:
$ setconfig FOO_SUPPORT=y BAR_BITS=8
This is useful for patching the configuration in automated build
systems, in a way that's safer than directly patching configuration
files.
|
|
|
|
Forgot when pushing out the release.
|
|
Adds commit c9c7f59 ("Package LICENSE.txt in source distributions and
wheels"), by request. Maybe some distros require this.
|
|
Some distros might require this. Fixes
https://github.com/ulfalizer/Kconfiglib/issues/65.
|
|
|
|
- Commit 3a3559f ("menuconfig: Prompt for save if a different .config
would be saved") improves the behavior of menuconfig.py when Kconfig
files are modified between sessions, fixing issue #63.
Modifying Kconfig files in a way that would affect the written
.config now always makes the menuconfig prompts for saving the
configuration on exit.
A new Kconfig.missing_syms attribute is added as well, which was
needed to implement the improved behavior with public APIs.
- Commit b64c961 ("Warn for '# CONFIG_FOO is not set' when FOO is
referenced but undefined") fixes a small oversight re. the
assignment-to-undefined-symbol warning.
|
|
Due to an oversight, '# CONFIG_FOO is not set' with FOO undefined only
triggered a warning about assigning an undefined symbol if FOO was never
referenced inside the Kconfig files.
|
|
Previously, menuconfig.py only prompted for saving the configuration if
.config didn't exist or the user changed symbol values within the
interface.
Also make it prompt for save if Kconfig symbols have been added,
removed, or have had their defaults changed, provided it would make the
saved .config differ from the loaded one.
This usually won't matter for correctness, because loading an outdated
configuration performs an implicit olddefconfig, but it's less
confusing.
Also add a Kconfig.missing_syms attribute that records all assignments
to undefined symbols in the most recently loaded .config file. This is
needed to implement the check for whether the saved .config would be
different.
As an unrelated change, always prompt for saving if a .config has been
loaded from within the menuconfig interface. The intention is probably
often to save the configuration somewhere else, even if it isn't
modified.
|
|
Adds commit dcb6f12 ("menuconfig: Add show-help mode"), which adds a new
mode to the menuconfig that replaces the key listing at the bottom with
the help text of the selected item.
|
|
Pressing F toggles show-help mode, where the help window at the bottom
displays the help text of the currently selected item, if any. Can be
handy when browsing through symbols.
Also mention the different modes that are available in the module
docstring.
|
|
Also add quotes around the filename.
|
|
Adds an error reporting improvement and an example code fix:
- Commit 0266924 ("Improve error for missing endchoice/endif/endmenu")
- Commit a88302b ("Fix user-defined preprocessor function example
code")
Some minor performance improvements are included as well.
|
|
The functions must be defined before they can be put into 'functions'.
|
|
Say what was expected in the error message.
|
|
Gets rid of some lookups.
A bigger hotspot is all the _next_line() calls though. Wonder if there's
some nice restructuring to avoid them. Getting rid of the _reuse_tokens
flag would be nice too.
|
|
self._line is only used for error reporting, and the empty string
returned at EOF would never be shown. Move the assignment to after
readline() and use a local variable to hold the line instead, to get rid
of some property lookups.
|
|
More common. isspace() returns False for empty strings.
|
|
Adds commit be3c682 ("Clarify that load_config()'s filename argument
defaults to None"), which fixes a small documentation bug.
|
|
Had missed the '(default: None)', and it doesn't hurt to point it out in
the description either.
Point out that filename=None is the default in the write_config()
'filename' description too, though it already had the '(default: None)'.
|
|
Adds commit e8f9751 ("genconfig: Do not generate *.old files for
--config-out"), which gets rid some probably redundant .config.old
files.
|
|
Configuration files generated by --config-out would usually be an
internal detail of the build system, so it's probably not helpful to
generate *.old files for them. Pass save_old=False to write_config() to
skip it.
|
|
|
|
|
|
- Commit 3cc2f9f ("listnewconfig: Add script") adds
'make listnewconfig' functionality. The new script is bundled in the
pip install.
- Commit 78073d6 ("Preserve symlinks when writing .config.old files")
avoids stomping on symlinks when writing configuration files.
|
|
if .config is a symlink, then the intention is probably to overwrite the
target, but rename()ing the symlink to .config.old interferes with that.
Use the shutil.copyfile() fallback instead if .config is a symlink.
|