diff options
| author | Scott Rifenbark <srifenbark@gmail.com> | 2016-08-12 13:19:34 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-18 23:50:47 +0100 |
| commit | 3db5ff63866475fda6400fe8ead4390a18797910 (patch) | |
| tree | 2a3f5891fc442e16938701cef5b8fb27d942e173 /documentation | |
| parent | 1a1fc42e9f0c609d9c57e6a0a68a67f03db6acbf (diff) | |
| download | poky-3db5ff63866475fda6400fe8ead4390a18797910.tar.gz | |
ref-manual: Updated the section on viewing dependencies
Fixes [YOCTO #10131]
The section was renamed "Viewing Dependencies" for consistency.
The section was moved up to be the third item in the sub-section
list. The section was extensively re-written to provide more
clarity and options for the user to view dependencies.
(From yocto-docs rev: d521c3aabe6ded105cde6f7b3563c85340f759fd)
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
| -rw-r--r-- | documentation/ref-manual/usingpoky.xml | 107 |
1 files changed, 87 insertions, 20 deletions
diff --git a/documentation/ref-manual/usingpoky.xml b/documentation/ref-manual/usingpoky.xml index f70c1966e1..a7a63bd8cb 100644 --- a/documentation/ref-manual/usingpoky.xml +++ b/documentation/ref-manual/usingpoky.xml | |||
| @@ -234,6 +234,93 @@ | |||
| 234 | </para> | 234 | </para> |
| 235 | </section> | 235 | </section> |
| 236 | 236 | ||
| 237 | <section id='usingpoky-viewing-dependencies'> | ||
| 238 | <title>Viewing Dependencies</title> | ||
| 239 | |||
| 240 | <para> | ||
| 241 | Sometimes it can be hard to see why BitBake wants to build other | ||
| 242 | recipes before the one you have specified. | ||
| 243 | Dependency information can help you understand recipe build order. | ||
| 244 | </para> | ||
| 245 | |||
| 246 | <para> | ||
| 247 | To generate dependency information for a recipe, run the following | ||
| 248 | command: | ||
| 249 | <literallayout class='monospaced'> | ||
| 250 | $ bitbake -g <replaceable>recipename</replaceable> | ||
| 251 | </literallayout> | ||
| 252 | This command writes the following files in the current directory: | ||
| 253 | <itemizedlist> | ||
| 254 | <listitem><para> | ||
| 255 | <filename>pn-buildlist</filename>: A list of | ||
| 256 | recipes/targets involved in building | ||
| 257 | <replaceable>recipename</replaceable>. | ||
| 258 | "Involved" here means that at least one task from the | ||
| 259 | recipe needs to run when building | ||
| 260 | <replaceable>recipename</replaceable> from scratch. | ||
| 261 | Targets that are in | ||
| 262 | <link linkend='var-ASSUME_PROVIDED'><filename>ASSUME_PROVIDED</filename></link> | ||
| 263 | are not listed. | ||
| 264 | </para></listitem> | ||
| 265 | <listitem><para> | ||
| 266 | <filename>pn-depends.dot</filename>: A graph showing | ||
| 267 | dependencies between build-time targets (recipes). | ||
| 268 | </para></listitem> | ||
| 269 | <listitem><para> | ||
| 270 | <filename>package-depends.dot</filename>: A graph showing | ||
| 271 | known dependencies between runtime targets. | ||
| 272 | </para></listitem> | ||
| 273 | <listitem><para> | ||
| 274 | <filename>task-depends.dot</filename>: A graph showing | ||
| 275 | dependencies between tasks. | ||
| 276 | </para></listitem> | ||
| 277 | </itemizedlist> | ||
| 278 | </para> | ||
| 279 | |||
| 280 | <para> | ||
| 281 | The graphs are in | ||
| 282 | <ulink url='https://en.wikipedia.org/wiki/DOT_%28graph_description_language%29'>DOT</ulink> | ||
| 283 | format and can be converted to images (e.g. using the "dot" tool | ||
| 284 | from | ||
| 285 | <ulink url='http://www.graphviz.org/'>Graphviz</ulink>. | ||
| 286 | <note> | ||
| 287 | <para>DOT files use a plain text format. | ||
| 288 | The graphs generated using the | ||
| 289 | <filename>bitbake -g</filename> command are often so large as | ||
| 290 | to be impossible to read without special pruning (e.g. with | ||
| 291 | Bitbake's <filename>-I</filename> option) and processing. | ||
| 292 | Despite the form and size of the files, the corresponding | ||
| 293 | <filename>.dot</filename> files can still be easy to read | ||
| 294 | and provide useful information.</para> | ||
| 295 | |||
| 296 | <para>As an example, the | ||
| 297 | <filename>task-depends.dot</filename> file contains lines such | ||
| 298 | as the following: | ||
| 299 | <literallayout class='monospaced'> | ||
| 300 | "libxslt.do_configure" -> "libxml2.do_populate_sysroot" | ||
| 301 | </literallayout> | ||
| 302 | The above example line reveals that the | ||
| 303 | <link linkend='ref-tasks-configure'><filename>do_configure</filename></link> | ||
| 304 | task in <filename>libxslt</filename> depends on the | ||
| 305 | <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link> | ||
| 306 | task in <filename>libxml2</filename>, which is a normal | ||
| 307 | <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link> | ||
| 308 | dependency between the two recipes.</para> | ||
| 309 | </note> | ||
| 310 | </para> | ||
| 311 | |||
| 312 | <para> | ||
| 313 | You can use a different method to view dependency information | ||
| 314 | by using the following command: | ||
| 315 | <literallayout class='monospaced'> | ||
| 316 | $ bitbake -g -u depexp <replaceable>recipename</replaceable> | ||
| 317 | </literallayout> | ||
| 318 | This command displays a GUI window from which you can view | ||
| 319 | build-time and runtime dependencies for the recipes involved in | ||
| 320 | building <replaceable>recipename</replaceable>. | ||
| 321 | </para> | ||
| 322 | </section> | ||
| 323 | |||
| 237 | <section id='usingpoky-debugging-taskrunning'> | 324 | <section id='usingpoky-debugging-taskrunning'> |
| 238 | <title>Running Specific Tasks</title> | 325 | <title>Running Specific Tasks</title> |
| 239 | 326 | ||
| @@ -370,26 +457,6 @@ | |||
| 370 | 457 | ||
| 371 | </section> | 458 | </section> |
| 372 | 459 | ||
| 373 | <section id='usingpoky-debugging-dependencies'> | ||
| 374 | <title>Dependency Graphs</title> | ||
| 375 | |||
| 376 | <para> | ||
| 377 | Sometimes it can be hard to see why BitBake wants to build | ||
| 378 | other packages before building a given package you have specified. | ||
| 379 | The <filename>bitbake -g <replaceable>targetname</replaceable></filename> command | ||
| 380 | creates the <filename>pn-buildlist</filename>, | ||
| 381 | <filename>pn-depends.dot</filename>, | ||
| 382 | <filename>package-depends.dot</filename>, and | ||
| 383 | <filename>task-depends.dot</filename> files in the current | ||
| 384 | directory. | ||
| 385 | These files show what will be built and the package and task | ||
| 386 | dependencies, which are useful for debugging problems. | ||
| 387 | You can use the | ||
| 388 | <filename>bitbake -g -u depexp <replaceable>targetname</replaceable></filename> | ||
| 389 | command to display the results in a more human-readable form. | ||
| 390 | </para> | ||
| 391 | </section> | ||
| 392 | |||
| 393 | <section id='usingpoky-debugging-bitbake'> | 460 | <section id='usingpoky-debugging-bitbake'> |
| 394 | <title>General BitBake Problems</title> | 461 | <title>General BitBake Problems</title> |
| 395 | 462 | ||
