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.93, mailfrom: liming.gao@intel.com) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by groups.io with SMTP; Wed, 21 Aug 2019 06:58:51 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Aug 2019 06:58:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,412,1559545200"; d="scan'208";a="181035711" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga003.jf.intel.com with ESMTP; 21 Aug 2019 06:58:50 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 21 Aug 2019 06:58:49 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 21 Aug 2019 06:58:49 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 21 Aug 2019 06:58:49 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.112]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.163]) with mapi id 14.03.0439.000; Wed, 21 Aug 2019 21:58:48 +0800 From: "Liming Gao" To: "Feng, Bob C" , "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+mCI/XUpF3biE2jqiCdCLmuHKcFoQrQ Date: Wed, 21 Aug 2019 13:58:47 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4D954A@SHSMSX104.ccr.corp.intel.com> References: <20190821062659.2808-1-bob.c.feng@intel.com> In-Reply-To: <20190821062659.2808-1-bob.c.feng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWRkYTllYjEtOTRlNy00MmE0LWEyMjItNmM3OWQyOGI5MDVjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQlFmckNFZTM2SEVZUDhueHZIQlwvTWF0bkUrOUV6akVid3RTMW01VTF6U1ZXTVJvalhtT2dQbzJJengxUXp1UEgifQ== 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 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 > Subject: [Patch][edk2-stable201908] BaseTools: Incorrect error message fo= r 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 +++- > BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 3 ++- > 4 files changed, 7 insertions(+), 4 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/DataPipe.py b/BaseTools/Sour= ce/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, PlatformInfo.Plat= form, 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: > 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 b/BaseToo= ls/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, self.Platform= , self.BuildDatabase, > self.Arch,self.BuildTarget,self.ToolChain,self.MetaFile,EdkLogger) > else: > Libs =3D [] >=20 > ModuleLibs.update( set([(l.MetaFile.File,l.MetaFile.Root,l.MetaFile.Path,= l.MetaFile.BaseName,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 b/BaseTo= ols/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 b/BaseT= ools/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 > import Common.GlobalData as GlobalData > from Workspace.BuildClassObject import StructurePcd > from Common.BuildToolError import RESOURCE_NOT_AVAILABLE > from Common.BuildToolError import OPTION_MISSING > from 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, Tar= get, Toolchain, additionalP > # @param Target: Current target > # @param Toolchain: Current toolchain > # @retval: List of dependent libraries which are InfBuildData instances > # > def GetLiabraryInstances(Module, Platform, BuildDatabase, Arch, Target, = Toolchain): > - return GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, = Target, Toolchain) > + return GetModuleLibInstances(Module, Platform, BuildDatabase, 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