]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix a bug when apply patches to SEC use the FILE_GUID override
authorYonghong Zhu <yonghong.zhu@intel.com>
Mon, 7 Dec 2015 09:08:05 +0000 (09:08 +0000)
committeryzhu52 <yzhu52@Edk2>
Mon, 7 Dec 2015 09:08:05 +0000 (09:08 +0000)
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

BaseTools/Source/Python/GenFds/FfsInfStatement.py

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