<?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>10131</bug_id>
          
          <creation_ts>2016-08-12 09:39:11 +0000</creation_ts>
          <short_desc>Suggested rewriting of &apos;2.3.5. Dependency Graphs&apos;</short_desc>
          <delta_ts>2016-08-12 21:52:20 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>Reference</product>
          <component>handbook</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 July 2016: RESOLVED</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>poky.doc.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</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>65119</commentid>
    <comment_count>0</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-12 09:39:11 +0000</bug_when>
    <thetext>Hello,

Nothing currently hints at that the .dot files are easy to read directly in a text editor. The resulting graphs are completely unreadable without pruning and processing, so knowing this can be extremely useful.

I suggest the following changes:

 * Move &apos;2.3.5. Dependency Graphs&apos; to 2.3.3. and rename it to &quot;2.3.3. Viewing Dependencies&quot;. This makes the name consistent with the sections above it.

 * Rewrite it as follows:

  Sometimes it can be hard to see why BitBake wants to build other recipes before
  the one you have specified. To generate dependency information for a recipe,
  run the following command:
  
    $ bitbake -g recipename
  
  This command writes the following files in the current directory:
  
    * pn-buildlist: A list of recipes/targets involved in building `recipename`.
      &quot;Involved&quot; here means that at least one task from the recipe would need to
      run when building `recipename` from scratch. Targets that are in
      [ASSUME_PROVIDED] are not listed.
  
    * pn-depends.dot: A graph showing dependencies between build-time targets
      (recipes).
  
    * package-depends.dot: A graph showing (known) dependencies between runtime
      targets.
  
    * task-depends.dot: A graph showing dependencies between tasks.
  
  The graphs are in
  [DOT](https://en.wikipedia.org/wiki/DOT_%28graph_description_language%29)
  format and can be converted to images using e.g. the &apos;dot&apos; tool from
  [Graphviz](http://www.graphviz.org/).
  
  Note {
  DOT files use a plain text format. The graphs generated by &apos;bitbake -g&apos; are
  often so large as to be impossible to read without special pruning (e.g. with
  bitbake&apos;s -I option) and processing, but the corresponding .dot files are often
  still easy to read and can provide useful information.
  
  As an example, task-depends.dot contains lines like the following:
  
    &quot;libxslt.do_configure&quot; -&gt; &quot;libxml2.do_populate_sysroot&quot;
  
  The above line tells us that libxslt&apos;s do_configure task depends on libxml2&apos;s
  do_populate_sysroot task (a normal [DEPENDS] dependency between the recipes).
  }
  
  A different way to view dependency information is with the following command:
  
    $ bitbake -g -u depexp recipename
  
  This will pop up a GUI window where build- and runtime dependencies can be
  viewed for the recipes involved in building recipename.


I originally wanted to document exactly what information pn-depends.dot and package-depends.dot contain as well, but to be honest it escapes me (and I got frustrated trying to reverse-engineer it). It&apos;s not clear at all what stuff like &quot;virtual:native:&quot; and filled vs. dashed vs. dotted edges means. A much more concrete and detailed description is needed, but that&apos;s for another ticket in that case.

Cheers,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65121</commentid>
    <comment_count>1</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-12 10:03:11 +0000</bug_when>
    <thetext>Nit - could get rid of the &quot;often&quot; below. Two &quot;oftens&quot; looks bad.

  ...but the corresponding .dot files are often still
  easy to read and can provide useful information.

Cheers,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65147</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-08-12 20:23:02 +0000</bug_when>
    <thetext>Ulf, 

See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#usingpoky-viewing-dependencies for the renamed and moved section.

thanks,
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65150</commentid>
    <comment_count>3</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-12 20:34:42 +0000</bug_when>
    <thetext>Thanks! Some nits below:

* The problem is usually to figure out why a recipe is built at all, so &quot;dependency information can help you understand recipe build order&quot; might be better as &quot;dependency information can help you understand why a recipe is built&quot;.

* There&apos;s a missing closing parenthesis here:

  The graphs are in DOT format and can be converted to images (e.g. using
  the &quot;dot&quot; tool from Graphviz.

In addition, &quot;dot&quot; could use code highlighting instead of quotes.

* &quot;Despite the form and size of the files, ...&quot; should be &quot;Despite the form and size of the graphs, ...&quot;

Looks fine other than that.

Cheers,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65156</commentid>
    <comment_count>4</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-12 21:07:56 +0000</bug_when>
    <thetext>Thought of one more thing. The Note box could be turned into a Notes box and one more note added:

 * For an example of how .dot files can be processed, see the
   scripts/contrib/graph-tool Python script, which finds and displays
   paths between graph nodes.

That script is pretty useful in itself too, so providing an example is a good excuse to mention it. :)

Cheers,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65165</commentid>
    <comment_count>5</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-08-12 21:47:03 +0000</bug_when>
    <thetext>Ulf, 

I think I got everything - http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#usingpoky-viewing-dependencies

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65166</commentid>
    <comment_count>6</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-12 21:49:22 +0000</bug_when>
    <thetext>Yup - looks like it. I&apos;m fine with it now.

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

scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>