Bug 5835

Summary: wic doesn't abort when it can't find mcopy
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: deploymentAssignee: Tom Zanussi <tom.zanussi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: dvhart, tom.zanussi
Version: 1.6   
Target Milestone: 1.6 M3   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2014-02-17 23:41:35 UTC
If the user doesn't have mtools installed the boot filesystem creation doesn't emit any warnings and continues to produce an empty filesystem.

Turning on --debug results in:

Debug: exec_cmd: output for export PATH=/data/yocto-autobuilder/slaves/devkit-world/build/build/tmp/sysroots/x86_64-linux/sbin:PATH=/data/yocto-autobuilder/slaves/devkit-world/build/build/tmp/sysroots/x86_64-linux/usr/sbin:PATH=/data/yocto-autobuilder/slaves/devkit-world/build/build/tmp/sysroots/x86_64-linux/usr/bin:$PATH;mcopy -i /var/tmp/wic/build/boot.img -s /var/tmp/wic/build/hdd/* ::/ (rc = 127): /bin/sh: 1: mcopy: not found
Debug: WARNING: export returned '127' instead of 0

Obviously, that debug should actually be a fatal error.
Comment 1 Tom Zanussi 2014-02-18 15:33:08 UTC
Yes, at minimum I need to audit the code for failures when a tool isn't installed or can't be found.

It would be convenient to use the native tools, but not sure how exactly to do that as wic is meant to be standalone tool outside of the build system and therefore doesn't enter into dependency processing.
Comment 2 Tom Zanussi 2014-02-19 20:56:01 UTC
Fix(es) submitted to OE-core.
Comment 3 Tom Zanussi 2014-02-19 20:57:45 UTC
BTW, I forgot that we actually do use the native commands, it's just that it didn't actually work sometimes because of a couple bogus PATH elements.