diff options
author | Ross Burton <ross.burton@intel.com> | 2017-09-04 21:13:17 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-11 17:30:09 +0100 |
commit | 87110e971c548d9d3eb7296ea6772d18e0226e53 (patch) | |
tree | fc00f499df672eff538065f6611e7a2e2f33e076 /meta/lib | |
parent | 0fae16b67542c59b059aa359146c38040785f200 (diff) | |
download | openembedded-core-87110e971c548d9d3eb7296ea6772d18e0226e53.tar.gz openembedded-core-87110e971c548d9d3eb7296ea6772d18e0226e53.tar.bz2 openembedded-core-87110e971c548d9d3eb7296ea6772d18e0226e53.zip |
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.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/rootfs.py | 7 |
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): bb.note("> Executing %s intercept ..." % script) try: - subprocess.check_output(script_full) + output = subprocess.check_output(script_full, stderr=subprocess.STDOUT) + if output: bb.note(output.decode("utf-8")) except subprocess.CalledProcessError as e: - bb.warn("The postinstall intercept hook '%s' failed (exit code: %d)! See log for details! (Output: %s)" % - (script, e.returncode, e.output)) + bb.warn("The postinstall intercept hook '%s' failed, details in log.do_rootfs" % script) + bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8"))) with open(script_full) as intercept: registered_pkgs = None |