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.120, mailfrom: bob.c.feng@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Wed, 21 Aug 2019 07:02:56 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Aug 2019 07:02:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,412,1559545200"; d="scan'208";a="203033154" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 21 Aug 2019 07:02:55 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 21 Aug 2019 07:02:55 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 21 Aug 2019 07:02:55 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.112]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.204]) with mapi id 14.03.0439.000; Wed, 21 Aug 2019 22:02:53 +0800 From: "Bob Feng" To: "Gao, Liming" , "devel@edk2.groups.io" Subject: Re: [Patch][edk2-stable201908] BaseTools: Incorrect error message for library instance not found Thread-Topic: [Patch][edk2-stable201908] BaseTools: Incorrect error message for library instance not found Thread-Index: AQHVV+mCbX2LRLxJ3UmpKnZzQ5/iYacFGyuAgACHE9A= Date: Wed, 21 Aug 2019 14:02:53 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D161526C8F@SHSMSX104.ccr.corp.intel.com> References: <20190821062659.2808-1-bob.c.feng@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E4D954A@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4D954A@SHSMSX104.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWRkYTllYjEtOTRlNy00MmE0LWEyMjItNmM3OWQyOGI5MDVjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQlFmckNFZTM2SEVZUDhueHZIQlwvTWF0bkUrOUV6akVid3RTMW01VTF6U1ZXTVJvalhtT2dQbzJJengxUXp1UEgifQ== x-ctpclassification: CTP_NT 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: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yes. I'll double check this patch. Thanks, Bob -----Original Message----- From: Gao, Liming=20 Sent: Wednesday, August 21, 2019 9:59 PM To: Feng, Bob C ; devel@edk2.groups.io Subject: RE: [Patch][edk2-stable201908] BaseTools: Incorrect error message = for library instance not found Bob: After I apply this patch, I will meet with build failure to build -p MdeP= kg\MdePkg.dsc. Can you help check it? Thanks Liming > -----Original Message----- > From: Feng, Bob C > Sent: Wednesday, August 21, 2019 2:27 PM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Gao, Liming=20 > > Subject: [Patch][edk2-stable201908] BaseTools: Incorrect error message=20 > for library instance not found >=20 > BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2099 > This is a regression issue introduced by commit e8449e. >=20 > This patch is to fix this issue. >=20 > Signed-off-by: Bob Feng > Cc: Liming Gao > --- > BaseTools/Source/Python/AutoGen/DataPipe.py | 2 +- > BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 2 +- > BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | 4 +++- =20 > BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 3 ++- > 4 files changed, 7 insertions(+), 4 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/DataPipe.py=20 > b/BaseTools/Source/Python/AutoGen/DataPipe.py > index 2ca4f9ff4a..8b8cfd1c51 100755 > --- a/BaseTools/Source/Python/AutoGen/DataPipe.py > +++ b/BaseTools/Source/Python/AutoGen/DataPipe.py > @@ -87,11 +87,11 @@ class MemoryDataPipe(DataPipe): > #Module's Library Instance > ModuleLibs =3D {} > libModules =3D {} > for m in PlatformInfo.Platform.Modules: > module_obj =3D BuildDB.BuildObject[m,PlatformInfo.Arch,Platf= ormInfo.BuildTarget,PlatformInfo.ToolChain] > - Libs =3D GetModuleLibInstances(module_obj, PlatformInfo.Plat= form, BuildDB.BuildObject, > PlatformInfo.Arch,PlatformInfo.BuildTarget,PlatformInfo.ToolChain) > + Libs =3D GetModuleLibInstances(module_obj,=20 > + PlatformInfo.Platform, BuildDB.BuildObject, > PlatformInfo.Arch,PlatformInfo.BuildTarget,PlatformInfo.ToolChain,Platfor= mInfo.MetaFile,EdkLogger) > for lib in Libs: > try: >=20 > libModules[(lib.MetaFile.File,lib.MetaFile.Root,lib.Arch,lib.MetaFile.Pat= h)].append((m.File,m.Root,module_obj.Arch,m.Path)) > except: > =20 > libModules[(lib.MetaFile.File,lib.MetaFile.Root,lib.Arch,lib.MetaFile. > Path)] =3D [(m.File,m.Root,module_obj.Arch,m.Path)] > diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py=20 > b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > index dd629ba2fa..565424a95e 100644 > --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > @@ -1087,11 +1087,11 @@ class PlatformAutoGen(AutoGen): > def GetAllModuleInfo(self,WithoutPcd=3DTrue): > ModuleLibs =3D set() > for m in self.Platform.Modules: > module_obj =3D self.BuildDatabase[m,self.Arch,self.BuildTarg= et,self.ToolChain] > if not bool(module_obj.LibraryClass): > - Libs =3D GetModuleLibInstances(module_obj, self.Platform= , self.BuildDatabase, self.Arch,self.BuildTarget,self.ToolChain) > + Libs =3D GetModuleLibInstances(module_obj,=20 > + self.Platform, self.BuildDatabase, > self.Arch,self.BuildTarget,self.ToolChain,self.MetaFile,EdkLogger) > else: > Libs =3D [] >=20 > ModuleLibs.update(=20 > set([(l.MetaFile.File,l.MetaFile.Root,l.MetaFile.Path,l.MetaFile.BaseN > ame,l.MetaFile.OriginalPath,l.Arch,True) for l in > Libs])) > if WithoutPcd and module_obj.PcdIsDriver: > continue > diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py=20 > b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py > index ea0d8f8bfb..2494267472 100644 > --- a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py > @@ -246,11 +246,13 @@ class WorkspaceAutoGen(AutoGen): > if BuildData.MetaFile.Ext =3D=3D '.inf' and str(BuildDat= a) in Platform.Modules : > Libs.extend(GetModuleLibInstances(BuildData, Platfor= m, > self.BuildDatabase, > Arch, > self.BuildTarget, > - self.ToolChain > + self.ToolChain, > + self.Platform.MetaFile, > + EdkLogger > )) > for BuildData in list(self.BuildDatabase._CACHE_.values()): > if BuildData.Arch !=3D Arch: > continue > if BuildData.MetaFile.Ext =3D=3D '.inf': > diff --git a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py=20 > b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py > index 76583f46e5..cbbd550dbd 100644 > --- a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py > +++ b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py > @@ -13,10 +13,11 @@ from .BuildClassObject import LibraryClassObject =20 > import Common.GlobalData as GlobalData from=20 > Workspace.BuildClassObject import StructurePcd from=20 > Common.BuildToolError import RESOURCE_NOT_AVAILABLE from=20 > Common.BuildToolError import OPTION_MISSING from=20 > Common.BuildToolError import BUILD_ERROR > +import Common.EdkLogger as EdkLogger >=20 > class OrderedListDict(OrderedDict): > def __init__(self, *args, **kwargs): > super(OrderedListDict, self).__init__(*args, **kwargs) > self.default_factory =3D list > @@ -83,11 +84,11 @@ def GetDeclaredPcd(Platform, BuildDatabase, Arch,=20 > Target, Toolchain, additionalP # @param Target: Current target # =20 > @param Toolchain: Current toolchain # @retval: List of dependent=20 > libraries which are InfBuildData instances # def=20 > GetLiabraryInstances(Module, Platform, BuildDatabase, Arch, Target, Toolc= hain): > - return GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, = Target, Toolchain) > + return GetModuleLibInstances(Module, Platform, BuildDatabase,=20 > + Arch, Target, Toolchain,Platform.MetaFile,EdkLogger) >=20 > def GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target,= Toolchain, FileName =3D '', EdkLogger =3D None): > if Module.LibInstances: > return Module.LibInstances > ModuleType =3D Module.ModuleType > -- > 2.20.1.windows.1