Reviewed-by: Liming Gao <[email protected]>

> -----Original Message-----
> From: edk2-devel [mailto:[email protected]] On Behalf Of
> Yonghong Zhu
> Sent: Wednesday, May 11, 2016 5:30 PM
> To: [email protected]
> Cc: Gao, Liming <[email protected]>
> Subject: [edk2] [Patch] BaseTools: Fix bug to not mix comment into Asbuilt
> inf Depex section
> 
> 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 <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Yonghong Zhu <[email protected]>
> ---
>  BaseTools/Source/Python/AutoGen/AutoGen.py | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
> b/BaseTools/Source/Python/AutoGen/AutoGen.py
> index ae0f8a6..0664101 100644
> --- a/BaseTools/Source/Python/AutoGen/AutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
> @@ -2810,21 +2810,22 @@ class ModuleAutoGen(AutoGen):
>              InfObj = InfSectionParser.InfSectionParser(Filename)
>              DepexExpresionList = InfObj.GetDepexExpresionList()
>              for DepexExpresion in DepexExpresionList:
>                  for key in DepexExpresion.keys():
>                      Arch, ModuleType = key
> +                    DepexExpr = [x for x in DepexExpresion[key] if not
> str(x).startswith('#')]
>                      # the type of build module is USER_DEFINED.
>                      # All different DEPEX section tags would be copied into 
> the As Built
> INF file
>                      # and there would be separate DEPEX section tags
>                      if self.ModuleType.upper() == SUP_MODULE_USER_DEFINED:
>                          if (Arch.upper() == self.Arch.upper()) and
> (ModuleType.upper() != TAB_ARCH_COMMON):
> -                            DepexList.append({(Arch, ModuleType):
> DepexExpresion[key][:]})
> +                            DepexList.append({(Arch, ModuleType): DepexExpr})
>                      else:
>                          if Arch.upper() == TAB_ARCH_COMMON or \
>                            (Arch.upper() == self.Arch.upper() and \
>                            ModuleType.upper() in [TAB_ARCH_COMMON,
> self.ModuleType.upper()]):
> -                            DepexList.append({(Arch, ModuleType):
> DepexExpresion[key][:]})
> +                            DepexList.append({(Arch, ModuleType): DepexExpr})
> 
>          #the type of build module is USER_DEFINED.
>          if self.ModuleType.upper() == SUP_MODULE_USER_DEFINED:
>              for Depex in DepexList:
>                  for key in Depex.keys():
> --
> 2.6.1.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to