From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: liming.gao@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Fri, 16 Aug 2019 07:39:14 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 07:37:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,393,1559545200"; d="scan'208";a="352557544" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 16 Aug 2019 07:37:56 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 16 Aug 2019 07:37:56 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 16 Aug 2019 07:37:55 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.112]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.250]) with mapi id 14.03.0439.000; Fri, 16 Aug 2019 22:37:53 +0800 From: "Liming Gao" To: "Feng, Bob C" , "devel@edk2.groups.io" CC: "Shi, Steven" Subject: Re: [edk2-devel] [Patch 1/1] BaseTools: Fixed issue of incorrect Module Unique Name Thread-Topic: [edk2-devel] [Patch 1/1] BaseTools: Fixed issue of incorrect Module Unique Name Thread-Index: AQHVU/05NNU0uv82oUSBCUbP4GahMqb9ZoRAgABx0NA= Date: Fri, 16 Aug 2019 14:37:53 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4D2874@SHSMSX104.ccr.corp.intel.com> References: <15BB53DAB78C65A5.28665@groups.io> <08650203BA1BD64D8AD9B6D5D74A85D161524482@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <08650203BA1BD64D8AD9B6D5D74A85D161524482@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmVjYTRkYjMtMWM1Zi00OTMxLWJlOWUtYWQzYjllOTY5ZTBmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiY3dGeFNNNDFDN1dZSXVJTVlyU0t2bHZ4VytHZE1nMThWXC9nbm96dHl5UlFGTndBQURkV2Z1TERBOXNZdGNVWlgifQ== dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Feng, Bob C > Sent: Friday, August 16, 2019 3:55 PM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Shi, Steven > Subject: RE: [edk2-devel] [Patch 1/1] BaseTools: Fixed issue of incorrec= t Module Unique Name >=20 > This patch is to fix a critical BaseTools regression bug and it need to = be merged to edk2 master for the coming stable tag. >=20 > Thanks, > Bob >=20 > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Bo= b Feng > Sent: Friday, August 16, 2019 2:38 PM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Shi, Steven ; Feng, Bob C > Subject: [edk2-devel] [Patch 1/1] BaseTools: Fixed issue of incorrect Mo= dule Unique Name >=20 > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2088 > If there are more than one override instance for a same module, the Modu= le Unique Name is generated incorrectly. >=20 > Cc: Liming Gao > Cc: Steven Shi > Signed-off-by: Bob Feng > --- > BaseTools/Source/Python/AutoGen/ModuleAutoGen.py | 2 +- > BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 5 +++-- > 2 files changed, 4 insertions(+), 3 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTool= s/Source/Python/AutoGen/ModuleAutoGen.py > index 9ecf5c2dbe0c..076ce0e39c37 100644 > --- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py > @@ -293,11 +293,11 @@ class ModuleAutoGen(AutoGen): > @property > def UniqueBaseName(self): > ModuleNames =3D self.DataPipe.Get("M_Name") > if not ModuleNames: > return self.Name > - return ModuleNames.get(self.Name,self.Name) > + return ModuleNames.get((self.Name,self.MetaFile),self.Name) >=20 > # Macros could be used in build_rule.txt (also Makefile) > @cached_property > def Macros(self): > return OrderedDict(( > diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTo= ols/Source/Python/AutoGen/PlatformAutoGen.py > index 4abfc6c29d1b..dd629ba2fac2 100644 > --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > @@ -1364,18 +1364,19 @@ class PlatformAutoGen(AutoGen): > ModuleNameDict[unique_base_name].append(Module.MetaFile) > if Module.BaseName not in UniqueName: > UniqueName[Module.BaseName] =3D set() > UniqueName[Module.BaseName].add((self.ModuleGuid(Module),Mo= dule.MetaFile)) > for module_paths in ModuleNameDict.values(): > - if len(module_paths) > 1 and len(set(module_paths))>1: > + if len(set(module_paths))>1: > samemodules =3D list(set(module_paths)) > EdkLogger.error("build", FILE_DUPLICATED, 'Modules have= same BaseName and FILE_GUID:\n' > ' %s\n %s' % (samemodules[0], sam= emodules[1])) > for name in UniqueName: > Guid_Path =3D UniqueName[name] > if len(Guid_Path) > 1: > - retVal[name] =3D '%s_%s' % (name,Guid_Path.pop()[0]) > + for guid,mpath in Guid_Path: > + retVal[(name,mpath)] =3D '%s_%s' % (name,guid) > return retVal > ## Expand * in build option key > # > # @param Options Options to be expanded > # @param ToolDef Use specified ToolDef instead of full versi= on. > -- > 2.20.1.windows.1 >=20 >=20 >=20