From 4fce6c53e1bdac803c77f0be8bedece22d73c30c Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 19 Sep 2017 07:06:17 +0200 Subject: Include 'if' deps. in _determine_actual_symbols() Previously, only WEIRD_1 and not WEIRD_2 would be considered not a choice symbol in the following fragment. This lead to a weird warning in U-Boot. choice config FOO config WEIRD_1 depends on FOO if FOO config WEIRD_2 endif endchoice Also add some testcases for weird choice symbols. --- kconfiglib.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index 30b1493..b408900 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1055,7 +1055,7 @@ class Config(object): # Symbol or Choice # See comment for 'menu_dep' - stmt.menu_dep = depends_on_expr + stmt.menu_dep = _make_and(deps, depends_on_expr) # Propagate dependencies to prompts @@ -2369,9 +2369,9 @@ class Symbol(Item): # dependencies inherited from enclosing menus and ifs self.all_referenced_syms = set() - # This records only dependencies specified with 'depends on'. Needed - # when determining actual choice items (hrrrr...). See also - # Choice._determine_actual_symbols(). + # This records only dependencies from enclosing ifs and menus together + # with local 'depends on' dependencies. Needed when determining actual + # choice items (hrrrr...). See Choice._determine_actual_symbols(). self.menu_dep = None # See Symbol.get_ref/def_locations(). -- cgit v1.2.3