Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | From f742da8b3913f4818d3f419117076afe62f4dbf4 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Wed, 5 Sep 2018 16:46:52 +0200 |
| 4 | Subject: [PATCH] giscanner: ignore error return codes from ldd-wrapper |
| 5 | |
| 6 | prelink-rtld, which we use instead of ldd returns 127 when it can't find a library. |
| 7 | It is not an error per se, but it breaks subprocess.check_output(). |
| 8 | |
| 9 | Upstream-Status: Inappropriate [oe-core specific] |
| 10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 11 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 12 | --- |
| 13 | giscanner/shlibs.py | 2 +- |
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 15 | |
| 16 | diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 17 | index d67df95..80352a6 100644 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 18 | --- a/giscanner/shlibs.py |
| 19 | +++ b/giscanner/shlibs.py |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 20 | @@ -102,7 +102,7 @@ def _resolve_non_libtool(options, binary, libraries): |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 21 | args.extend(['otool', '-L', binary.args[0]]) |
| 22 | else: |
| 23 | args.extend(['ldd', binary.args[0]]) |
| 24 | - output = subprocess.check_output(args) |
| 25 | + output = subprocess.run(args, check=False, stdout=subprocess.PIPE).stdout |
| 26 | if isinstance(output, bytes): |
| 27 | output = output.decode("utf-8", "replace") |
| 28 | |