X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fmoveconfig.py;h=caa81ac2ed77af9e635c2b577e3838b314812cdc;hb=0a4357c4c2b29d787d70775dd6ad64b50e23082a;hp=8a038501929c0fa61ebb0da3a04d5c666b87b5a1;hpb=6821a7457c8a12bb4d378275807c1ea26e87d97f;p=u-boot diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 8a03850192..caa81ac2ed 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -1,9 +1,8 @@ #!/usr/bin/env python2 +# SPDX-License-Identifier: GPL-2.0+ # # Author: Masahiro Yamada # -# SPDX-License-Identifier: GPL-2.0+ -# """ Move config options from headers to defconfig files. @@ -1170,7 +1169,7 @@ class Slot: toolchain = self.toolchains.Select(arch) except ValueError: self.log += color_text(self.options.color, COLOR_YELLOW, - "Tool chain for '%s' is missing. Do nothing.\n % arch") + "Tool chain for '%s' is missing. Do nothing.\n" % arch) self.finish(False) return env = toolchain.MakeEnvironment(False) @@ -1472,7 +1471,7 @@ def find_kconfig_rules(kconf, config, imply_config): """ sym = kconf.get_symbol(imply_config) if sym: - for sel in sym.get_selected_symbols(): + for sel in sym.get_selected_symbols() | sym.get_implied_symbols(): if sel.get_name() == config: return sym return None @@ -1877,10 +1876,10 @@ def main(): if options.build_db: with open(CONFIG_DATABASE, 'w') as fd: for defconfig, configs in config_db.iteritems(): - print >>fd, '%s' % defconfig + fd.write('%s\n' % defconfig) for config in sorted(configs.keys()): - print >>fd, ' %s=%s' % (config, configs[config]) - print >>fd + fd.write(' %s=%s\n' % (config, configs[config])) + fd.write('\n') if __name__ == '__main__': main()