From 4aa9826def3bf9d817e7d245d46886a31de92c15 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Mon, 7 Dec 2015 09:08:05 +0000 Subject: [PATCH] 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 Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19142 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/GenFds/FfsInfStatement.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py index 7b221399b4..864e5be7d9 100644 --- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py @@ -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: -- 2.39.2