From 85f3866bc38dc95ddae25b3c0dfe85a15e6c4a6a Mon Sep 17 00:00:00 2001 From: Joey Vagedes Date: Mon, 27 Nov 2023 13:40:53 -0800 Subject: [PATCH] buildreport_parser: Add Depex section parsing Updates the buildreport parser to also parse the depex section instead of skipping it. --- .../uefi/edk2/parsers/buildreport_parser.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/edk2toollib/uefi/edk2/parsers/buildreport_parser.py b/edk2toollib/uefi/edk2/parsers/buildreport_parser.py index 7084bb35..5e82170b 100644 --- a/edk2toollib/uefi/edk2/parsers/buildreport_parser.py +++ b/edk2toollib/uefi/edk2/parsers/buildreport_parser.py @@ -48,6 +48,7 @@ def Parse(self): inPcdSection = False inLibSection = False inDepSection = False + inOverallDepex = False nextLineSection = False tokenspace = "" @@ -81,6 +82,11 @@ def Parse(self): elif (line == "Final Dependency Expression (DEPEX) Instructions"): inDepSection = True i += 1 # add additional line to skip the dashed line + elif (line == "Dependency Expression (DEPEX) from INF"): + # For some reason, "Final Dependency Expression (DEPEX) Instructions" does not exist + # For all modules, so we need to check for this as well. + inDepSection = True + inOverallDepex = True else: logging.debug("Unsupported Section: " + line) inPcdSection = False @@ -141,7 +147,13 @@ def Parse(self): line += self._RawContent[i].rstrip() elif (inDepSection): - pass + if line == "Dependency Expression (DEPEX) from INF": + inOverallDepex = True + elif line.startswith("-----"): + inOverallDepex = False + + elif inOverallDepex: + self.Depex += " " + line # not implemented right now else: