summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-09-04 21:13:17 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-11 17:30:28 +0100
commitaa0c24f3514e2ecdec2250aa6bcd37d5e2b573b8 (patch)
tree4978ff4a8ef4cd8ee8b52f47d0e347754d3f1dd9 /meta/lib
parentd27b089fef68252a64ae838cc1dc5b08dd3da009 (diff)
downloadpoky-aa0c24f3514e2ecdec2250aa6bcd37d5e2b573b8.tar.gz
rootfs: improve postinst intercept logging
Ensure we capture stderr, always write the output to the log, and don't be so emotional in the warning message. (From OE-Core rev: 87110e971c548d9d3eb7296ea6772d18e0226e53) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/rootfs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 96591f370e..9d4727e76c 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -302,10 +302,11 @@ class Rootfs(object, metaclass=ABCMeta):
302 bb.note("> Executing %s intercept ..." % script) 302 bb.note("> Executing %s intercept ..." % script)
303 303
304 try: 304 try:
305 subprocess.check_output(script_full) 305 output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)
306 if output: bb.note(output.decode("utf-8"))
306 except subprocess.CalledProcessError as e: 307 except subprocess.CalledProcessError as e:
307 bb.warn("The postinstall intercept hook '%s' failed (exit code: %d)! See log for details! (Output: %s)" % 308 bb.warn("The postinstall intercept hook '%s' failed, details in log.do_rootfs" % script)
308 (script, e.returncode, e.output)) 309 bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8")))
309 310
310 with open(script_full) as intercept: 311 with open(script_full) as intercept:
311 registered_pkgs = None 312 registered_pkgs = None