From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: christian.rodriguez@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Thu, 18 Apr 2019 07:36:39 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2019 07:36:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,366,1549958400"; d="scan'208";a="151948371" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by orsmga002.jf.intel.com with ESMTP; 18 Apr 2019 07:36:39 -0700 Received: from orsmsx154.amr.corp.intel.com (10.22.226.12) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 18 Apr 2019 07:36:39 -0700 Received: from orsmsx112.amr.corp.intel.com ([169.254.3.109]) by ORSMSX154.amr.corp.intel.com ([169.254.11.180]) with mapi id 14.03.0415.000; Thu, 18 Apr 2019 07:36:38 -0700 From: "Christian Rodriguez" To: "devel@edk2.groups.io" , "Rodriguez, Christian" CC: "Feng, Bob C" , "Gao, Liming" , "Zhu, Yonghong" Subject: Re: [edk2-devel] [PATCH] BaseTools: Hash false success.. minor change in hash invalidation Thread-Topic: [edk2-devel] [PATCH] BaseTools: Hash false success.. minor change in hash invalidation Thread-Index: AQHU9IxRK/M93yqnMUS7/9e00Psh2aZB/jIQ Date: Thu, 18 Apr 2019 14:36:38 +0000 Message-ID: <3A7DCC9A944C6149BF832E1C9B718ABC01ED3BB4@ORSMSX112.amr.corp.intel.com> References: <15960BC4435D639F.11624@groups.io> In-Reply-To: <15960BC4435D639F.11624@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWI4ZTAxMjItMjFlNS00ZTczLTk5NTUtMjY0ODVkZjhhNmUxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiXC9kdUZ5cGQ4YWFpZDd5YVQwdlZlSVF4dkJBdlwvK2dlellWUUJuWDhlR0NuaEJPdXFFVkNpVXlFRDZId1N1VDc4In0= dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Return-Path: christian.rodriguez@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Please don't forget to review this patch. It corrects a small error in my l= ast patch. We should only invalidate hashes in the gBinCacheDest not gBinCa= cheSource because we want to error handle the hashes being written. -----Original Message----- From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Chri= stian Rodriguez Sent: Tuesday, April 16, 2019 12:41 PM To: devel@edk2.groups.io Cc: Feng, Bob C ; Gao, Liming = ; Zhu, Yonghong Subject: [edk2-devel] [PATCH] BaseTools: Hash false success.. minor change= in hash invalidation BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1692 Change part of the hash error handling to invalidate hashes in the cache d= estination not the cache source. Signed-off-by: Christian Rodriguez Cc: Bob Feng Cc: Liming Gao Cc: Yonghong Zhu --- 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/Pyt= hon/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) =20 # Remove .hash file from cache - if GlobalData.gBinCacheSource: - FileDir =3D path.join(GlobalData.gBinCacheSource, moduleA= utoGenObj.Arch, moduleAutoGenObj.SourceDir, moduleAutoGenObj.MetaFile.BaseN= ame) + if GlobalData.gBinCacheDest: + FileDir =3D path.join(GlobalData.gBinCacheDest,=20 + moduleAutoGenObj.Arch, moduleAutoGenObj.SourceDir,=20 + moduleAutoGenObj.MetaFile.BaseName) HashFile =3D path.join(FileDir, moduleAutoGenObj.Name + '= .hash') if os.path.exists(HashFile): os.remove(HashFile) -- 2.19.1.windows.1