Show the filename next to the node path in missing blob help messages, also show a generic missing blob message when there was no help message for the help tag.
Signed-off-by: Jonas Karlman <jo...@kwiboo.se> --- tools/binman/control.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/binman/control.py b/tools/binman/control.py index b5ede60c1cde..a5ff1cb56245 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -105,8 +105,8 @@ def _ReadMissingBlobHelp(): _FinishTag(tag, msg, result) return result -def _ShowBlobHelp(path, text): - tout.warning('%s:' % path) +def _ShowBlobHelp(path, text, fname): + tout.warning('%s (%s):' % (path, fname)) for line in text.splitlines(): tout.warning(' %s' % line) tout.warning('') @@ -126,10 +126,17 @@ def _ShowHelpForMissingBlobs(missing_list): tags = entry.GetHelpTags() # Show the first match help message + shown_help = False for tag in tags: if tag in missing_blob_help: - _ShowBlobHelp(entry._node.path, missing_blob_help[tag]) + _ShowBlobHelp(entry._node.path, missing_blob_help[tag], + entry.GetDefaultFilename()) + shown_help = True break + # Or a generic help message + if not shown_help: + _ShowBlobHelp(entry._node.path, "Missing blob", + entry.GetDefaultFilename()) def GetEntryModules(include_testing=True): """Get a set of entry class implementations -- 2.39.2