| Age | Commit message (Collapse) | Author |
|
D'oh
|
|
Shaves ~6% off the _parse_help() runtime for the x86 Kconfigs in
cProfile.
|
|
|
|
This takes some heuristics, as it's indistinguishable from a reference
to an undefined symbol. Guess that the quotes are missing if the
'default' value isn't all-uppercase.
|
|
|
|
It's easy to miss at the top, especially as it's centered. Have a
generic 'Symbol information', 'Choice information', etc., title instead.
|
|
The name is always shown for items without prompts (which are always
promptless symbols). Only show-name mode needs the symbol/choice check.
|
|
Pressing 'c' toggles show-name mode, where names of symbols are
displayed before their prompt.
|
|
|
|
Only show "real" (non-indented) menus, like in the menu path at the top.
|
|
This is consistent with how they're shown in the info dialog. Looks less
confusing for empty strings too.
|
|
Makes it double as a quick way to check if something is enabled.
Suggested by Randy Dunlap.
|
|
This gets rid of some slight input jerkiness while inputting e.g.
'.*debug' on my machine (though the '.*' is redundant there), due to
faster matching. The '.*' probably has bad interactions with
re.search(), which matches anywhere in the string.
A plain "debug" matches about 70% faster, though it's fast enough to
feel instant anyway.
|
|
|
|
|
|
Instead of doing a single search of the '<symbol name> "<prompt>"'
string. This avoids gotchas like '_DEBUG$' not matching FOO_DEBUG if
FOO_DEBUG has a prompt.
|
|
|
|
re.error.msg was added in Python 3.5. Show a generic error message when
it isn't available.
|
|
This makes it clearer when an edit box is scrolled, especially when
backspacing. The cursor will now only go to the far left/right of the
edit box at the start/end of the string.
Reuse _SCROLL_OFFSET to specify the scroll offset.
|
|
List the working directory, which might not be obvious, and support
referring to the home directory with ~.
Support for multiple lines of help text in input dialogs was added as
well.
|
|
Since commit cbf32e2 ("Expand environment variables in strings
directly"), Kconfiglib expands environment variables directly in strings
instead of using the 'option env=...' mechanism (this is planned for the
C tools too). This new behavior is backwards-compatible as long as all
'option env=...' symbols have the same name as the environment variables
they reference.
Warn if 'option env="FOO"' appears on a symbol that isn't named FOO, to
point out compatibility issues and help with debugging.
|
|
This code is surprisingly hot.
|
|
The Kconfig definition already lists the location and menu path, and now
shows up at the top.
|
|
Only a single caller left now, in a hot loop.
|
|
Also strip the prompt in that case. Leading/trailing whitespace in
prompts leads to ugly workarounds in e.g. reStructuredText
documentation, where '*prompt *' is invalid.
|
|
UNAME_RELEASE is expanded in one of the 'default's of the DEFCONFIG_LIST
symbol in the Linux kernel. This broke after "$FOO" was changed to
directly expand to the value of the environment variable FOO, rather
than to the value of the symbol FOO.
Restore compatibility with a small wrapper.
|
|
Automatically turn on show-all mode if the currently selected node
becomes invisible after loading the new configuration.
Show an are-you-sure dialog if there are unsaved changes.
A wart here is that there currently isn't a way to get 'errno' and
'strerror' from the IOError exception returned by load_config(). Hack
around it by opening the configuration file separately with open()
first, just to catch any obvious errors.
|
|
Don't show A in the menu path at the top when entering the menu "B"
below, which will be indented relative to A. It looks confusing, and can
lead to really long menu paths.
config A
bool "A"
menu "B"
depends on A
...
|
|
This is less twisty, and generates slightly smaller bytecode. Probably
doesn't help to special-case the first line.
|
|
More readable.
|
|
Now that environment variables are expanded directly with
os.path.expandvars(), "$SRCARCH" will be kept as is if SRCARCH isn't
set. arch/$SRCARCH/Kconfig won't exist, unlike arch//Kconfig.
|
|
Get rid of some code duplication.
|
|
Get rid of some code duplication.
|
|
|
|
This allows accurate documentation to be generated for symbols and
choices defined in multiple locations. There are now MenuNode.defaults,
MenuNode.selects, etc., lists that mirror the corresponding
Symbol/Choice lists.
Symbol/Choice.__str__() now correctly show property locations as well,
by simply concatenating the strings returned by MenuNode.__str__() for
each node.
_parse_properties() was modified to add all properties directly to the
menu node instead of adding them to the contained symbol or choice. The
properties are then copied up to symbols and choices in
_finalize_tree(). Dependency propagation is handled at the same time.
As a side effect, this cleans up the code a bit and de-bloats
_parse_properties().
Update the menuconfig implementation to use the new functionality. It
now lists the menu nodes for symbols and choices with the correct
properties for each node (previously, all defaults, selects, implies,
and ranges appeared on the first definition).
|
|
Make "$FOO" directly reference the environment variable $FOO in e.g.
'source' statements, instead of the symbol FOO. Use os.path.expandvars()
to expand strings (which preserves "$FOO" as-is if no environment
variable FOO exists).
This gets rid of the 'option env' "bounce" symbols, which are mostly
just spam and are buggy in the C tools (dependencies aren't always
respected, due to parsing and evaluation getting mixed up). The same
change will probably appear soon in the C tools as well.
Keep accepting 'option env' to preserve some backwards compatibility,
but ignore it when expanding strings. For compatibility with the C
tools, bounce symbols will need to be named the same as the environment
variables they reference (which is the case for the Linux kernel).
This is a compatibility break, so the major version will be bumped to 6
at the next release.
The main motivation for adding this now is to allow recording properties
on each MenuNode in a clean way. 'option env' symbols interact badly
with delayed dependency propagation.
Side note: I have a feeling that recording environment variable values
might be redundant to trigger rebuilds if sync_deps() is run at each
compile. It should detect all changes to symbol values due to
environment variables changing value.
|
|
Was using an older name.
|
|
Works like in readline/Vim.
|
|
|
|
|
|
|
|
|
|
The cache was broken due to using an old variable name.
Piggyback a neat trick for storing globals in default arguments that I
had missed until now.
|
|
Search and display prompts for menu nodes that have them. They often
contain useful strings.
Add a pre-search pass that generates a string to search/display for each
menu node, to allow the search regex(es) to run over a single string.
That also makes 'foo bar' match for a symbol that has 'FOO' in its name
and 'bar' in its prompt, which is handy.
Remove the '(in menu X)' string that was added previously for symbols
defined in multiple locations. You'd usually be able to tell which menu
node is which from the (lack of) prompt.
|
|
A search like 'host usb' now finds all symbol names that match both
'host' and 'usb' (as regular expressions), including e.g. USB_MTU3_HOST.
This saves typing a bunch of '.*' and makes it easier to find symbols
when you aren't sure what order the components appear in.
|
|
Cleaner to do it in _menuconfig(), as it makes the fullscreen dialogs
fully independent. Saves some code too.
|
|
Might have made it sound like _parent_menu() returns a list.
|
|
Air some long conditionals out a bit. Be more consistent with format().
|
|
Can't get { } since {} implies n isn't assignable.
|
|
The horizontal scroll (hscroll) wasn't initialized properly when the
initial (prefilled) contents of an edit box was longer than the edit box
itself (e.g. when saving with a long path in KCONFIG_CONFIG). Things
snapped back into place once a key was pressed.
Initialize hscroll properly to fix the initial rendering.
|