Bug 10816

Summary: wic: errors from exec_cmd don't show the error output
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Christopher Larson <kergoth>
Component: Scripts and ToolsAssignee: Ed Bartosh <eduard.bartosh>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: richard.purdie, ross.burton
Version: unspecified   
Target Milestone: 2.3 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on: 10815    
Bug Blocks:    
Attachments:
Description Flags
v1 none

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