| Age | Commit message (Collapse) | Author |
|
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.
|
|
Mirrors 'make listnewconfig' in the C tools.
|
|
Adds two improvements related to configuration files:
- Commit 166be7d ("Save existing configuration to .<filename>.old in
write_config()")
- Commit 7b4f72f ("Make {load,write}_config(filename=None) implement
the standard behavior")
|
|
Make the previously obligatory 'filename' argument to load_config() and
write_config() default to None, and have that implement the behavior
you'd usually want: read/write either KCONFIG_CONFIG or ".config" if
unset, and read the 'option defconfig_list' configuration file if
KCONFIG_CONFIG/".config" doesn't exist.
For load_config(), filename=None also allows the configuration file to
be missing without raising an error. load_config() returns True if a
local configuration file was loaded, which is useful to check in the
menuconfig (if no local configuration file exists, we always want to
prompt for saving the configuration when exiting).
Also add a 'verbose' argument (default True) to load_config() and
read_config() that makes them print which files were read/written in
filename=None mode.
Also generalize olddefconfig.py and oldconfig.py to not require there to
already be a local configuration file. This was a bit silly for
olddefconfig.py in particular.
Remove the examples/defconfig.py script. It's a duplicate of
olddefconfig.py.
|
|
Add a default-True 'save_old' flag to write_config(). If 'save_old' is
True and an existing configuration file is being overwritten, a copy of
the old configuration file is saved to .<filename>.old (e.g.
.config.old) in the same directory.
Errors are ignored, as the old configuration would usually just be a
nice-to-have, and not essential.
The same functionality could be added for minimal configuration files
and headers, but it's probably most useful for configuration files.
|
|
|
|
Consistent with elsewhere.
|
|
These type sanity checks have never hit once during development over the
years, and were inconsistently applied too. Remove them to simplify the
code.
Keep the InternalError exception for backwards compatibility, in case
something catches it.
|
|
Adds a small incremental building improvement: commit a4751b5 ("Flag
removed symbols as changed in sync_deps()")
|
|
If a symbol is removed from a Kconfig file, it makes sense to flag it as
changed, so that things that still (probably accidentally) depend on it
get rebuilt.
Saw a patch for the C tools with the same effect floating around, so
might as well add it already. The C tools had other brokeness as well
though...
|
|
Adds commit 567cccf ("Tighten up help text parsing"), which improves
parsing performance slightly.
|
|
Get rid of _indentation() and inline it into _parse_help(), adding some
simplifications and optimizations along the way.
Saves a few % of parsing of time. Help text parsing is surprisingly hot.
|
|
Adds commit b3f0061 ("menuconfig: Only list duplicated choice symbols
once"), which improves the behavior of the menuconfig interface for an
obscure situation involving named choices included multiple times.
|
|
One thing that irks me a bit about it is that it might give the idea
that menuconfigs have to include it, making things seem more complex
than they really are.
|