From: Chris Packham <judge.packham@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] tools: moveconfig: cleanup whitelist entries
Date: Sat, 29 Apr 2017 04:14:06 +1200 [thread overview]
Message-ID: <20170428161407.9258-1-judge.packham@gmail.com> (raw)
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>
---
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.
Changes in v2:
- Correct typo
- Collect act from Masahiro
tools/moveconfig.py | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index dcca0ec..d39ad02 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -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 entries
+
+ 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'])
--
2.10.1
next reply other threads:[~2017-04-28 16:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 16:14 Chris Packham [this message]
2017-04-28 16:17 ` [U-Boot] [PATCH v2] tools: moveconfig: cleanup whitelist entries Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170428161407.9258-1-judge.packham@gmail.com \
--to=judge.packham@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.