Please don't forget to review this patch. It corrects a small error in my last 
patch. We should only invalidate hashes in the gBinCacheDest not 
gBinCacheSource because we want to error handle the hashes being written.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Christian 
Rodriguez
Sent: Tuesday, April 16, 2019 12:41 PM
To: [email protected]
Cc: Feng, Bob C <[email protected]>; Gao, Liming <[email protected]>; 
Zhu, Yonghong <[email protected]>
Subject: [edk2-devel] [PATCH] 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 <[email protected]>
Cc: Bob Feng <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Yonghong Zhu <[email protected]>
---
 BaseTools/Source/Python/build/build.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/build/build.py 
b/BaseTools/Source/Python/build/build.py
index 71478b7268..7271570d29 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1165,8 +1165,8 @@ class Build():
                     os.remove(ModuleHashFile)
 
             # Remove .hash file from cache
-            if GlobalData.gBinCacheSource:
-                FileDir = path.join(GlobalData.gBinCacheSource, 
moduleAutoGenObj.Arch, moduleAutoGenObj.SourceDir, 
moduleAutoGenObj.MetaFile.BaseName)
+            if GlobalData.gBinCacheDest:
+                FileDir = path.join(GlobalData.gBinCacheDest, 
+ moduleAutoGenObj.Arch, moduleAutoGenObj.SourceDir, 
+ moduleAutoGenObj.MetaFile.BaseName)
                 HashFile = path.join(FileDir, moduleAutoGenObj.Name + '.hash')
                 if os.path.exists(HashFile):
                     os.remove(HashFile)
--
2.19.1.windows.1





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

View/Reply Online (#39302): https://edk2.groups.io/g/devel/message/39302
Mute This Topic: https://groups.io/mt/31204490/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to