summaryrefslogtreecommitdiff
path: root/tools/moveconfig.py
diff options
context:
space:
mode:
authorChris Packham <judge.packham@gmail.com>2017-05-02 09:30:47 (GMT)
committerTom Rini <trini@konsulko.com>2017-05-08 15:57:29 (GMT)
commitca43834d66f08ed7244c26ef8edbe1a9ee2b8e8c (patch)
tree43faa2ff42b3a61b10922211fb1ad6845fa0ecde /tools/moveconfig.py
parent85edfc1f6fdf1630c00dc57a63ab66d51608092e (diff)
downloadu-boot-fsl-qoriq-ca43834d66f08ed7244c26ef8edbe1a9ee2b8e8c.tar.xz
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>
Diffstat (limited to 'tools/moveconfig.py')
-rwxr-xr-xtools/moveconfig.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index f8d4857..2361a43 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -600,6 +600,25 @@ def cleanup_extra_options(configs, options):
cleanup_one_extra_option(os.path.join('configs', defconfig), configs,
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 ###
class Progress:
@@ -1296,6 +1315,7 @@ def main():
if configs:
cleanup_headers(configs, options)
cleanup_extra_options(configs, options)
+ cleanup_whitelist(configs, options)
if options.commit:
subprocess.call(['git', 'add', '-u'])