<?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>7114</bug_id>
          
          <creation_ts>2015-01-06 14:18:30 +0000</creation_ts>
          <short_desc>rm_work for rootfs skipping the RM_WORK_EXCLUDE variable,  results in a wic images with empty rootfs</short_desc>
          <delta_ts>2015-01-08 09:27:01 +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>deployment</component>
          <version>1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>arm</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Toby Flynn">campingandskiing</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>philip</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>47748</commentid>
    <comment_count>0</comment_count>
    <who name="Toby Flynn">campingandskiing</who>
    <bug_when>2015-01-06 14:18:30 +0000</bug_when>
    <thetext>With version 1.7 adding RM_WORK_EXCLUDE +=&quot;image-name&quot;  would leave the rootfs in the work area fully populated and wic would use it to build an image.  After updating to master I began getting empty rootfs images generated by wic.  

I removed the patch 
http://git.openembedded.org/openembedded-core/commit/meta/classes/rm_work.bbclass?id=6bf06d80c2ce03dfdedac5ad8cf42ef8e36b0ecb and then I received fully populated wic images again.

With the patch in place rootfs contents are removed after performing bitbake image-name. The empty rootfs directory is left so wic will succeed in building an image with an empty rootfs and not report an error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47751</commentid>
    <comment_count>1</comment_count>
    <who name="Phlip Balister">philip</who>
    <bug_when>2015-01-06 14:44:16 +0000</bug_when>
    <thetext>This change is also in dizzy now and broke some stuff I had running.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47768</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-07 16:22:10 +0000</bug_when>
    <thetext>diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index 7b1ec17..e68d02a 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -110,3 +110,11 @@ rm_work_rootfs () {
 }
 rm_work_rootfs[cleandirs] = &quot;${WORKDIR}/rootfs&quot;
 
+python () {
+    # If the recipe name is in the RM_WORK_EXCLUDE, skip the recipe.
+    excludes = (d.getVar(&quot;RM_WORK_EXCLUDE&quot;, True) or &quot;&quot;).split()
+    pn = d.getVar(&quot;PN&quot;, True)
+    if pn in excludes:
+        d.delVarFlag(&apos;rm_work_rootfs&apos;, &apos;cleandirs&apos;)
+        d.delVarFlag(&apos;rm_work_populatesdk&apos;, &apos;cleandirs&apos;)
+}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47780</commentid>
    <comment_count>3</comment_count>
    <who name="Phlip Balister">philip</who>
    <bug_when>2015-01-07 21:45:11 +0000</bug_when>
    <thetext>That patch resolved the problem for me. Can we get this into dizzy ASAP?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47781</commentid>
    <comment_count>4</comment_count>
    <who name="Toby Flynn">campingandskiing</who>
    <bug_when>2015-01-07 21:59:52 +0000</bug_when>
    <thetext>This patch worked for me. I verified a correct image is generated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47788</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-08 09:27:01 +0000</bug_when>
    <thetext>Fixed in master: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=2aa210cbc51df18e74eb04ece9ec5cd29057d2c2

and dizzy: http://git.yoctoproject.org/cgit.cgi/poky/commit/?h=dizzy&amp;id=e13f2681b75fd83aa3a1c823ad1c09faed0d6ae3</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>