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.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Feng, Bob C 2018-11-16 10:12:15 +08:00 committed by Liming Gao
parent 81c6f1dfba
commit 3d3416e892
1 changed files with 13 additions and 5 deletions

View File

@ -24,7 +24,7 @@ from uuid import UUID
from Common.BuildToolError import * from Common.BuildToolError import *
from Common import EdkLogger 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.StringUtils import NormPath, ReplaceMacro
from Common import GlobalData from Common import GlobalData
from Common.Expression import * from Common.Expression import *
@ -2416,8 +2416,12 @@ class FdfParser:
if ErrorCode != 0: if ErrorCode != 0:
EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo) EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)
if not ffsInf.InfFileName in self.Profile.InfList: NewFileName = ffsInf.InfFileName
self.Profile.InfList.append(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) FileLineTuple = GetRealFileLine(self.FileName, self.CurrentLineNumber)
self.Profile.InfFileLineList.append(FileLineTuple) self.Profile.InfFileLineList.append(FileLineTuple)
if ffsInf.UseArch: if ffsInf.UseArch:
@ -4346,8 +4350,12 @@ class FdfParser:
if ErrorCode != 0: if ErrorCode != 0:
EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo) EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)
if not ffsInf.InfFileName in self.Profile.InfList: NewFileName = ffsInf.InfFileName
self.Profile.InfList.append(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) FileLineTuple = GetRealFileLine(self.FileName, self.CurrentLineNumber)
self.Profile.InfFileLineList.append(FileLineTuple) self.Profile.InfFileLineList.append(FileLineTuple)
if ffsInf.UseArch: if ffsInf.UseArch: