From patchwork Fri Apr 28 16:14:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 756476 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3wDzR30FW0z9s7s for ; Sat, 29 Apr 2017 02:14:23 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TKkeTaKm"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id C8B82C21C76; Fri, 28 Apr 2017 16:14:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A00FAC21C2E; Fri, 28 Apr 2017 16:14:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EC93FC21C2E; Fri, 28 Apr 2017 16:14:13 +0000 (UTC) Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by lists.denx.de (Postfix) with ESMTPS id 557B1C21C2D for ; Fri, 28 Apr 2017 16:14:13 +0000 (UTC) Received: by mail-pg0-f65.google.com with SMTP id v20so3596921pgn.0 for ; Fri, 28 Apr 2017 09:14:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=v3YL8ZVgM/YP0VoueIPSRQUGQL8c7gB+Wg3psoq4LRY=; b=TKkeTaKmYNpmNVn4xzdaDOQYwNWJs10U7X9fq2qSa3LkHteiHX+aIL2M2ZRKg5l9bD BpMgNb03ura6lmQ+u326cqm9XCTpTkfBd96zQeKP6YLn2/+YBTVOyn4oo/H26DPhHAUm Wci+/rFFU58ubAFRTlQ6nMsOVi3FUC8RwofzNKlJynHO/iiyY3DvlBbPXT9/KALSla0w vFGIHdiVfif9GCjysw7HGbfnbLwYnpffuBQvB3+awrEshorqWXcf6Bz2YLaye4aAwkGC WcD/5swKXHEdOel+hpE9LY1hTpNzhpKuX8vLdmWy/3Z8zqMWGtFFk1MX5lqU5bsd3sSY 4ltA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=v3YL8ZVgM/YP0VoueIPSRQUGQL8c7gB+Wg3psoq4LRY=; b=VptBykMsWrzIPCwRnXYxnelkgbWxPDQfYiIsc2Fs7uJKqeQTikLOXkj633Xy7yg9h3 tZSzlJIXbOxGEhDFQ2OOrTWnwTI4ECdv3rb4jsMUjXL9o97plVgM9VYG7SiSJmkfjywq oPjW2h2Zdbe5548EW9LKWeXD5zQlts6lVg40S/E/chtrmJjX9Qj8W5R+JUw38QW6jflx TdYrg7CRcSouUONtcYIPDdtr91LBxnaJ9tHK8JObTeW87C1oXLznJxjevRIpLYPQtQK6 IF3dn3BbmwAZdUQSGPHEHIUiZUlYcaCUnqXYLpShniJzDkymDulYvjwiJbGJCrt9poFh eVPw== X-Gm-Message-State: AN3rC/4ESx2tBhSVOv2gWCG4Df2TSEIc4xLBOZmUZZzf9Sc9uCgfapit vONBiEQSg9pYVw== X-Received: by 10.99.106.5 with SMTP id f5mr12648877pgc.66.1493396051890; Fri, 28 Apr 2017 09:14:11 -0700 (PDT) Received: from chrisp-ll.atg.lc ([208.184.212.166]) by smtp.gmail.com with ESMTPSA id k69sm10854776pfb.43.2017.04.28.09.14.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Apr 2017 09:14:11 -0700 (PDT) From: Chris Packham To: u-boot@lists.denx.de Date: Sat, 29 Apr 2017 04:14:06 +1200 Message-Id: <20170428161407.9258-1-judge.packham@gmail.com> X-Mailer: git-send-email 2.10.1 Cc: Joe Hershberger , Chris Packham Subject: [U-Boot] [PATCH v2] tools: moveconfig: cleanup whitelist entries X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" 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 Signed-off-by: Chris Packham Reviewed-by: Simon Glass --- 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'])