BaseTools: Fix a bug when apply patches to SEC use the FILE_GUID override

Fix a bug when applying patches to SEC modules that use the FILE_GUID
override. Since a temp dir is used when FILE_GUID override is used, the
INF file path comparisons fail. The fix is to capture the real INF file
path comparisons instead of using the temp dir path to the INF.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19142 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Yonghong Zhu 2015-12-07 09:08:05 +00:00 committed by yzhu52
parent 2ff9e57574
commit 4aa9826def
1 changed files with 4 additions and 1 deletions

View File

@ -174,6 +174,10 @@ class FfsInfStatement(FfsInfStatementClassObject):
if ErrorCode != 0:
EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)
#
# Cache lower case version of INF path before processing FILE_GUID override
#
InfLowerPath = str(PathClassObj).lower()
if self.OverrideGuid:
PathClassObj = ProcessDuplicatedInf(PathClassObj, self.OverrideGuid, GenFdsGlobalVariable.WorkSpaceDir)
if self.CurrentArch != None:
@ -241,7 +245,6 @@ class FfsInfStatement(FfsInfStatementClassObject):
continue
# Override Patchable PCD value by the value from DSC
PatchPcd = None
InfLowerPath = str(PathClassObj).lower()
if InfLowerPath in DscModules and PcdKey in DscModules[InfLowerPath].Pcds:
PatchPcd = DscModules[InfLowerPath].Pcds[PcdKey]
elif PcdKey in Platform.Pcds: