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

Masahiro Yamada yamada.masahiro at socionext.com
Thu Sep 22 16:49:25 CEST 2016


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 at socionext.com>
---

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

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
-- 
1.9.1



More information about the U-Boot mailing list