tools: moveconfig: cleanup whitelist entries
PATCH 1/1 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.
---
Simon asked for it so here you go. I also thought about cleaning up the README file references too but that will take a little bit of work to parse reliably.
tools/moveconfig.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
tools/moveconfig.py +28 -0
@@ -601,6 +601,33 @@ 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 entried + + Arguments: + configs: A list of CONFIGs to remove. + options: option flags. + """ + if not options.yes: + while True: + choice = (raw_input('Clean up whitelist entries? [y/n]: '). + lower()) + print choice + if choice == 'y' or choice == 'n': + break + + if choice == 'n': + 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:
@@ -1297,6 +1324,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'])
Signature · 1 line
2.10.1
PATCH 1/1 tools: moveconfig: cleanup whitelist entries
2017-04-28 10:13 GMT+09:00 Chris Packham <[email protected]>:
Quoted 18 lines
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.
Signed-off-by Chris Packham <[email protected]>---
Simon asked for it so here you go. I also thought about cleaning up the README file references too but that will take a little bit of work to parse reliably.tools/moveconfig.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)tools/moveconfig.py +0
-0
tools/moveconfig.py def cleanup_extra_options(configs, options): · line 605
Quoted 5 lines
tools/moveconfig.py +2
-0@@ -601,6 +601,33 @@ 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 entried
s/entried/entries/
Otherwise,
Signature · 2 lines
Best Regards Masahiro Yamada