Skip to content

Commit

Permalink
BaseTools:Update binary cache restore time to current time
Browse files Browse the repository at this point in the history
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@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Zhiju Fan <zhijux.fan@intel.com>
Signed-off-by: Steven Shi <steven.shi@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
  • Loading branch information
shijunjing authored and BobCF committed May 31, 2019
1 parent 3a0b998 commit b6cfa68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BaseTools/Source/Python/AutoGen/AutoGen.py
Expand Up @@ -3947,14 +3947,14 @@ def AttemptModuleCacheCopy(self):
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
Expand Down

0 comments on commit b6cfa68

Please sign in to comment.