public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jonas Karlman <jonas@kwiboo.se>
To: Simon Glass <sjg@chromium.org>,
	Alper Nebi Yasak <alpernebiyasak@gmail.com>
Cc: "Pali Rohár" <pali@kernel.org>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Marek Behún" <kabel@kernel.org>,
	"Quentin Schulz" <quentin.schulz@theobroma-systems.com>,
	"Stefan Herbrechtsmeier" <stefan.herbrechtsmeier@weidmueller.com>,
	u-boot@lists.denx.de, "Jonas Karlman" <jonas@kwiboo.se>
Subject: [PATCH 8/9] binman: Show filename in missing blob help message
Date: Sun, 19 Feb 2023 22:02:06 +0000 (UTC)	[thread overview]
Message-ID: <20230219220158.4160763-9-jonas@kwiboo.se> (raw)
In-Reply-To: <20230219220158.4160763-1-jonas@kwiboo.se>

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 <jonas@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


  parent reply	other threads:[~2023-02-19 22:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-19 22:02 [PATCH 0/9] binman: Show missing blob message when building U-Boot Jonas Karlman
2023-02-19 22:02 ` [PATCH 1/9] binman: Remove redundant SetAllowFakeBlob from blob-ext entry Jonas Karlman
2023-02-21 19:35   ` Simon Glass
2023-03-08 22:17     ` Simon Glass
2023-02-19 22:02 ` [PATCH 2/9] binman: Fix spelling of nodes in code comments Jonas Karlman
2023-02-21 19:35   ` Simon Glass
2023-03-08 22:17     ` Simon Glass
2023-02-19 22:02 ` [PATCH 3/9] binman: Use correct argument name in docstrings Jonas Karlman
2023-02-21 19:35   ` Simon Glass
2023-03-08 22:17     ` Simon Glass
2023-02-19 22:02 ` [PATCH 4/9] binman: Override CheckOptional in fit entry Jonas Karlman
2023-02-21 19:35   ` Simon Glass
2023-02-19 22:02 ` [PATCH 6/9] binman: Mark mkimage entry missing when its subnodes is missing Jonas Karlman
2023-02-21 19:41   ` Simon Glass
2023-02-19 22:02 ` [PATCH 5/9] binman: Implement missing check functions in mkimage entry Jonas Karlman
2023-02-21 19:41   ` Simon Glass
2023-02-19 22:02 ` Jonas Karlman [this message]
2023-02-21 19:41   ` [PATCH 8/9] binman: Show filename in missing blob help message Simon Glass
2023-02-19 22:02 ` [PATCH 7/9] binman: Fix blank line usage for invalid images warning text Jonas Karlman
2023-02-21 19:41   ` Simon Glass
2023-02-19 22:02 ` [PATCH 9/9] Makefile: Show binman missing blob message Jonas Karlman
2023-02-21 19:41   ` Simon Glass
2023-02-21 23:09     ` Tom Rini
2023-02-22 21:20       ` Simon Glass
2023-02-22 21:45         ` Tom Rini
2023-02-22 22:56           ` Simon Glass
2023-03-10 20:49 ` [PATCH 0/9] binman: Show missing blob message when building U-Boot Simon Glass
2023-03-16  7:45   ` Jonas Karlman
2023-03-16 13:48     ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230219220158.4160763-9-jonas@kwiboo.se \
    --to=jonas@kwiboo.se \
    --cc=alpernebiyasak@gmail.com \
    --cc=kabel@kernel.org \
    --cc=pali@kernel.org \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=sjg@chromium.org \
    --cc=stefan.herbrechtsmeier@weidmueller.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox