<?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>7733</bug_id>
          
          <creation_ts>2015-05-08 13:17:06 +0000</creation_ts>
          <short_desc>Add an option to execute task for target and all of its dependent targets</short_desc>
          <delta_ts>2017-03-21 01:03:44 +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>BitBake</product>
          <component>bitbake</component>
          <version>1.7</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>Low</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>msm-oss</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <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>50877</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-05-08 13:17:06 +0000</bug_when>
    <thetext>OE defines a &quot;do_fetchall&quot; task so you can run bitbake -c fetchall &lt;target&gt; and  do_fetch will be run for the specified target and all of its dependent targets. However, it would be useful if we could have this mechanism in generic form so you could use it with any task.

Furthermore, we&apos;d want to ensure that -f worked with this option so you could force the task to run for targets where it&apos;s already run - one use case would be forcing do_package_qa to re-run for all dependent recipes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71115</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-03-07 22:44:59 +0000</bug_when>
    <thetext>Note that this isn&apos;t just &quot;all dependent recipes&quot;, to make this work, we actually have to traverse up the dependency tree and then back down it.

For example, &quot;bitbake core-image-sato -c fetch&quot; but when we want a &quot;fetchall&quot; task, we have to look at core-image-sato:do_build, then look for all fetch tasks that are in the dependency tree for do_build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71116</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-03-07 23:00:33 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Note that this isn&apos;t just &quot;all dependent recipes&quot;, to make this work, we
&gt; actually have to traverse up the dependency tree and then back down it.
&gt; 
&gt; For example, &quot;bitbake core-image-sato -c fetch&quot; but when we want a
&gt; &quot;fetchall&quot; task, we have to look at core-image-sato:do_build, then look for
&gt; all fetch tasks that are in the dependency tree for do_build.

Good point - although I&apos;d envisaged that for this mode you would invoke bitbake without specifying a target task and specify the &quot;run all&quot; task separately, so that the default do_build would be the target task. e.g.

bitbake --runall do_fetch core-image-minimal</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71117</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-03-07 23:02:52 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; Note that this isn&apos;t just &quot;all dependent recipes&quot;, to make this work, we
&gt; &gt; actually have to traverse up the dependency tree and then back down it.
&gt; &gt; 
&gt; &gt; For example, &quot;bitbake core-image-sato -c fetch&quot; but when we want a
&gt; &gt; &quot;fetchall&quot; task, we have to look at core-image-sato:do_build, then look for
&gt; &gt; all fetch tasks that are in the dependency tree for do_build.
&gt; 
&gt; Good point - although I&apos;d envisaged that for this mode you would invoke
&gt; bitbake without specifying a target task and specify the &quot;run all&quot; task
&gt; separately, so that the default do_build would be the target task. e.g.
&gt; 
&gt; bitbake --runall do_fetch core-image-minimal

Right, this is why we end up with the do_fetchall[recideptask] = &quot;do_${BB_DEFAULT_TASK}&quot; style lines. I just wanted to be clear about how this would need to work for anyone who hasn&apos;t gone into the details of how this needs to work before.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71120</commentid>
    <comment_count>4</comment_count>
    <who name="Matthew McClintock">msm-oss</who>
    <bug_when>2017-03-08 03:00:16 +0000</bug_when>
    <thetext>https://patchwork.openembedded.org/patch/137877/

The above seems to solve the issues.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71493</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-03-20 22:58:28 +0000</bug_when>
    <thetext>Merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=404f2aef94f8db6e46101e4ec9a6aa7e85b97880

Thanks Matthew!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>