<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10637</bug_id>
          
          <creation_ts>2016-11-09 19:03:52 +0000</creation_ts>
          <short_desc>WIC image dependencies are not included in the build</short_desc>
          <delta_ts>2016-12-02 13:21:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>Scripts and Tools</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="brian avery">brian.avery</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68201</commentid>
    <comment_count>0</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2016-11-09 19:03:52 +0000</bug_when>
    <thetext>Goal - Build a wic image from core-image-minimal and directdisk.wks
---
Add to local.conf:
IMAGE_FSTYPES+=&quot;wic wic.bmap&quot;
WKS_FILE=&quot;directdisk.wks&quot;
---
$ bitbake core-image-minimal
wic complains with
| Error: Please build syslinux first
$ bitbake syslinux &amp;&amp; bitbake core-image-minimal

| Error: A native program mkdosfs required to build the image was not found (see details above).
| 
| Please bake it with &apos;bitbake dosfstools-native&apos; and try again.
====
So in total, wic errored out, one at a time, about the following:
syslinux,dosfstools-native,mtools-native,syslinux-native
Once these were all built by hand, wic ran to completion fine.
===
Ideally the image fstypes addition of wic or wic.bmap would add the necessary dependencies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68406</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-11-17 15:50:15 +0000</bug_when>
    <thetext>We&apos;ve had various discussions on this. The dependencies wic needs depend on the contents of the wks file. Currently the user is expected to add the correct dependencies depending on the wks file they are using.

I appreciate that is suboptimal but this is what we get for using another file format for indirection.

I&apos;ll leave this for Ed to comment further on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68539</commentid>
    <comment_count>2</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-11-23 15:42:31 +0000</bug_when>
    <thetext>Richard is right here. There is no easy way to get the list of dependencies except of specifying them explicitly.

In this particular case adding these 3 lines to conf/local.conf worked for me:
WKS_FILE = &quot;directdisk.wks&quot;
IMAGE_FSTYPES += &quot;wic wic.bmap&quot;
do_image_wic[depends] += &quot;syslinux:do_build syslinux-native:do_populate_sysroot mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot&quot;


Probably there is a better way to do it, but the idea is the same - to explicitly add dependencies that wic requires to build particular image.

Thoughts?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68573</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-11-24 14:45:18 +0000</bug_when>
    <thetext>To make building a wic image for qemu machines easier I&apos;ve added WKS_FILE and do_image_wic dependencies into machine configurations:
http://lists.openembedded.org/pipermail/openembedded-core/2016-November/129219.html

So, to enable image building user would only need to add &apos;wic&apos; to IMAGE_FSTYPES</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68810</commentid>
    <comment_count>4</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-12-02 13:21:38 +0000</bug_when>
    <thetext>the patch has been merged to poky master: https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8a00c404ab7717c50bc43d12b78bede1d68c109e</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>