summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch')
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch42
1 files changed, 0 insertions, 42 deletions
diff --git a/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch b/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch
deleted file mode 100644
index bd23c458..00000000
--- a/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From 6eace398072a62e74f10f412ffadfe51b7402395 Mon Sep 17 00:00:00 2001
2From: Simon Glass <sjg@chromium.org>
3Date: Sat, 24 Aug 2019 07:22:42 -0600
4Subject: [PATCH] patman: Update command.Run() to handle failure better
5
6At present tools are not expected to fail. If they do an exception is
7raised but there is no detail about what went wrong. This makes it hard
8to debug if something does actually go wrong.
9
10Fix this by outputting both stderr and stdout on failure.
11
12Upstream-Status: Backport
13
14Signed-off-by: Simon Glass <sjg@chromium.org>
15---
16 tools/patman/tools.py | 10 ++++++++--
17 1 file changed, 8 insertions(+), 2 deletions(-)
18
19diff --git a/tools/patman/tools.py b/tools/patman/tools.py
20index 97441ca796..0952681579 100644
21--- a/tools/patman/tools.py
22+++ b/tools/patman/tools.py
23@@ -205,8 +205,14 @@ def Run(name, *args):
24 if tool_search_paths:
25 env = dict(os.environ)
26 env['PATH'] = ':'.join(tool_search_paths) + ':' + env['PATH']
27- return command.Run(name, *args, capture=True, capture_stderr=True,
28- env=env)
29+ all_args = (name,) + args
30+ result = command.RunPipe([all_args], capture=True, capture_stderr=True,
31+ env=env, raise_on_error=False)
32+ if result.return_code:
33+ raise Exception("Error %d running '%s': %s" %
34+ (result.return_code,' '.join(all_args),
35+ result.stderr))
36+ return result.stdout
37 except:
38 if env and not PathHasFile(env['PATH'], name):
39 msg = "Please install tool '%s'" % name
40--
412.24.0
42