[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7598/8267] rootfs: improve postinst intercept logging
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 7598/8267] rootfs: improve postinst intercept logging
- Date: Sun, 17 Dec 2017 06:28:23 +0000 (UTC)
commit aa0c24f3514e2ecdec2250aa6bcd37d5e2b573b8
Author: Ross Burton <ross burton intel com>
Date: Mon Sep 4 21:13:17 2017 +0100
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>
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 96591f3..9d4727e 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]