From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D31E12119308A for ; Mon, 19 Nov 2018 16:02:02 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Nov 2018 16:02:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,254,1539673200"; d="scan'208";a="101586171" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 19 Nov 2018 16:02:01 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 19 Nov 2018 16:02:01 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 19 Nov 2018 16:02:01 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.117]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.102]) with mapi id 14.03.0415.000; Tue, 20 Nov 2018 08:01:57 +0800 From: "Gao, Liming" To: "Feng, Bob C" , "edk2-devel@lists.01.org" CC: "Carsey, Jaben" Thread-Topic: [Patch] BaseTools: Fix the problem using FILE_GUID override in .dsc Thread-Index: AQHUfVHXxkBXgzP4LUi2oJeniZU0Z6VXzczw Date: Tue, 20 Nov 2018 00:01:57 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E36ED0F@SHSMSX104.ccr.corp.intel.com> References: <20181116021215.54144-1-bob.c.feng@intel.com> In-Reply-To: <20181116021215.54144-1-bob.c.feng@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 problem using FILE_GUID override in .dsc X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Nov 2018 00:02:03 -0000 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, November 16, 2018 10:12 AM >To: edk2-devel@lists.01.org >Cc: Gao, Liming ; Carsey, Jaben > >Subject: [Patch] BaseTools: Fix the problem using FILE_GUID override in .d= sc > >https://bugzilla.tianocore.org/show_bug.cgi?id=3D1330 > >This patch is going to fix the problem using FILE_GUID override in .dsc. > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: BobCF >Cc: Liming Gao >Cc: Jaben Carsey >--- > BaseTools/Source/Python/GenFds/FdfParser.py | 18 +++++++++++++----- > 1 file changed, 13 insertions(+), 5 deletions(-) > >diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py >b/BaseTools/Source/Python/GenFds/FdfParser.py >index 44cc8f63d0..2fbbad114c 100644 >--- a/BaseTools/Source/Python/GenFds/FdfParser.py >+++ b/BaseTools/Source/Python/GenFds/FdfParser.py >@@ -22,11 +22,11 @@ from re import compile, DOTALL > from string import hexdigits > from uuid import UUID > > from Common.BuildToolError import * > from Common import EdkLogger >-from Common.Misc import PathClass, tdict >+from Common.Misc import PathClass, tdict, ProcessDuplicatedInf > from Common.StringUtils import NormPath, ReplaceMacro > from Common import GlobalData > from Common.Expression import * > from Common.DataType import * > from Common.MultipleWorkspace import MultipleWorkspace as mws >@@ -2414,12 +2414,16 @@ class FdfParser: > #do case sensitive check for file path > ErrorCode, ErrorInfo =3D PathClass(NormPath(ffsInf.InfFileNam= e), >GenFdsGlobalVariable.WorkSpaceDir).Validate() > if ErrorCode !=3D 0: > EdkLogger.error("GenFds", ErrorCode, ExtraData=3DErrorInf= o) > >- if not ffsInf.InfFileName in self.Profile.InfList: >- self.Profile.InfList.append(ffsInf.InfFileName) >+ NewFileName =3D ffsInf.InfFileName >+ if ffsInf.OverrideGuid: >+ NewFileName =3D >ProcessDuplicatedInf(PathClass(ffsInf.InfFileName,GenFdsGlobalVariable.Wo >rkSpaceDir), ffsInf.OverrideGuid, GenFdsGlobalVariable.WorkSpaceDir).Path >+ >+ if not NewFileName in self.Profile.InfList: >+ self.Profile.InfList.append(NewFileName) > FileLineTuple =3D GetRealFileLine(self.FileName, self.Current= LineNumber) > self.Profile.InfFileLineList.append(FileLineTuple) > if ffsInf.UseArch: > if ffsInf.UseArch not in self.Profile.InfDict: > self.Profile.InfDict[ffsInf.UseArch] =3D [ffsInf.InfF= ileName] >@@ -4344,12 +4348,16 @@ class FdfParser: > #check for file path > ErrorCode, ErrorInfo =3D PathClass(NormPath(ffsInf.InfFileNam= e), >GenFdsGlobalVariable.WorkSpaceDir).Validate() > if ErrorCode !=3D 0: > EdkLogger.error("GenFds", ErrorCode, ExtraData=3DErrorInf= o) > >- if not ffsInf.InfFileName in self.Profile.InfList: >- self.Profile.InfList.append(ffsInf.InfFileName) >+ NewFileName =3D ffsInf.InfFileName >+ if ffsInf.OverrideGuid: >+ NewFileName =3D >ProcessDuplicatedInf(PathClass(ffsInf.InfFileName,GenFdsGlobalVariable.Wo >rkSpaceDir), ffsInf.OverrideGuid, GenFdsGlobalVariable.WorkSpaceDir).Path >+ >+ if not NewFileName in self.Profile.InfList: >+ self.Profile.InfList.append(NewFileName) > FileLineTuple =3D GetRealFileLine(self.FileName, self.Current= LineNumber) > self.Profile.InfFileLineList.append(FileLineTuple) > if ffsInf.UseArch: > if ffsInf.UseArch not in self.Profile.InfDict: > self.Profile.InfDict[ffsInf.UseArch] =3D [ffsInf.InfF= ileName] >-- >2.19.1.windows.1