Skip to contentSkip to conversation

tools: rmboard.py: Fix conversion from run_pipe to new helper

PATCH In review Tom Rini 1 participant 2 messages Jun 20, 2025 – Jun 27, 2025

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 tools: rmboard.py: Fix conversion from run_pipe to new helper

When this utility was converted from run_pipe and to the new output helper, two problems were introduced. First, the conversion for calling "git rm -f" wasn't correct. Change this to match the other conversions. Second, the final call we do we need to construct the list because we print that command for the user to use to inspect remaining references.

Fixes 3d094ce28a22 ("u_boot_pylib: Add a function to run a single command")

---
Cc: Simon Glass <[email protected]>

---
 tools/rmboard.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/rmboard.py +3 -3
index 594fd89b8d78..21d68c572618 100755
@@ -112,8 +112,7 @@ def rm_board(board):
                 rm_kconfig_include(fname)
 
     # Remove unwanted files
-    cmd = ['git', 'rm', '-r'] + real
-    stdout = command.output(*cmd, capture=True)
+    stdout = command.output('git', 'rm', '-r', *real)
 
     ## Change the messages as needed
     msg = '''arm: Remove %s board
@@ -130,7 +129,8 @@ Remove it.
 
     # Check if the board is mentioned anywhere else. The user will need to deal
     # with this
-    print(command.output('git', 'grep', '-il', board, raise_on_error=False))
+    cmd = ['git', 'grep', '-il', board]
+    print(command.output(*cmd, raise_on_error=False))
     print(' '.join(cmd))
 
 for board in sys.argv[1:]:
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 8 lines · Tom Rini

When this utility was converted from run_pipe and to the new output helper, two problems were introduced. First, the conversion for calling "git rm -f" wasn't correct. Change this to match the other conversions. Second, the final call we do we need to construct the list because we print that command for the user to use to inspect remaining references.

[...]

Applied to u-boot/next, thanks!

[1/1] tools: rmboard.py: Fix conversion from run_pipe to new helper

      commit: adb6e0bad69dc6beb233576ada1ec8de5f4bde65
Signature · 1 line
Tom