0003-ignore-error-return-codes-from-ldd-wrapper.patch 1.2 KB

12345678910111213141516171819202122232425262728
  1. From f742da8b3913f4818d3f419117076afe62f4dbf4 Mon Sep 17 00:00:00 2001
  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. prelink-rtld, which we use instead of ldd returns 127 when it can't find a library.
  6. It is not an error per se, but it breaks subprocess.check_output().
  7. Upstream-Status: Inappropriate [oe-core specific]
  8. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
  9. Signed-off-by: Adam Duskett <aduskett@gmail.com>
  10. ---
  11. giscanner/shlibs.py | 2 +-
  12. 1 file changed, 1 insertion(+), 1 deletion(-)
  13. diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
  14. index d67df95..80352a6 100644
  15. --- a/giscanner/shlibs.py
  16. +++ b/giscanner/shlibs.py
  17. @@ -103,7 +103,7 @@ def _resolve_non_libtool(options, binary, libraries):
  18. args.extend(['otool', '-L', binary.args[0]])
  19. else:
  20. args.extend(['ldd', binary.args[0]])
  21. - output = subprocess.check_output(args)
  22. + output = subprocess.run(args, check=False, stdout=subprocess.PIPE).stdout
  23. if isinstance(output, bytes):
  24. output = output.decode("utf-8", "replace")