From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: steven.shi@intel.com) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by groups.io with SMTP; Tue, 28 May 2019 01:35:32 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2019 01:35:32 -0700 X-ExtLoop1: 1 Received: from jshi19-mobl.ccr.corp.intel.com ([10.254.209.247]) by fmsmga005.fm.intel.com with ESMTP; 28 May 2019 01:35:22 -0700 From: "Steven Shi" To: devel@edk2.groups.io Cc: liming.gao@intel.com, bob.c.feng@intel.com, christian.rodriguez@intel.com, zhijux.fan@intel.com Subject: [PATCH] BaseTools:Update binary cache restore time to current time Date: Tue, 28 May 2019 16:35:14 +0800 Message-Id: <20190528083514.22636-1-steven.shi@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 https://bugzilla.tianocore.org/show_bug.cgi?id=1742 Current Binary Cache doesn't update the restored file creation and modification times to the current time. Preserve the new restored file creation time as old cached time might has potential issue to block the make to build updated files based on the time stamp. Enhance to update the restored file creation time to current time. Cc: Liming Gao Cc: Bob Feng Cc: Zhiju Fan Signed-off-by: Steven Shi --- BaseTools/Source/Python/AutoGen/AutoGen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index a5bef4f7c6..57ca67f692 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -3941,14 +3941,14 @@ class ModuleAutoGen(AutoGen): for root, dir, files in os.walk(FileDir): for f in files: if self.Name + '.hash' in f: - shutil.copy2(HashFile, self.BuildDir) + shutil.copy(HashFile, self.BuildDir) else: File = path.join(root, f) sub_dir = os.path.relpath(File, FileDir) destination_file = os.path.join(self.OutputDir, sub_dir) destination_dir = os.path.dirname(destination_file) CreateDirectory(destination_dir) - shutil.copy2(File, destination_dir) + shutil.copy(File, destination_dir) if self.Name == "PcdPeim" or self.Name == "PcdDxe": CreatePcdDatabaseCode(self, TemplateString(), TemplateString()) return True -- 2.17.1.windows.2