[edk2-devel] [PATCH] BaseTools:Update binary cache restore time to current time

Bob Feng bob.c.feng at intel.com
Thu May 30 02:18:40 UTC 2019


Reviewed-by: Bob Feng <bob.c.feng at intel.com>


-----Original Message-----
From: devel at edk2.groups.io [mailto:devel at edk2.groups.io] On Behalf Of Steven Shi
Sent: Tuesday, May 28, 2019 4:35 PM
To: devel at edk2.groups.io
Cc: Gao, Liming <liming.gao at intel.com>; Feng, Bob C <bob.c.feng at intel.com>; Rodriguez, Christian <christian.rodriguez at intel.com>; Fan, ZhijuX <zhijux.fan at intel.com>
Subject: [edk2-devel] [PATCH] BaseTools:Update binary cache restore time to current time

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 <liming.gao at intel.com>
Cc: Bob Feng <bob.c.feng at intel.com>
Cc: Zhiju Fan <zhijux.fan at intel.com>
Signed-off-by: Steven Shi <steven.shi at intel.com>
---
 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





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#41652): https://edk2.groups.io/g/devel/message/41652
Mute This Topic: https://groups.io/mt/31819590/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list