Bug 5835 - wic doesn't abort when it can't find mcopy
Summary: wic doesn't abort when it can't find mcopy
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: deployment (show other bugs)
Version: 1.6
Hardware: All Multiple
: Medium normal
Target Milestone: 1.6 M3
Assignee: Tom Zanussi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-02-17 23:41 UTC by Ross Burton
Modified: 2014-02-20 21:16 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

Note You need to log in before you can comment on or make changes to this bug.
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.