diff options
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.patch | 42 |
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 @@ | |||
1 | From 6eace398072a62e74f10f412ffadfe51b7402395 Mon Sep 17 00:00:00 2001 | ||
2 | From: Simon Glass <sjg@chromium.org> | ||
3 | Date: Sat, 24 Aug 2019 07:22:42 -0600 | ||
4 | Subject: [PATCH] patman: Update command.Run() to handle failure better | ||
5 | |||
6 | At present tools are not expected to fail. If they do an exception is | ||
7 | raised but there is no detail about what went wrong. This makes it hard | ||
8 | to debug if something does actually go wrong. | ||
9 | |||
10 | Fix this by outputting both stderr and stdout on failure. | ||
11 | |||
12 | Upstream-Status: Backport | ||
13 | |||
14 | Signed-off-by: Simon Glass <sjg@chromium.org> | ||
15 | --- | ||
16 | tools/patman/tools.py | 10 ++++++++-- | ||
17 | 1 file changed, 8 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/tools/patman/tools.py b/tools/patman/tools.py | ||
20 | index 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 | -- | ||
41 | 2.24.0 | ||
42 | |||