]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix bug to not mix comment into Asbuilt inf Depex section
authorYonghong Zhu <yonghong.zhu@intel.com>
Wed, 11 May 2016 05:46:44 +0000 (13:46 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Mon, 16 May 2016 00:57:51 +0000 (08:57 +0800)
in the generated Asbuilt inf would include the driver's complete
dependency expression, and it would be wrote as comment format. Original
bug is mix the depex expression with real comment in the depex section.
this patch is ignore the real comment, and list the depex expression.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/AutoGen/AutoGen.py

index ae0f8a6e7ab7f2dfe52ef7ce7d163c0eddda5eff..0664101008a8c83f68a7a1e1e9fe57aa82bdc939 100644 (file)
@@ -2812,17 +2812,18 @@ class ModuleAutoGen(AutoGen):
             for DepexExpresion in DepexExpresionList:\r
                 for key in DepexExpresion.keys():\r
                     Arch, ModuleType = key\r
+                    DepexExpr = [x for x in DepexExpresion[key] if not str(x).startswith('#')]\r
                     # the type of build module is USER_DEFINED.\r
                     # All different DEPEX section tags would be copied into the As Built INF file\r
                     # and there would be separate DEPEX section tags\r
                     if self.ModuleType.upper() == SUP_MODULE_USER_DEFINED:\r
                         if (Arch.upper() == self.Arch.upper()) and (ModuleType.upper() != TAB_ARCH_COMMON):\r
-                            DepexList.append({(Arch, ModuleType): DepexExpresion[key][:]})\r
+                            DepexList.append({(Arch, ModuleType): DepexExpr})\r
                     else:\r
                         if Arch.upper() == TAB_ARCH_COMMON or \\r
                           (Arch.upper() == self.Arch.upper() and \\r
                           ModuleType.upper() in [TAB_ARCH_COMMON, self.ModuleType.upper()]):\r
-                            DepexList.append({(Arch, ModuleType): DepexExpresion[key][:]})\r
+                            DepexList.append({(Arch, ModuleType): DepexExpr})\r
         \r
         #the type of build module is USER_DEFINED.\r
         if self.ModuleType.upper() == SUP_MODULE_USER_DEFINED:\r