<?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>10117</bug_id>
          
          <creation_ts>2016-08-11 16:58:00 +0000</creation_ts>
          <short_desc>Suggested rewriting to make &apos;3.9.1. Dependencies Internal to the .bb File&apos; less misleading</short_desc>
          <delta_ts>2016-08-12 21:50:20 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>BitBake User Manual</product>
          <component>bitbake-manual</component>
          <version>2.2</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>12 August 2016: IN PROGRESS REVIEW</status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>ulfalizer</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>srifenbark</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>65078</commentid>
    <comment_count>0</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-11 16:58:00 +0000</bug_when>
    <thetext>Hello,

I think the note I added to the end of &apos;3.9.1. Dependencies Internal to the .bb File&apos; is a bit misleading in retrospect. The problem is that it implies that the do_build task of a recipe always runs provided any task within it runs, which is false. Just as for other tasks, the do_build task only runs if something depends on it.

As a practical example, if foo.bb has a DEPENDS on bar.bb, then &apos;bitbake foo&apos; will usually only run tasks up to bar:do_populate_sysroot and not run bar:do_build.

Below is a suggested rewriting that should hopefully be less misleading. It also adds some information and consistently refers to the task with the &quot;do_&quot; prefix. It&apos;s just &apos;addtask&apos; that lets you leave off the &quot;do_&quot;.


  ... (Beginning same as before.)

  In this example, the do_printdate task depends on the completion of the
  do_fetch task, and the do_build task depends on the completion of the
  do_printdate task.
  
  Note {
  For a task to run, it must be a direct or indirect dependency of some other
  task that&apos;s scheduled to run. For illustration, here are some examples:
  
    * The directive &apos;addtask mytask before do_configure&apos; causes do_mytask to
      run before do_configure runs. Note that do_mytask will still only run if
      its [input checksum](http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#checksums)
      has changed since the last time it was run. Changes to the input signature
      of do_mytask also indirectly cause do_configure to run.
  
    * The directive &apos;addtask mytask after do_configure&apos; by itself never
      causes do_mytask to run. do_mytask can still be run manually as
      follows:
  
        $ bitbake recipe -c mytask
  
      Declaring do_mytask as a dependency of some other task that&apos;s scheduled
      to run will also cause it to run. Regardless, it will run after
      do_configure.
 

Cheers,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65079</commentid>
    <comment_count>1</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-11 16:58:36 +0000</bug_when>
    <thetext>That note was added in https://bugzilla.yoctoproject.org/show_bug.cgi?id=9861 by the way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65136</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-08-12 16:21:06 +0000</bug_when>
    <thetext>Hi Ulf, 

See http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#dependencies-internal-to-the-bb-file for the updates and let me know. 

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65141</commentid>
    <comment_count>3</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-12 17:48:45 +0000</bug_when>
    <thetext>&quot;Checksums value&quot; sounds a bit weird to me. I think I found a better way to put it too, that avoids potential confusion over &quot;checksum&quot; vs. &quot;input signature&quot; (which are the same thing).

I&apos;d replace

  Be aware that do_mytask still runs only if its checksums value has changed
  since the last time the task was run. Changes to the input signature of
  do_mytask also indirectly cause do_configure to run.

with

  Be aware that do_mytask still only runs if its [input checksum] has changed
  since the last time it was run. Changes to the input checksum of do_mytask
  also indirectly cause do_configure to run.

Cheers,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65161</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-08-12 21:27:07 +0000</bug_when>
    <thetext>Ulf, 

See http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#dependencies-internal-to-the-bb-file and let me know.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65163</commentid>
    <comment_count>5</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-12 21:36:19 +0000</bug_when>
    <thetext>Looks good to me now.

Thanks,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65168</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-08-12 21:50:20 +0000</bug_when>
    <thetext>Setting the RESOLVED and putting doc flag to &quot;done.&quot;

Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>