public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: Fix the problem using FILE_GUID override in .dsc
@ 2018-11-16  2:12 BobCF
  2018-11-20  0:01 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: BobCF @ 2018-11-16  2:12 UTC (permalink / raw)
  To: edk2-devel; +Cc: Liming Gao, Jaben Carsey

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.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jaben Carsey <jaben.carsey@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.WorkSpaceDir), 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.WorkSpaceDir), 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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-20  0:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-16  2:12 [Patch] BaseTools: Fix the problem using FILE_GUID override in .dsc BobCF
2018-11-20  0:01 ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox