From 6ab4c5033af72f102e7935de62e600b7ce247f34 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 23 Jan 2017 17:43:40 +0000 Subject: classes/oeqa: Replace subprocess.check_call() with check_output() If you use subprocess.check_output() the traceback will contain the output when the command fails which is very useful for debugging. There is no good reason not to use this everywhere. (From OE-Core rev: ad750dd1cc9d789abe723daddd098ce41d8547f5) Signed-off-by: Richard Purdie --- meta/lib/oe/rootfs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'meta/lib/oe/rootfs.py') diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 5b842ba46a..9c8a0ebb7e 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -303,10 +303,10 @@ class Rootfs(object, metaclass=ABCMeta): bb.note("> Executing %s intercept ..." % script) try: - subprocess.check_call(script_full) + subprocess.check_output(script_full) except subprocess.CalledProcessError as e: - bb.warn("The postinstall intercept hook '%s' failed (exit code: %d)! See log for details!" % - (script, e.returncode)) + bb.warn("The postinstall intercept hook '%s' failed (exit code: %d)! See log for details! (Output: %s)" % + (script, e.returncode, e.output)) with open(script_full) as intercept: registered_pkgs = None -- cgit v1.2.3-54-g00ecf