From 496956771af12d350f31844d7ac9176ba1084e6c Mon Sep 17 00:00:00 2001 From: Quirin Gylstorff Date: Thu, 30 Oct 2025 13:57:15 +0100 Subject: [PATCH 1/2] .gitignore: Add test files Signed-off-by: Quirin Gylstorff --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4a18d79..fc5be22 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ build/ *.egg-info/ dist/ +tests/config_test* From b7ef94605a3fda0d7f66a6264fa1d7ce2665aa3a Mon Sep 17 00:00:00 2001 From: Quirin Gylstorff Date: Fri, 31 Oct 2025 09:16:08 +0100 Subject: [PATCH 2/2] Skip transitional keyword This allows to parse configs with the transitional key word. For a working version of the transitional feature it is necessary to extend parsing of the default keyword to support setting the value to a variable: ``` config NEW_BOOL bool "New bool option" default OLD_BOOL ``` Signed-off-by: Quirin Gylstorff --- kconfiglib.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kconfiglib.py b/kconfiglib.py index ce40eb7..7c75b80 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -3151,6 +3151,8 @@ def _parse_props(self, node): node.dep = self._make_and(node.dep, self._expect_expr_and_eol()) + elif t0 is _T_TRANSITIONAL: + continue elif t0 is _T_HELP: self._parse_help(node) @@ -7010,9 +7012,10 @@ def _shell_fn(kconf, _, command): _T_SOURCE, _T_STRING, _T_TRISTATE, + _T_TRANSITIONAL, _T_UNEQUAL, _T_VISIBLE, -) = range(1, 51) +) = range(1, 52) # Keyword to token map, with the get() method assigned directly as a small # optimization @@ -7059,6 +7062,7 @@ def _shell_fn(kconf, _, command): "source": _T_SOURCE, "string": _T_STRING, "tristate": _T_TRISTATE, + "transitional": _T_TRANSITIONAL, "visible": _T_VISIBLE, }.get