From bb33eed5cc6bdce2b65aa570ecd9a400bcd9c180 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sat, 25 May 2019 13:52:09 +0200 Subject: Strip direct deps. from property conditions in Symbol/Choice/MenuNode.__str__() 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 --- guiconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guiconfig.py') diff --git a/guiconfig.py b/guiconfig.py index c709c4e..9563ab4 100755 --- a/guiconfig.py +++ b/guiconfig.py @@ -2222,7 +2222,7 @@ def _kconfig_def_info(item): nodes = [item] if isinstance(item, MenuNode) else item.nodes - s = "Kconfig definition{}, with propagated dependencies\n" \ + s = "Kconfig definition{}, with parent deps. propagated to 'depends on'\n" \ .format("s" if len(nodes) > 1 else "") s += (len(s) - 1)*"=" -- cgit v1.2.3