mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 18:49:32 +02:00
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 <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
7b70586a31
commit
a820b3f78e
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user