From patchwork Thu May 19 06:52:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 68102 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp3033371qge; Wed, 18 May 2016 23:55:07 -0700 (PDT) X-Received: by 10.194.134.137 with SMTP id pk9mr11288523wjb.62.1463640906976; Wed, 18 May 2016 23:55:06 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id e2si38698133wme.34.2016.05.18.23.55.06; Wed, 18 May 2016 23:55:06 -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 46037A7684; Thu, 19 May 2016 08:53:50 +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 CEgSs2yJEIQM; Thu, 19 May 2016 08:53:50 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2E6DBA7602; Thu, 19 May 2016 08:53:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 66A63A765A for ; Thu, 19 May 2016 08:52:41 +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 f0wLJrcBo_mI for ; Thu, 19 May 2016 08:52:41 +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-12.nifty.com (conuserg-12.nifty.com [210.131.2.79]) by theia.denx.de (Postfix) with ESMTPS id B2E0FA765B for ; Thu, 19 May 2016 08:51:55 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id u4J6p2Zx001067; Thu, 19 May 2016 15:51:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com u4J6p2Zx001067 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1463640678; bh=AIbZ27k7Dcf15n0quM/he1Stumd46nPKoZh07hTs2L0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zIVTi0y3NRPgGDbiRVxtqzh7B/ugQczJVnPF7EdaGakh71Bwut4N1tGCVIZ4y6KYb CT/bG44sTpSzCuLnFONeG+wMIyFJirAq4dq8BHs2LTMoD2/BjLUbIgvs20dhcvc7MK 5/7l1FprQs2nECYDZYTS41D8qZnNlHEXbQitTZuscLjaPBHhZwWDXcj442lxgdB+Zp Q24Gmlmo6HNkX4zoFmn/inDPf7kF171vQWABpUBR5+6BoLsw17ruYJcVLLHxd+Z7VM 93ZxTeQ56dXemWwx4T4aJoDWR3LU41jDDllWMdU/A1JgYYJUayx6Nu9d5tOdDhu1ey s3CGd1Vajc5+g== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 19 May 2016 15:52:08 +0900 Message-Id: <1463640729-25666-21-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1463640729-25666-1-git-send-email-yamada.masahiro@socionext.com> References: <1463640729-25666-1-git-send-email-yamada.masahiro@socionext.com> Cc: Joe Hershberger Subject: [U-Boot] [PATCH 20/21] tools: moveconfig: add --force-sync option 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" Now, this tools invokes "make savedefconfig" only when it needs to do so, but there might be cases where a user wants the tool to do savedefconfig forcibly, for example, some defconfigs were already out of sync and the user wants to fix it as well. Signed-off-by: Masahiro Yamada --- tools/moveconfig.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 65cc5b3..acc3dbb 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -152,6 +152,11 @@ Available options Exit immediately if Make exits with a non-zero status while processing a defconfig file. + -s, --force-sync + Do "make savedefconfig" forcibly for all the defconfig files. + If not specified, "make savedefconfig" only occurs for cases + where at least one CONFIG was moved. + -H, --headers-only Only cleanup the headers; skip the defconfig processing @@ -704,11 +709,15 @@ class Slot: (updated, log) = self.parser.update_dotconfig() self.log += log - if not updated: + if not self.options.force_sync and not updated: self.finish(True) return True - self.log += color_text(self.options.color, COLOR_LIGHT_GREEN, - "Syncing by savedefconfig...\n") + if updated: + self.log += color_text(self.options.color, COLOR_LIGHT_GREEN, + "Syncing by savedefconfig...\n") + else: + self.log += "Syncing by savedefconfig (forced by option)...\n" + cmd = list(self.make_cmd) cmd.append('savedefconfig') self.ps = subprocess.Popen(cmd, stdout=self.devnull, @@ -919,6 +928,8 @@ def main(): parser.add_option('-e', '--exit-on-error', action='store_true', default=False, help='exit immediately on any error') + parser.add_option('-s', '--force-sync', action='store_true', default=False, + help='force sync by savedefconfig') parser.add_option('-H', '--headers-only', dest='cleanup_headers_only', action='store_true', default=False, help='only cleanup the headers')