[1/2] build-whitelist: do not add new options to whitelist when update

Message ID 1474555766-23559-2-git-send-email-yamada.masahiro@socionext.com
State New
Headers show

Commit Message

Masahiro Yamada Sept. 22, 2016, 2:49 p.m.
If somebody adds a reference to a new CONFIG option in .c files,
it will be added in the whitelist when we sync it.
(For example, if we run scripts/build-whitelist.sh against commit
a2ed3f452dd1, a new option CONFIG_USB_XHCI_UNIPHIER will appear
in the list.)

In order to make steady progress of Kconfig migration, we want to
only decrease options in the whitelist, never increase.

So, when we update the whitelist, we should create a temporary list,
then take the intersection of the temporary list and the current
whitelist.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

---

 scripts/build-whitelist.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

-- 
1.9.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Patch

diff --git a/scripts/build-whitelist.sh b/scripts/build-whitelist.sh
index 7cf7a66..b681ed4 100755
--- a/scripts/build-whitelist.sh
+++ b/scripts/build-whitelist.sh
@@ -45,7 +45,13 @@  cat `find . -name "Kconfig*"` |sed -n \
 
 # Use only the options that are present in the first file but not the second.
 comm -23 scripts/config_whitelist.txt.tmp1 scripts/config_whitelist.txt.tmp2 \
-	|sort |uniq >scripts/config_whitelist.txt
-rm scripts/config_whitelist.txt.tmp1 scripts/config_whitelist.txt.tmp2
+	|sort |uniq >scripts/config_whitelist.txt.tmp3
+
+comm -12 scripts/config_whitelist.txt.tmp3 scripts/config_whitelist.txt \
+	> scripts/config_whitelist.txt.tmp4
+
+mv scripts/config_whitelist.txt.tmp4 scripts/config_whitelist.txt
+
+rm scripts/config_whitelist.txt.tmp*
 
 unset LC_ALL LC_COLLATE