From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ml01.01.org (Postfix) with ESMTP id 974841A1E13 for ; Sun, 7 Aug 2016 19:38:29 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 07 Aug 2016 19:38:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,487,1464678000"; d="scan'208";a="1031458493" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga002.jf.intel.com with ESMTP; 07 Aug 2016 19:38:29 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 7 Aug 2016 19:38:28 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.8]) with mapi id 14.03.0248.002; Mon, 8 Aug 2016 10:38:26 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: Fix the bug when use FILE_GUID override the module in DSC Thread-Index: AQHR7WvVuZ9euSGTlEKR9qEs0eiHTqA+YQag Date: Mon, 8 Aug 2016 02:38:26 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155E60DE@shsmsx102.ccr.corp.intel.com> References: <1470217537-63644-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1470217537-63644-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Fix the bug when use FILE_GUID override the module in DSC X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2016 02:38:29 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Zhu, Yonghong > Sent: Wednesday, August 03, 2016 5:46 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [Patch] BaseTools: Fix the bug when use FILE_GUID override the > module in DSC >=20 > In last commit 2502b73, it doesn't cover the case that in the DSC file > use FILE_GUID to override the module. >=20 > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/AutoGen/AutoGen.py | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py > b/BaseTools/Source/Python/AutoGen/AutoGen.py > index 9c548be..0484a5d 100644 > --- a/BaseTools/Source/Python/AutoGen/AutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py > @@ -328,32 +328,41 @@ class WorkspaceAutoGen(AutoGen): > for fvname in self.FvTargetList: > if fvname.upper() not in self.FdfProfile.FvDict: > EdkLogger.error("build", OPTION_VALUE_INVALID, > "No such an FV in FDF file: %s" % fv= name) >=20 > + # In DSC file may use FILE_GUID to override the module, then= in the > Platform.Modules use FILE_GUIDmodule.inf as key, > + # but the path (self.MetaFile.Path) is the real path > for key in self.FdfProfile.InfDict: > if key =3D=3D 'ArchTBD': > Platform_cache =3D {} > + MetaFile_cache =3D {} > for Arch in self.ArchList: > Platform_cache[Arch] =3D self.BuildDatabase[self= .MetaFile, Arch, > Target, Toolchain] > + MetaFile_cache[Arch] =3D [] > + for Pkey in Platform_cache[Arch].Modules.keys(): > + > MetaFile_cache[Arch].append(Platform_cache[Arch].Modules[Pkey].MetaFi > le) > for Inf in self.FdfProfile.InfDict[key]: > ModuleFile =3D PathClass(NormPath(Inf), GlobalDa= ta.gWorkspace, > Arch) > for Arch in self.ArchList: > - if ModuleFile in Platform_cache[Arch].Module= s: > + if ModuleFile in MetaFile_cache[Arch]: > break > else: > ModuleData =3D self.BuildDatabase[ModuleFile= , Arch, Target, > Toolchain] > if not ModuleData.IsBinaryModule: > EdkLogger.error('build', PARSER_ERROR, "= Module %s NOT > found in DSC file; Is it really a binary module?" % ModuleFile) >=20 > else: > for Arch in self.ArchList: > if Arch =3D=3D key: > Platform =3D self.BuildDatabase[self.MetaFil= e, Arch, Target, > Toolchain] > + MetaFileList =3D [] > + for Pkey in Platform.Modules.keys(): > + MetaFileList.append(Platform.Modules[Pke= y].MetaFile) > for Inf in self.FdfProfile.InfDict[key]: > ModuleFile =3D PathClass(NormPath(Inf), > GlobalData.gWorkspace, Arch) > - if ModuleFile in Platform.Modules: > + if ModuleFile in MetaFileList: > continue > ModuleData =3D self.BuildDatabase[Module= File, Arch, Target, > Toolchain] > if not ModuleData.IsBinaryModule: > EdkLogger.error('build', PARSER_ERRO= R, "Module %s NOT > found in DSC file; Is it really a binary module?" % ModuleFile) >=20 > -- > 2.6.1.windows.1