From a820b3f78ebcded07a81da3905c1bcdd4f173a23 Mon Sep 17 00:00:00 2001 From: Laurentiu Palcu Date: Mon, 3 Mar 2014 18:36:39 +0200 Subject: image.py, rootfs.py, package_manager.py: redirect stderr to stdout when calling check_output() If a command executed with subprocess.check_output() fails, the subprocess.CalledProcessError.output contains only STDOUT and the user needs to check the log.do_rootfs to see any other details. This commit forwards stderr to stdout so that, in case of failure, the entire error output will be displayed in terminal. [YOCTO #5902] (From OE-Core rev: 4661f1441429952f30e19cebd93dc42ce31fd868) Signed-off-by: Laurentiu Palcu Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/lib/oe/rootfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/lib/oe/rootfs.py') diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index be0afa6d74..90c0504b31 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -57,7 +57,7 @@ class Rootfs(object): exec_cmd = cmd try: - subprocess.check_output(exec_cmd) + subprocess.check_output(exec_cmd, stderr=subprocess.STDOUT) except subprocess.CalledProcessError as e: return("Command '%s' returned %d:\n%s" % (e.cmd, e.returncode, e.output)) -- cgit v1.2.3-54-g00ecf