mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 13:41:31 +00:00
tools: moveconfig: cleanup whitelist entries
After moving to KConfig and removing from all headers options should be removed from config_whitelist.txt so the build starts complaining if someone adds them back. Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
85edfc1f6f
commit
ca43834d66
1 changed files with 20 additions and 0 deletions
|
@ -600,6 +600,25 @@ def cleanup_extra_options(configs, options):
|
||||||
cleanup_one_extra_option(os.path.join('configs', defconfig), configs,
|
cleanup_one_extra_option(os.path.join('configs', defconfig), configs,
|
||||||
options)
|
options)
|
||||||
|
|
||||||
|
def cleanup_whitelist(configs, options):
|
||||||
|
"""Delete config whitelist entries
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
configs: A list of CONFIGs to remove.
|
||||||
|
options: option flags.
|
||||||
|
"""
|
||||||
|
if not confirm(options, 'Clean up whitelist entries?'):
|
||||||
|
return
|
||||||
|
|
||||||
|
with open(os.path.join('scripts', 'config_whitelist.txt')) as f:
|
||||||
|
lines = f.readlines()
|
||||||
|
|
||||||
|
lines = [x for x in lines if x.strip() not in configs]
|
||||||
|
|
||||||
|
with open(os.path.join('scripts', 'config_whitelist.txt'), 'w') as f:
|
||||||
|
f.write(''.join(lines))
|
||||||
|
|
||||||
|
|
||||||
### classes ###
|
### classes ###
|
||||||
class Progress:
|
class Progress:
|
||||||
|
|
||||||
|
@ -1296,6 +1315,7 @@ def main():
|
||||||
if configs:
|
if configs:
|
||||||
cleanup_headers(configs, options)
|
cleanup_headers(configs, options)
|
||||||
cleanup_extra_options(configs, options)
|
cleanup_extra_options(configs, options)
|
||||||
|
cleanup_whitelist(configs, options)
|
||||||
|
|
||||||
if options.commit:
|
if options.commit:
|
||||||
subprocess.call(['git', 'add', '-u'])
|
subprocess.call(['git', 'add', '-u'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue