BaseTools: Hash false success.. minor change in hash invalidation

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1692

Change part of the hash error handling to invalidate hashes in the
cache destination not the cache source.

Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
Christian Rodriguez 2019-04-17 03:40:55 +08:00 committed by Feng, Bob C
parent 35c2af00d8
commit 56008eb7f6
1 changed files with 2 additions and 2 deletions

View File

@ -1165,8 +1165,8 @@ class Build():
os.remove(ModuleHashFile) os.remove(ModuleHashFile)
# Remove .hash file from cache # Remove .hash file from cache
if GlobalData.gBinCacheSource: if GlobalData.gBinCacheDest:
FileDir = path.join(GlobalData.gBinCacheSource, moduleAutoGenObj.Arch, moduleAutoGenObj.SourceDir, moduleAutoGenObj.MetaFile.BaseName) FileDir = path.join(GlobalData.gBinCacheDest, moduleAutoGenObj.Arch, moduleAutoGenObj.SourceDir, moduleAutoGenObj.MetaFile.BaseName)
HashFile = path.join(FileDir, moduleAutoGenObj.Name + '.hash') HashFile = path.join(FileDir, moduleAutoGenObj.Name + '.hash')
if os.path.exists(HashFile): if os.path.exists(HashFile):
os.remove(HashFile) os.remove(HashFile)