| Age | Commit message (Collapse) | Author |
|
Adds commit 8a3999b ("Fix $srctree logic for the top-level Kconfig
file"), which fixes an old braino: The top-level Kconfig file passed to
Kconfig.__init__() wasn't looked up relative to $srctree, breaking
out-of-tree operation for scripts unless ugly manual $srctree hacks were
added.
All Kconfig files are now consistently looked up relative to $srctree.
This is a backwards-incompatible change (though with a simple fix), so
the major version is bumped. A note is printed on errors that might be
due to the changed behavior.
|
|
This just reverts commit 8a3999f ("Fix $srctree logic for the top-level
Kconfig file"), so that it can go in a major release instead.
I realized it has enough breakage potential for existing scripts to
warrant a major version bump.
|
|
- Commit 8a3999b ("Fix $srctree logic for the top-level Kconfig file")
fixes a major braino where the top-level Kconfig file passed to
Kconfig.__init__() wasn't looked up relative to $srctree, breaking
out-of-tree operation for e.g. menuconfig.
All Kconfig files are now consistently looked up relative to
$srctree.
- Misc. internal code cleanup
|
|
Kconfiglib changes:
- Commit 1f864b1 ("Support custom printing of symbols/choices in
expressions") adds support for printing symbols and choices with a
custom format in expressions.
This makes it simpler to implement things like like turning all
symbols/choices into links when generating documentation, and
printing symbol values after symbols.
- Commit 6aea8d0 ("Don't pass encoding= to Popen()") fixes an
accidental Python 3.6+ requirement when using the $(shell)
preprocessor function with Python 3.
menuconfig changes:
- Commit 8efc358 ("menuconfig: Omit tristate value hint for
int/string/hex defaults") removes the boolean value hints to the
right of defaults in the symbol information for string/int/hex
symbols. Stuff like '- 74 (value: "n")' isn't helpful, and looks
confusing.
- Commit 3511f24 ("menuconfig: Make symbol information less spammy")
makes the symbol information more compact in general, e.g. by
skipping value hints where they aren't helpful ('FOO(=y)' instead of
'FOO(=y) (=y)'), and by shortening stuff like '(value: "y")' to just
'(=y)'.
|
|
- b650ccd ("Use universal newlines mode in $(shell) implementation")
improves the behavior of $(shell) on Windows. A trailing \r\n-style
newline sequence is now stripped in full, instead of leaving \r in
there.
- 6899f91 ("Restore compatibility with old kernels") restores some
compatibility with old kernels originally dropped by c19fc11 ("Drop
some compatibility and tighten up lexing").
It turns out that people are still running Kconfiglib on kernels from
at least 2013 (see https://github.com/ulfalizer/Kconfiglib/pull/48).
|
|
Just adds commit 5452ad3 ("Fix detection of hex literals"). Braino.
Include some int and hex literals in the Kstrict testcase too.
|
|
Adds support for automatically warning for references to undefined
Kconfig symbols. See commit ca89d02 ("Add KCONFIG_STRICT flag for
flagging refs. to undefined syms").
(There was an outdated docstring in that comment. KCONFIG_STRICT needs
to be set to "y".)
|
|
Also fix up Kconfig.__init__() docstring to say that KCONFIG_STRICT
needs to be "y".
|
|
Settings KCONFIG_STRICT to y in the environment turns on warnings for
all references to undefined symbols within Kconfig files (with the only
gotcha that hex literals must be prefixed by 0x or 0X, to make it
possible to distinguish them from undefined references).
Always flagging undefined references gets awkward, as some projects
(e.g. the Linux kernel) use multiple Kconfig trees with shared files,
leading to some safe undefined references. It's helpful for other
projects though.
Having KCONFIG_STRICT as an environment variable is handy when multiple
tools are involved.
Piggyback a small README change re. warnings. Kconfiglib now has many
more warnings than the C tools.
|
|
Adds e08b695 ("Add def_int, def_hex, and def_string keywords"), getting
rid of some Kconfig inconsistency.
|
|
Analogous to def_bool and def_tristate, setting the type and adding a
default at the same time.
This is a Kconfiglib extension. These keywords can be useful in projects
that make use of symbols defined in multiple locations, and remove some
Kconfig inconsistency.
|
|
|
|
This release revamps the globbing design to make 'source' globbing,
requiring at least at least one matching file. A new o(r)source
statement can be used when it's okay for a pattern to not match any
files.
Relevant commit, with motivations: 7a428aa ("Switch to more sensible
globbing statements (w/ backwards compatibility)").
Backwards compatibility is maintained by having g(r)source be an alias
for o(r)source.
A small API change was introduced too: Kconfig.srctree is now set to the
empty string instead of None when $srctree is unset. This gives nice
behavior for e.g. os.path.join().
|
|
Instead of having 'source' and 'gsource', have 'source' always glob, but
require the pattern to match at least one file, throwing KconfigError
otherwise.
Have separate 'osource' and 'orsource' statements (the o is for
"optional") for cases where it's okay for the pattern to not match any
files.
This is analogous to 'include' and '-include' in Make.
The biggest flaw with 'gsource' was that there was no way to do a
globbing match while requiring something to match, possibly leading to
subtle failures.
Preserve backwards compatibility by having "gsource" and "grsource" be
aliases for "osource" and "orsource", respectively.
Also include some related changes:
- Kconfig.srctree is now set to the empty string if $srctree is unset,
rather than to None. This gives nice behavior with os.path.join() and
os.path.relpath(), which treat the empty string as the current
directory (without adding './', for os.path.join()).
- When $srctree is set, Kconfig files in the current directory will no
longer override Kconfig files in $srctree when the relative paths
match. This was likely a bug all along in the C tools, and probably
only makes sense for .config files.
I've seen it cause breakage in Zephyr.
- Clarify the behavior of $srctree in the Kconfig.__init__() docstring.
- Make MenuNode.filename be relative to $srctree for the Kconfig file
passed to Kconfig.__init__(). This makes it consistent.
The major version will be bumped later due to the small Kconfig.srctree
API change.
|
|
This release adds commit ac692af ("Fix absolute $srctree prefixes
showing up on gsource'd files"), which fixes a bug that could cause
$srctree to be included in some paths for e.g. generated documentation.
|
|
This release improves performance for projects that make heavy use of
multiple definition locations for symbols, via commit 747e455
("Massively speed up U-Boot parsing").
Two new warnings are included as well:
- 652d991 ("Warn if int/hex/string symbols are evaluated logically")
- 21b5351 ("Warn if int/hex 'default' is outside active 'range'")
|
|
More environment variables are referenced now.
|
|
New features:
- 2433deb ("Add Kconfig preprocessor") implements a new Kconfig
preprocessor, documented in
https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kconfig-macro-language.txt.
It is required to parse the linux-next Kconfigs now, and will appear
in Linux 4.18.
'option env=...' symbols and the $FOO syntax for expanding
environment variables will be supported for backwards compatibility
for a while. Consider switching to $(FOO) though, which is the new
syntax (and removing 'option env=...' symbols).
Changed behavior:
- c19fc11 ("Drop some compatibility and tighten up lexing") makes
Kconfiglib flag invalid characters in Kconfig files as a syntax
error in all context. They were previously ignored in some places
for compatibility with old sloppy versions of the C tools.
The C tools fixed it with commit c2264564 ("kconfig: warn of
unhandled characters in Kconfig commands") in July 2015. Older
kernels might require fixing up the Kconfig files a bit now.
New warnings:
- 4200e25 ("Generalize select-with-unsatisfied-deps warning") makes
the select-with-unsatisfied-dependencies warning trigger when a
symbol with m-valued direct dependencies is y-selected.
|
|
Has been removed (and is now always on).
|
|
Implement the Kconfig preprocessor described in
https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kconfig-macro-language.txt
(which is now in linux-next and will appear in Linux 4.18).
A new Kconfig.variables property holds all the preprocessor variables so
that they can be inspected programmatically. Preprocessor variables are
represented by a new Variable class.
With the preprocessor, environment variables are referenced with $(FOO)
instead of $FOO. For backwards compatibility, $FOO is accepted as well
for now (and leaves "$FOO" as-is if FOO doesn't exist). The $FOO syntax
might be dropped at some point in the future (together with a major
version increase). It should be supported for a few months at least.
Some internals were cleaned up too, mostly related to parsing. Some
outdated documentation was fixed as well.
|
|
New features:
- db92bb7 ("Add dependency loop detection") adds long-overdue
dependency loop detection.
Previously, dependency loops would trigger hard-to-debug Python
RecursionError exceptions during evaluation. They now generate a
KconfigError instead, with a helpful message that shows the items in
the loop.
Backwards-incompatible changes (major version bumped to 7):
- eb6c21a ("Turn MenuNode/Symbol/Choice.referenced() into a
@property") fixes some inconsistency in the recently-added
referenced-symbols APIs. Oversight.
Other changes:
- f6eb4f4 ("Add Symbol/Choice.referenced() convenience methods")
makes it easier to get all the symbols/choices referenced by a
symbol or choice. Previously, you'd have to loop through all the
menu nodes (definition locations) yourself, which might not be
obvious.
- ca89ca0 ("Rename KconfigSyntaxError to KconfigError") changes to
a better exception name, as KconfigSyntaxError was raised for some
things that aren't syntax errors.
The old name is kept as an alias for now for backwards
compatibility.
|
|
Pretty long overdue.
Until now, dependency loops have raised a hard-to-debug Python
RecursionError during evaluation. A Kconfiglib exception is raised now
instead, with a message that lists all the items in the loop.
See the comment at the start of _check_dep_loop_sym() for an overview of
the algorithm. At a high level, it's loop detection in a directed graph
by keeping track of unvisited/visited nodes during depth-first search.
(A third "visited, known to not be in a dependency loop" state is used
as well.)
Choices complicate things, as they're inherently loopy: The choice
depends on the choice symbols and vice versa, and the choice symbols in
a sense all depend on each other.
Add the choice-to-choice-symbol dependencies separately after dependency
loop detection, so that there's just the choice-symbol-to-choice
dependencies to deal with. It simplifies things, as it makes it possible
to tell dependencies from 'prompt' and 'default' conditions on the
choice from choice symbol dependencies.
Do some flag shenanigans to prevent the choice from being "re-entered"
while looping through the choice symbols. Maybe this could be cleaned up
a bit somehow...
Example exception message:
Dependency loop
===============
A (defined at tests/Kdeploop10:1), with definition...
config A
bool
depends on B
...depends on B (defined at tests/Kdeploop10:5), with definition...
config B
bool
depends on C = 7
...depends on C (defined at tests/Kdeploop10:9), with definition...
config C
int
range D 8
...depends on D (defined at tests/Kdeploop10:13), with definition...
config D
int
default 3 if E
default 8
...depends on E (defined at tests/Kdeploop10:18), with definition...
config E
bool
(select-related dependencies: F && G)
...depends on G (defined at tests/Kdeploop10:25), with definition...
config G
bool
depends on H
...depends on the choice symbol H (defined at tests/Kdeploop10:32), with definition...
config H
bool
prompt "H" if I && <choice>
depends on I && <choice>
...depends on the choice symbol I (defined at tests/Kdeploop10:41), with definition...
config I
bool
prompt "I" if <choice>
depends on <choice>
...depends on <choice> (defined at tests/Kdeploop10:38), with definition...
choice
bool
prompt "choice" if J
...depends on J (defined at tests/Kdeploop10:46), with definition...
config J
bool
depends on A
...depends again on A (defined at tests/Kdeploop10:1)
|
|
|
|
Just adds commit dc0b022 ("Correctly report choice locations in some
warnings").
|
|
Fixes:
- c880151 ("Fix incorrectly ordered properties for some nested
multi.def. symbols") fixes a bug that could cause symbols/choices
defined in multiple locations and nested in particular ways within
if's and menus to get their properties in the wrong order.
The Linux kernel wasn't affected (which is how it managed to slip
through), but projects that make heavy use of symbols defined in
multiple locations might have been. Comprehensive selftests have
been added to cover property ordering on nested multi.def.
symbols/choices.
New features:
- 4af3e0c ("menuconfig: Support starting a search from the info
dialog") and 330017a ("menuconfig: Support viewing symbol info from
within the jump-to dialog") makes working with the menuconfig a bit
smoother to work with.
- 68043b2 ("Add MenuNode function that returns referenced items")
makes it easier to find out what symbols/choices a symbol, choice,
menu, or comment references, which is handy e.g. for searching.
|
|
|
|
Also move the description of the Kconfig extensions out of 'Other features' and into
a separate section under 'Library features'.
|
|
Just to fix the rendering of the README on PyPI with commit b727f4d
("Fix link to allyesconfig.py in README").
|
|
No longer just an example either.
This also makes the README render properly on PyPI.
|
|
|
|
|
|
|
|
|
|
Explain the soon-to-be-bundled tools.
Also rearrange and clean up some sections.
|
|
To-be-packaged scripts now live in the root.
|
|
All the packaged code will appear in the root.
|
|
|
|
|
|
Should probably move the screenshots out into a separate section soon.
|
|
When show-all mode is enabled, all items in the current menu are shown,
including promptless and invisible items. Promptless items are shown
with their name within <> brackets in place of the prompt.
This will make it possible to jump to invisible items once the jump-to
feature is added. It is also a handy feature on its own.
.config loading from within the interface will make use of it as well,
in case the current menu becomes complete invisible.
Piggyback various code cleanups. Rename _visible* to _shown*, as it now
includes invisible items in show-all mode.
|
|
|
|
New features:
- ed3ceaa ("Make warnings available in a list")
API changes:
- 8983f7e ("Make disable_warnings() disable all warnings")
This is a minor API behavior change, so the major version is bumped.
It's unlikely to break anything people were depending on.
|
|
|
|
4.2.1 should have been 4.3.0. That was not a bugfix release. Braino.
|
|
New features:
- 105c835 ("Add helper for splitting expressions")
- 509e374 ("Add Choice.direct_dep field")
A terminal menuconfig implementation has been added which relies on
these features.
Other improvements:
- c1c5ef2 ("Print a warning for malformed .config lines")
- 09b8c58 ("Give filename and context for UnicodeDecodeError")
|
|
To avoid confusing it with the new terminal menuconfig implementation.
Clean up the README a bit at the same time, removing some stuff that's
less essential now (e.g. the menuconfig_example.py "screenshot").
|
|
|
|
|
|
|
|
|