From patchwork Fri Sep 23 16:00:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 674143 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3sgdQh0bTkz9t15 for ; Sat, 24 Sep 2016 02:01:48 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b=N4v2ZOV+; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6F34BB3829; Fri, 23 Sep 2016 18:01:40 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uXjcUugkOus9; Fri, 23 Sep 2016 18:01:40 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6DE7FB3830; Fri, 23 Sep 2016 18:01:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C610CA770F for ; Fri, 23 Sep 2016 18:01:26 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zv7cRWDoiXGr for ; Fri, 23 Sep 2016 18:01:26 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-07.nifty.com (conuserg-07.nifty.com [210.131.2.74]) by theia.denx.de (Postfix) with ESMTPS id 1B69FA7709 for ; Fri, 23 Sep 2016 18:01:22 +0200 (CEST) Received: from grover.sesame (FL1-111-169-71-157.osk.mesh.ad.jp [111.169.71.157]) (authenticated) by conuserg-07.nifty.com with ESMTP id u8NG0jrw014295; Sat, 24 Sep 2016 01:00:52 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u8NG0jrw014295 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1474646453; bh=W2tNTQwGjFAQ/KIIdrZ9oZbQmDyIyLD9wCK7dON+L9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N4v2ZOV+qSJs2dgIdFm3YkN/uLA5zRWl73b5u3ymV+GNjDrbeYqf9SmgjPsJtwQXJ ccdwoW3vrdI++mSawMIDZs3ozGEcljfLa8ACYHonydijsXyKWgIhpGaua3X+/DKYGK JO9TwXD2CbS/SKB4P5ZRDW/fCZSil5nYQkos1K+nTCpEqKmQPZpHTDS0V5nVCNFphq bGojG93tds24m+U917ZCyhmTxRT7jFRr6LvsqzsrqBIC703kZ+j5jnrC2mHcxYRRZR 92cn5sDEvz/aPohQCGWyOXoO5YI+qZYQnevflKjpSGfuC73N+56db1mYGjaeWzrQGE mRoNBvY5lGkFA== X-Nifty-SrcIP: [111.169.71.157] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Sat, 24 Sep 2016 01:00:41 +0900 Message-Id: <1474646442-8074-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1474646442-8074-1-git-send-email-yamada.masahiro@socionext.com> References: <1474646442-8074-1-git-send-email-yamada.masahiro@socionext.com> Cc: Tom Rini Subject: [U-Boot] [PATCH v2 1/2] build-whitelist: do not add new options to whitelist when update X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" If somebody adds references to new CONFIG options in source files, they will be added in the whitelist when we sync it. (For example, if we run scripts/build-whitelist.sh against commit 201c9d884dca, new options CONFIG_SPL_DFU_SUPPORT and 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, but 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 Reviewed-by: Simon Glass --- Changes in v2: - V1 fails to create scripts/config-whitelist.txt from scratch. Fix it. scripts/build-whitelist.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/build-whitelist.sh b/scripts/build-whitelist.sh index 7cf7a66..f169eaa 100755 --- a/scripts/build-whitelist.sh +++ b/scripts/build-whitelist.sh @@ -45,7 +45,18 @@ 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 + +# If scripts/config_whitelist.txt already exists, take the intersection of the +# current list and the new one. We do not want to increase whitelist options. +if [ -r scripts/config_whitelist.txt ]; then + 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 +else + mv scripts/config_whitelist.txt.tmp3 scripts/config_whitelist.txt +fi + +rm scripts/config_whitelist.txt.tmp* unset LC_ALL LC_COLLATE