public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/5] moveconfig: Correct operation of the 'imply' feature
@ 2021-12-18 15:09 Simon Glass
  2021-12-18 15:09 ` [PATCH 2/5] moveconfig: Read the database in a separate function Simon Glass
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Simon Glass @ 2021-12-18 15:09 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Simon Glass, Trevor Woerner

This doesn't work anymore, since the Kconfig update. The script has no
tests so we did not notice. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/moveconfig.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index 373b395fda4..8d059be039d 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -1263,7 +1263,7 @@ def find_kconfig_rules(kconf, config, imply_config):
     sym = kconf.syms.get(imply_config)
     if sym:
         for sel, cond in (sym.selects + sym.implies):
-            if sel == config:
+            if sel.name == config:
                 return sym
     return None
 
@@ -1291,7 +1291,8 @@ def check_imply_rule(kconf, config, imply_config):
     nodes = sym.nodes
     if len(nodes) != 1:
         return '%d locations' % len(nodes)
-    fname, linenum = nodes[0].filename, nodes[0].linern
+    node = nodes[0]
+    fname, linenum = node.filename, node.linenr
     cwd = os.getcwd()
     if cwd and fname.startswith(cwd):
         fname = fname[len(cwd) + 1:]
@@ -1382,7 +1383,7 @@ def do_imply_config(config_list, add_imply, imply_flags, skip_added,
     """
     kconf = KconfigScanner().conf if check_kconfig else None
     if add_imply and add_imply != 'all':
-        add_imply = add_imply.split()
+        add_imply = add_imply.split(',')
 
     # key is defconfig name, value is dict of (CONFIG_xxx, value)
     config_db = {}
@@ -1414,7 +1415,7 @@ def do_imply_config(config_list, add_imply, imply_flags, skip_added,
             else:  # New defconfig
                 defconfig = line
 
-    # Work through each target config option in tern, independently
+    # Work through each target config option in turn, independently
     for config in config_list:
         defconfigs = defconfig_db.get(config)
         if not defconfigs:
-- 
2.34.1.173.g76aa8bc2d0-goog


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-01-25 15:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-18 15:09 [PATCH 1/5] moveconfig: Correct operation of the 'imply' feature Simon Glass
2021-12-18 15:09 ` [PATCH 2/5] moveconfig: Read the database in a separate function Simon Glass
2022-01-25 15:57   ` Tom Rini
2021-12-18 15:09 ` [PATCH 3/5] moveconfig: Sort the options Simon Glass
2022-01-25 15:57   ` Tom Rini
2021-12-18 15:09 ` [PATCH 4/5] moveconfig: Allow adding unit tests Simon Glass
2022-01-25 15:57   ` Tom Rini
2021-12-18 15:09 ` [PATCH 5/5] moveconfig: Allow querying board configuration Simon Glass
2022-01-25 15:57   ` Tom Rini
2022-01-25 15:57 ` [PATCH 1/5] moveconfig: Correct operation of the 'imply' feature Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox