From bef00bf3f7f2812645c404e9f9a29939f9f52cd2 Mon Sep 17 00:00:00 2001 From: Aiden Park Date: Wed, 10 Jul 2019 15:56:55 -0700 Subject: [PATCH] Fix invalid CfgDataDef generation in multi-level includes This issue happens when a template file includes another files since template dictionary has '!include' line itself instead of its contents. Signed-off-by: Aiden Park --- BootloaderCorePkg/Tools/GenCfgData.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BootloaderCorePkg/Tools/GenCfgData.py b/BootloaderCorePkg/Tools/GenCfgData.py index 5586b72f..1a207d73 100644 --- a/BootloaderCorePkg/Tools/GenCfgData.py +++ b/BootloaderCorePkg/Tools/GenCfgData.py @@ -673,6 +673,9 @@ EndList TemplateName = '' else: if TemplateName: + Match = re.match("^!include\s*(.+)?$", DscLine) + if Match: + continue self._BsfTempDict[TemplateName].append(DscLine) else: