From patchwork Thu May 19 06:51:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 68086 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp3032332qge; Wed, 18 May 2016 23:52:02 -0700 (PDT) X-Received: by 10.28.45.216 with SMTP id t207mr11582921wmt.40.1463640722467; Wed, 18 May 2016 23:52:02 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id d29si38707633wmi.53.2016.05.18.23.52.02; Wed, 18 May 2016 23:52:02 -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 14C9BA75DC; Thu, 19 May 2016 08:51: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 dsNOs9hLsFOs; Thu, 19 May 2016 08:51:56 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 389A0A75E9; Thu, 19 May 2016 08:51:41 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D68C0A74DA for ; Thu, 19 May 2016 08:51:30 +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 Izr7paGxSKgY for ; Thu, 19 May 2016 08:51:30 +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 DA205A74E3 for ; Thu, 19 May 2016 08:51:26 +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 u4J6p2Ze001067; Thu, 19 May 2016 15:51:03 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com u4J6p2Ze001067 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1463640663; bh=Pi66D97ykCzV9jnxJIpkE9f5CFnlUU1VZ7tja2RWAv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BYvOkiUnT7FL2DhLXWAUgxGEO5tQiE0zjqj9udBBPzo/2wUFDLavFnj2vuj6zZspo A+lBNH0O91XNihH1j2RF1dKYQMcnlD8ESo6cblFpY7BkgJYj50vGRXSj4mD1OHzstZ l9aB2aqLeLqzxEkO7Vr96z+uyp3tqUuyfHzmT0kdRGAlD6/A+slw7ePTwVCHQgB7os fGSOOsAq+NYs+ptPiycpl1CAnvNJxwQNDvh4ql+3mrGZJokDhhS9W1N1Z7CXsemnIw c2QxFsQKSTStyEQrGfZ2B7wF1+u0sk2beuMGJJhdoh43pHU0NAksYarinBhtyssPTR 2Vz2MkyZ2bWDA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 19 May 2016 15:51:49 +0900 Message-Id: <1463640729-25666-2-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 01/21] tools: moveconfig: fix --dry-run 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" Since commit 96464badc794 ("moveconfig: Always run savedefconfig on the moved config"), --dry-run option is broken. The --dry-run option prevents the .config from being modified, but defconfig files might be updated by "make savedefconfig" regardless of the --dry-run option. Move the "if not self.options.dry_run" conditional to the correct place. Fixes 96464badc794 ("moveconfig: Always run savedefconfig on the moved config") Signed-off-by: Masahiro Yamada --- tools/moveconfig.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 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 68631b7..fd98e41 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -511,11 +511,10 @@ class KconfigParser: # Print log in one shot to not mix up logs from different threads. print log, - if not self.options.dry_run: - with open(dotconfig_path, 'a') as f: - for (action, value) in results: - if action == ACTION_MOVE: - f.write(value + '\n') + with open(dotconfig_path, 'a') as f: + for (action, value) in results: + if action == ACTION_MOVE: + f.write(value + '\n') os.remove(os.path.join(self.build_dir, 'include', 'config', 'auto.conf')) os.remove(autoconf_path) @@ -647,9 +646,9 @@ class Slot: return False if self.state == STATE_SAVEDEFCONFIG: - defconfig_path = os.path.join(self.build_dir, 'defconfig') - shutil.move(defconfig_path, - os.path.join('configs', self.defconfig)) + if not self.options.dry_run: + shutil.move(os.path.join(self.build_dir, 'defconfig'), + os.path.join('configs', self.defconfig)) self.state = STATE_IDLE return True