Bug 10816 - wic: errors from exec_cmd don't show the error output
Summary: wic: errors from exec_cmd don't show the error output
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.3 M2
Assignee: Ed Bartosh
QA Contact:
URL:
Whiteboard:
Depends on: 10815
Blocks:
  Show dependency tree
 
Reported: 2016-12-15 16:54 UTC by Christopher Larson
Modified: 2017-01-18 16:09 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
v1 (1.32 KB, text/plain)
2016-12-18 11:39 UTC, Ed Bartosh
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Larson 2016-12-15 16:54:09 UTC
See this logic:

      if out:
          msger.debug('"%s" output: %s' % (args[0], out))

      if ret != 0:
S>        msger.error("exec_cmd: '%s' returned '%s' instead of 0" % \
                      (cmd_and_args, ret))

So it fails to show stdout/stderr to the user on failure unless the user passed -D to wic. This is not useful. Also, all of this runner/exec code duplicates the other wrapping of subprocess done elsewhere in bitbake and oe-core.
Comment 1 Ed Bartosh 2016-12-16 21:16:30 UTC
Regarding code duplicates: Thanks for pointing out to it. I'm going to address it in refactoring bug 10619.
Comment 2 Ed Bartosh 2016-12-18 11:39:06 UTC
Created attachment 3564 [details]
v1

I fixed the issue, but it unveiled another bug, brought by your latest change. I'll provide more details in the bug 10815.
Comment 3 Ed Bartosh 2017-01-10 18:19:40 UTC
patch has been sent for review: http://lists.openembedded.org/pipermail/openembedded-core/2017-January/130949.html
Comment 4 Ed Bartosh 2017-01-18 16:09:14 UTC
The fix has been accepted to poky master