From patchwork Mon Sep 26 02:52:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 76979 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp953495qgf; Sun, 25 Sep 2016 19:50:58 -0700 (PDT) X-Received: by 10.194.120.37 with SMTP id kz5mr15535164wjb.196.1474858258721; Sun, 25 Sep 2016 19:50:58 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id y77si6599025wme.72.2016.09.25.19.50.58; Sun, 25 Sep 2016 19:50:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 60C94A7535; Mon, 26 Sep 2016 04:50:57 +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 5ZPoaAB9jflN; Mon, 26 Sep 2016 04:50:57 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D52EBA7537; Mon, 26 Sep 2016 04:50:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9C9BEA76C0 for ; Mon, 26 Sep 2016 04:50:51 +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 nwajVNGxwb2a for ; Mon, 26 Sep 2016 04:50:51 +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-11.nifty.com (conuserg-11.nifty.com [210.131.2.78]) by theia.denx.de (Postfix) with ESMTPS id 292BEA7535 for ; Mon, 26 Sep 2016 04:50:47 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id u8Q2oFe8021241; Mon, 26 Sep 2016 11:50:16 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com u8Q2oFe8021241 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1474858217; bh=oKt7QI8lies3EXehuANX9RQDvQs4YOdBgdg0z/O69HE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NcKJ1uuAnkUO6pCAvzaAMEnIBwFWg/zYGR9t0+8jmbxTwt9AhVXJp8xtoX/zrbYzQ orLd95GAnGLUpnxjJupVV3PMIFqQbBs3dSVRQaRcMJf9bFGM1j1SVpI+beQTZ/vf7h bcww5K0cuH83ltIKUdB+MqaBPOHxGuN8dWt8g72pRFay8S89XxUBlhp5e921ebRubX eLI7sKNOTDUsC2/yMAPzEbFfhHKpjJ3Rk5DXpnArtzrBp0aLlEnwOqNW0VzkDcFS9k ePq0QKM8JF/0jw7VXl2Kdbw0xMvWuijk7qHaSFDfD4nEJ9g2aSp8yyBhuqZF4bH1Rn BaXYRGUR9RgkA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 26 Sep 2016 11:52:28 +0900 Message-Id: <1474858350-17422-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1474858350-17422-1-git-send-email-yamada.masahiro@socionext.com> References: <1474858350-17422-1-git-send-email-yamada.masahiro@socionext.com> Cc: Tom Rini Subject: [U-Boot] [PATCH v3 1/3] 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 42f75050667b, 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 whitelist options, but never increase. So, when we update the whitelist, we should create a temporary list, then take the intersection of the temporary one and the current one. Signed-off-by: Masahiro Yamada Reviewed-by: Simon Glass --- Changes in v3: None 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(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot 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