| Age | Commit message (Collapse) | Author |
|
Fixes two API issues. Some backwards compatibility breakage was required
for the load_config()/write_config() message change, though the only
effect on most scripts will be less output on stdout unless/until
they're modified.
- Commit bf36f5d ("Improve warning control API (with backwards
compatibility)")
- Commit 55bc8c3 ("Have load_config() and write_(min_)config() return
messages")
Kconfiglib now also makes the version number available:
- Commit 455e366 ("Add kconfiglib.VERSION")
These are longstanding issues. I don't know of any other ones that would
warrant breaking backwards compatibility. Not going on some API changing
spree.
|
|
A wart of the warning control API (enable/disable_*_warnings()) is that
the current warning settings can't be queried. Querying warning settings
is useful in functions that want to temporarily enable/disable some
warning and then put things back to how they were.
kconfiglib.load_allconfig() ran into this, for example.
Make the internal warning control variables public (improve the naming
at the same time), and encourage just setting them directly. Keep the
old API for backwards compatibility.
Also remove _warn_redun_assign() and _warn_override(). They're trivial
and were called in a single place.
|
|
Hardcoding load_config() and write_(min_)config() to write any message
to stdout is awkward, because it means that the message can't be easily
reused when stdout is the wrong place to write it to (e.g. in
menuconfig/guiconfig). This gets extra bad now that there's also the "No
change to ..." message.
Modify load_config() and write_(min_)config() to return the message as a
string instead, and have them always return a message, instead of just
when 'filename' is None and verbose=True. This makes things flexible and
straightforward.
Use the new behavior in menuconfig.py and guiconfig.py. They now show
"No change to ..." when saving a file doesn't modify it.
Tools that want to write messages to stdout should now do
print(kconf.load_config()) / print(kconf.write_config()).
There's no clean way to preserve perfect backwards compatibility here,
but keep accepting the 'verbose' argument and print a deprecation
warning if a value is ever passed for it. That way, scripts will keep
running, though possibly with less output on stdout.
This changes the meaning of the load_config() return value as well,
though I suspect it was only ever used by the menuconfig/guiconfig
interfaces.
The new behavior applies for kconfiglib.VERSION >= (12, 0, 0).
|
|
Holds a (<major>, <minor>, <patch>) tuple, e.g. (12, 0, 0).
|
|
Fixes an obscure rsource crash, in commit 92791a3 ("Fix obscure crash
with rsource and $srctree pointing to a symlink").
|
|
Sourcing a file with an absolute path and using rsource in it triggered
a relpath() between the absolute path and $srctree. Since e.g.
symlink/../bar/ = bar/ is not guaranteed for symlinks, this could lead
to the rsource'd file not being found if $srctree pointed to a symlink.
Switch to a simpler, more textual method for stripping $srctree from
glob results, which should be robust against symlink shenanigans. This
also makes the code a bit easier to follow.
Discovered by Marc Herbert.
Piggyback some minor cleanup.
|
|
Adds commit 175c1f5 ("Leave unchanged output files untouched"). This
avoids updating file modification timestamps when nothing has changed,
which can make it easier to avoid triggering redundant rebuilds.
|
|
Remove some 'Note:'s, update some stuff.
|
|
Before writing a configuration file or header file, compare the old
contents of the file against the new contents. If there's no change,
skip the write, to avoid updating the file modification time.
This might avoid triggering redundant rebuilds depending on how the
build system is set up, and could allow for a simpler setup.
|
|
Adds commit 437c6cc ("Use os.replace() if available in _save_old()"),
which gives rename() semantics on Windows, avoiding copying the file.
This was cherry-picked out of a larger change re. avoiding touching
files whose contents haven't changed. Will come later.
|
|
Gives a better overview.
|
|
Gives *nix rename() semantics on Windows, with overwriting of the target
file.
Also limit the scope of the catch-all try-except.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
Flatten, and unscrunch the bool/tristate case.
|
|
Consistent with the other ones.
|
|
Not just for syntax errors when raised from Kconfig.__init__().
|
|
|
|
|
|
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").
|
|
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.
|
|
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".
|
|
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
|
|
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.
|
|
Ye olde code.
|
|
KconfigSyntaxError is just an older (bad) name. pydoc generates
confusing documentation due to the "KconfigSyntaxError = KconfigError"
assignment, so mention it in the docstring.
|
|
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")
|
|
Good to know.
|
|
Clearer.
|
|
The scroll offset when scrolling up was one more than when scrolling
down, due to an off-by-one.
|
|
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.
|
|
- Commit aed7b40 ("Add guiconfig to PHONY in Makefile patch")
- Commit 50ded1d ("Make .config.old easier to discover")
|
|
Only appeared in two of the scripts, and main() is such a common
convention anyway.
|
|
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.
|
|
Oversight.
|
|
|
|
|
|
Not installed by default on many Linux systems, despite being part of
the Python standard library.
|
|
Improves dependency-related documentation a bit, in commit 95b80e1
("Clarify direct_dep and dep documentation").
|
|
- 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
|
|
Improves documentation for the Symbol/Choice.referenced attribute, in
commit 814e2de ("Improve the 'referenced' docstring").
|
|
- 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.
|
|
|
|
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.
|
|
|
|
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.
|
|
Mostly to get things consistent with _update_jump_to_display().
|
|
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.
|