diff --git a/kconfiglib.py b/kconfiglib.py index 2492bdd..9fdf495 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -3462,6 +3462,9 @@ def _parse_props(self, node): node.item.is_optional = True + elif t0 is _T_TRANSITIONAL: + node.item.is_transitional = True + else: # Reuse the tokens for the non-property line later self._reuse_tokens = True @@ -4514,6 +4517,9 @@ class Symbol(object): is_constant: True if the symbol is a constant (quoted) symbol. + is_transitional: + True if config is in transition to a new name, hide from user + kconfig: The Kconfig instance this symbol is from. """ @@ -4536,6 +4542,7 @@ class Symbol(object): "implies", "is_allnoconfig_y", "is_constant", + "is_transitional", "kconfig", "name", "nodes", @@ -5101,6 +5108,9 @@ def __repr__(self): if self is self.kconfig.modules: add("is the modules symbol") + if self.is_transitional: + add("transitional") + add("direct deps " + TRI_TO_STR[expr_value(self.direct_dep)]) if self.nodes: @@ -5171,6 +5181,7 @@ def __init__(self): # Symbol gets a .config entry. self.is_allnoconfig_y = self._was_set = self._write_to_conf = False + self.is_transitional = False # See Kconfig._build_dep() self._dependents = set() @@ -7555,10 +7566,11 @@ def _rustc_option_fn(kconf, _, option): _T_SELECT, _T_SOURCE, _T_STRING, + _T_TRANSITIONAL, _T_TRISTATE, _T_UNEQUAL, _T_VISIBLE, -) = range(1, 51) +) = range(1, 52) # Keyword to token map, with the get() method assigned directly as a small # optimization @@ -7604,6 +7616,7 @@ def _rustc_option_fn(kconf, _, option): "select": _T_SELECT, "source": _T_SOURCE, "string": _T_STRING, + "transitional": _T_TRANSITIONAL, "tristate": _T_TRISTATE, "visible": _T_VISIBLE, }.get diff --git a/tests/Kreferenced b/tests/Kreferenced index 9da94c8..8723e01 100644 --- a/tests/Kreferenced +++ b/tests/Kreferenced @@ -5,6 +5,14 @@ config JUST_DEPENDS_ON_REFS bool depends on A && B +config TRANSITIONAL + bool + default TRANSITIONAL_LEGACY_NAME + +config TRANSITIONAL_LEGACY_NAME + bool + transitional + if A menu "menu"