diff mbox series

[v2,11/15] kconfig: fix select conversion for BPAUTO_ symbols in integration mode

Message ID 20220513160523.2944694-12-thomas@adapt-ip.com (mailing list archive)
State New, archived
Headers show
Series Resurrect Integration Mode v2 | expand

Commit Message

Thomas Pedersen May 13, 2022, 4:05 p.m. UTC
In integration mode, the bpid.project_prefix is nonzero
and needs to be prepended to the expected symbol to get a
match.

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
---
 lib/kconfig.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/lib/kconfig.py b/lib/kconfig.py
index a77f8a54eea7..0b5f8ebc1726 100644
--- a/lib/kconfig.py
+++ b/lib/kconfig.py
@@ -228,9 +228,10 @@  class ConfigTree(object):
             out = ''
             for l in open(os.path.join(self.bpid.target_dir, nf), 'r'):
                 m = sel_line.match(l)
+                bpauto_prefix = self.bpid.project_prefix + 'BPAUTO_'
                 if m and not m.group('sym') in syms:
-                    if 'BPAUTO_' + m.group('sym') in syms:
-                        out += m.group('spc') + "select BPAUTO_" + m.group('sym') + '\n'
+                    if bpauto_prefix + m.group('sym') in syms:
+                        out += m.group('spc') + "select " + bpauto_prefix + m.group('sym') + '\n'
                     else:
                         out += m.group('spc') + "depends on " + m.group('sym') + '\n'
                 else: