From: Yunhua Feng Date: Fri, 18 Dec 2020 03:07:50 +0000 (+0800) Subject: BaseTools: Correct report the line number in INF file issue X-Git-Tag: edk2-stable202102~265 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=b6e360874f4da1eb2ad82dac00938d1286741884;p=mirror_edk2.git BaseTools: Correct report the line number in INF file issue REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3127 If one protocol is not found in package dec file, Build will report the error message that module.inf(-1): error 4000: Value of Protocol [gXxxProtocolGuid] is not found under [Protocols] section in MdePkg.dec. Here, -1 should be the line number of this protocol in module INF file. Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Yunhua Feng Reviewed-by: Liming Gao Reviewed-by: Bob Feng --- diff --git a/BaseTools/Source/Python/Workspace/MetaFileTable.py b/BaseTools/Source/Python/Workspace/MetaFileTable.py index 20cb80e36e..bebf9062e8 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileTable.py +++ b/BaseTools/Source/Python/Workspace/MetaFileTable.py @@ -154,7 +154,7 @@ class ModuleTable(MetaFileTable): if BelongsToItem is not None: result = [item for item in result if item[7] == BelongsToItem] - result = [ [r[2],r[3],r[4],r[5],r[6],r[0],r[9]] for r in result ] + result = [ [r[2],r[3],r[4],r[5],r[6],r[0],r[8]] for r in result ] return result ## Python class representation of table storing package data