From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: bob.c.feng@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Wed, 28 Aug 2019 01:52:33 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2019 01:52:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,440,1559545200"; d="scan'208";a="185557624" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga006.jf.intel.com with ESMTP; 28 Aug 2019 01:52:31 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Steven Shi Subject: [Patch][edk2-stable201908] BaseTools: fix an incremental build issue. Date: Wed, 28 Aug 2019 16:52:09 +0800 Message-Id: <20190828085209.25316-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2137 This patch is going to fix a regression issue of incremental build which was introduced by the commit 94459080c. The changing on INF file will not trigger module rebuild. Signed-off-by: Bob Feng Cc: Liming Gao Cc: Steven Shi --- BaseTools/Source/Python/AutoGen/ModuleAutoGen.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py index 2cd0d3859e..f610365f6d 100755 --- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py @@ -1764,16 +1764,12 @@ class ModuleAutoGen(AutoGen): for f in self.AutoGenDepSet: FileSet.add (f.Path) if os.path.exists (self.TimeStampPath): os.remove (self.TimeStampPath) - with tempfile.NamedTemporaryFile('w+', dir=os.path.dirname(self.TimeStampPath), delete=False) as tf: - for f in FileSet: - tf.write(f) - tf.write("\n") - tempname = tf.name - SaveFileOnChange(self.TimeStampPath, tempname, False) + + SaveFileOnChange(self.TimeStampPath, "\n".join(FileSet), False) # Ignore generating makefile when it is a binary module if self.IsBinaryModule: return -- 2.20.1.windows.1