image.py, rootfs.py, package_manager.py: redirect stderr to stdout when calling check_output()
cover image.py, rootfs.py, package_manager.py: redirect stderr to stdout when calling check_output()
The following changes since commit 54c2e993ec129563c7ae9f3fdee74ab60da28698:
bsps: update H/W reference boards to v3.10.32 (2014-03-02 17:25:30 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib lpalcu/b5902_errors_not_displayed
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=lpalcu/b5902_errors_not_displayed
Laurentiu Palcu (1):
image.py, rootfs.py, package_manager.py: redirect stderr to stdout
when calling check_output()
meta/lib/oe/image.py | 2 +- meta/lib/oe/package_manager.py | 48 +++++++++++++++++++++------------------- meta/lib/oe/rootfs.py | 2 +- 3 files changed, 27 insertions(+), 25 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/1 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]
--- meta/lib/oe/image.py | 2 +- meta/lib/oe/package_manager.py | 48 +++++++++++++++++++++------------------- meta/lib/oe/rootfs.py | 2 +- 3 files changed, 27 insertions(+), 25 deletions(-)
meta/lib/oe/image.py +1 -1
@@ -11,7 +11,7 @@ def generate_image(arg): (type, create_img_cmd)) try: - subprocess.check_output(create_img_cmd) + subprocess.check_output(create_img_cmd, stderr=subprocess.STDOUT) except subprocess.CalledProcessError as e: return("Error: The image creation script '%s' returned %d:\n%s" % (e.cmd, e.returncode, e.output))
meta/lib/oe/package_manager.py +25 -23
186 lines not on this page · raw message
meta/lib/oe/rootfs.py +1 -1
@@ -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))
Signature · 1 line
1.7.9.5