Bug 7042

Summary: wic: can't find rootfs-dir if image was build with rm_work enabled
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Chris Moore <moorecr3>
Component: deploymentAssignee: Ed Bartosh <eduard.bartosh>
Status: VERIFIED NOTABUG QA Contact: Daniel Istrate <daniel.alexandrux.istrate>
Severity: normal    
Priority: Medium CC: bogdanx.a.voiculescu
Version: unspecified   
Target Milestone: 1.9   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Chris Moore 2014-12-08 17:26:20 UTC
bitbake core-image-full-cmdline
wic create mkefidisk -e core-image-full-cmdline

Fails with "The artifact that couldn't be found was rootfs-dir".

Removing INHERIT += "rm_work" from local.conf and rebuilding the image allows wic to complete.
Comment 1 Ed Bartosh 2015-04-04 15:16:27 UTC
wic uses artifacts produced by bitbake build by design. In particular, rootfs is used from workdir, e.g. tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs. It's also explained in documentation: tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs this way:

You need to have the build artifacts already available, which typically means that you must have already created an image using the Openembedded build system (e.g. core-image-minimal). While it might seem redundant to generate an image in order to create an image using wic, the current version of wic requires the artifacts in the form generated by the build system.

Removing workdir obvously causes wic to fail because it can't find roofts.
The only thing we can do about it for now is to make an error message more explanatory, i.e. to add info about usage of rm_work task being possible reason of failure. However, I personally don't think it makes sense as it's already explained in documentation.
Comment 2 Ed Bartosh 2015-04-04 15:18:31 UTC
Sorry, I put wrong link to documentation in previous comment. Here is the right one: http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#wic-requirements
Comment 3 Ed Bartosh 2015-04-08 10:42:36 UTC
Resolving as NOTABUG according to my previous explanations.
Comment 4 Daniel Istrate 2015-09-09 10:42:27 UTC
As Ed previously specified this is by design.