<?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>8910</bug_id>
          
          <creation_ts>2016-01-12 14:51:42 +0000</creation_ts>
          <short_desc>Toaster builds fail at the rootfs stage</short_desc>
          <delta_ts>2016-01-28 11:24:57 +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>Toaster</product>
          <component>toaster</component>
          <version>2.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Belen Barros Pena">belen.barros.pena</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>alexandru.costinx.roman</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>brian.avery</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>stanciux.mihail</cc>
          
          <qa_contact name="Alexandru Roman">alexandru.costinx.roman</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57746</commentid>
    <comment_count>0</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2016-01-12 14:51:42 +0000</bug_when>
    <thetext>Found in master:1724ffd32d1c169a2de66f2cb88ba18c56da6146

After the recent changes to the do_rootfs task, Toaster builds fail. The errors shown are:

No such task: do_image_jffs2
No such task: do_image_ext3

According to RP: &quot;It appears that the way toaster sets IMAGE_FSTYPES, its getting set too late for the anonymous python code which now processes that variable&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57751</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-01-12 15:42:04 +0000</bug_when>
    <thetext>The problem is that toaster sets IMAGEFS_TYPES into the server/cooker with setVariable, however when workers are spawned as new processes, they don&apos;t get this updated variable and see the original value.

This means that there is inconsistency between the cooker/server and the workers and the workers then complain that the task doesn&apos;t exist. The change that triggers this is that the tasks are created by anonymous python code which processes IMAGE_FSTYPES now. If the value isn&apos;t in IMAGE_FSTYPES, the task doesn&apos;t exist.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57752</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-01-12 15:48:49 +0000</bug_when>
    <thetext>Just to illustrate/confirm the problem and how it can be worked around, this patch does &apos;resolve&apos; the issue:

diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index 3df783b..8340d42 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -202,6 +202,7 @@ def fork_off_task(worker, cfg, data, workerdata, fn, task, taskname, appends, ta
             data.setVar(&quot;BUILDNAME&quot;, workerdata[&quot;buildname&quot;])
             data.setVar(&quot;DATE&quot;, workerdata[&quot;date&quot;])
             data.setVar(&quot;TIME&quot;, workerdata[&quot;time&quot;])
+            data.setVar(&quot;IMAGE_FSTYPES&quot;, workerdata[&quot;imagefstypes&quot;])
             bb.parse.siggen.set_taskdata(workerdata[&quot;sigdata&quot;])
             ret = 0
             try:
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index f78a3b1..a647e7e 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -910,6 +910,7 @@ class RunQueue:
             &quot;buildname&quot; : self.cfgData.getVar(&quot;BUILDNAME&quot;, True),
             &quot;date&quot; : self.cfgData.getVar(&quot;DATE&quot;, True),
             &quot;time&quot; : self.cfgData.getVar(&quot;TIME&quot;, True),
+            &quot;imagefstypes&quot; : self.cfgData.getVar(&quot;IMAGE_FSTYPES&quot;, True),
         }
 
         worker.stdin.write(&quot;&lt;cookerconfig&gt;&quot; + pickle.dumps(self.cooker.configuration) + &quot;&lt;/cookerconfig&gt;&quot;)


Sadly there is a more fundamental issue in toaster that really needs to get fixed there though and bitbake shouldn&apos;t have to special case IMAGE_FSTYPES.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57756</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-01-12 16:55:19 +0000</bug_when>
    <thetext>Does it mean that Toaster should set variables two ways - by using setVariable call(for cooker) and by writing them into configuration file(for worker)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57757</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-01-12 16:58:36 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Does it mean that Toaster should set variables two ways - by using
&gt; setVariable call(for cooker) and by writing them into configuration file(for
&gt; worker)?

If you set the variables into the configuration files, wouldn&apos;t bitbake pick those up in both cooker and worker?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57758</commentid>
    <comment_count>5</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2016-01-12 17:00:16 +0000</bug_when>
    <thetext>I prefer the configuration files. That way, I can rerun a toaster build from the command line if I&apos;d like to. That ability is part of the reason I wanted the command line and toaster ui approach to coexist :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57898</commentid>
    <comment_count>6</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-01-17 19:48:55 +0000</bug_when>
    <thetext>Started to work on this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57899</commentid>
    <comment_count>7</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-01-17 21:40:43 +0000</bug_when>
    <thetext>Belen, can you try if code in the ed/toaster/builds-fail-at-the-rootfs-stage-8910 fixes this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57903</commentid>
    <comment_count>8</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2016-01-18 08:16:41 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; Belen, can you try if code in the
&gt; ed/toaster/builds-fail-at-the-rootfs-stage-8910 fixes this?

A build of core-image-minimal completed without problems with this branch. So it seems to be working for me. 

Thanks!

Belén</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57904</commentid>
    <comment_count>9</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-01-18 09:28:54 +0000</bug_when>
    <thetext>Sent patch for review to toaster ml: https://lists.yoctoproject.org/pipermail/toaster/2016-January/003701.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57977</commentid>
    <comment_count>10</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-01-20 09:43:48 +0000</bug_when>
    <thetext>The fix got merged into bitbake master: http://cgit.openembedded.org/bitbake/commit/?id=3c2c269dbbbd9a56bd1d0cb4de676baaf3b7ce88</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58294</commentid>
    <comment_count>11</comment_count>
    <who name="Alexandru Roman">alexandru.costinx.roman</who>
    <bug_when>2016-01-28 11:24:57 +0000</bug_when>
    <thetext>Verified on master: 3d2c0f5902cacf9d8544bf263b51ef0dd1a7218c</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>