Reviewed-by: Liming Gao <liming....@intel.com> >-----Original Message----- >From: Feng, Bob C >Sent: Friday, November 16, 2018 10:12 AM >To: edk2-devel@lists.01.org >Cc: Gao, Liming <liming....@intel.com>; Carsey, Jaben ><jaben.car...@intel.com> >Subject: [Patch] BaseTools: Fix the problem using FILE_GUID override in .dsc > >https://bugzilla.tianocore.org/show_bug.cgi?id=1330 > >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 <bob.c.f...@intel.com> >Cc: Liming Gao <liming....@intel.com> >Cc: Jaben Carsey <jaben.car...@intel.com> >--- > 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 = PathClass(NormPath(ffsInf.InfFileName), >GenFdsGlobalVariable.WorkSpaceDir).Validate() > if ErrorCode != 0: > EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo) > >- if not ffsInf.InfFileName in self.Profile.InfList: >- self.Profile.InfList.append(ffsInf.InfFileName) >+ NewFileName = ffsInf.InfFileName >+ if ffsInf.OverrideGuid: >+ NewFileName = >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 = GetRealFileLine(self.FileName, > self.CurrentLineNumber) > self.Profile.InfFileLineList.append(FileLineTuple) > if ffsInf.UseArch: > if ffsInf.UseArch not in self.Profile.InfDict: > self.Profile.InfDict[ffsInf.UseArch] = > [ffsInf.InfFileName] >@@ -4344,12 +4348,16 @@ class FdfParser: > #check for file path > ErrorCode, ErrorInfo = PathClass(NormPath(ffsInf.InfFileName), >GenFdsGlobalVariable.WorkSpaceDir).Validate() > if ErrorCode != 0: > EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo) > >- if not ffsInf.InfFileName in self.Profile.InfList: >- self.Profile.InfList.append(ffsInf.InfFileName) >+ NewFileName = ffsInf.InfFileName >+ if ffsInf.OverrideGuid: >+ NewFileName = >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 = GetRealFileLine(self.FileName, > self.CurrentLineNumber) > self.Profile.InfFileLineList.append(FileLineTuple) > if ffsInf.UseArch: > if ffsInf.UseArch not in self.Profile.InfDict: > self.Profile.InfDict[ffsInf.UseArch] = > [ffsInf.InfFileName] >-- >2.19.1.windows.1
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel