summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual/usingpoky.xml
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/ref-manual/usingpoky.xml')
-rw-r--r--documentation/ref-manual/usingpoky.xml125
1 files changed, 121 insertions, 4 deletions
diff --git a/documentation/ref-manual/usingpoky.xml b/documentation/ref-manual/usingpoky.xml
index 15e1d47301..574de7b4b7 100644
--- a/documentation/ref-manual/usingpoky.xml
+++ b/documentation/ref-manual/usingpoky.xml
@@ -119,8 +119,8 @@
119 </para> 119 </para>
120</section> 120</section>
121 121
122<section id='usingpoky-debugging'> 122<section id='usingpoky-debugging-tools-and-techniques'>
123 <title>Debugging Build Failures</title> 123 <title>Debugging Tools and Techniques</title>
124 124
125 <para> 125 <para>
126 The exact method for debugging build failures depends on the nature of 126 The exact method for debugging build failures depends on the nature of
@@ -247,8 +247,8 @@
247 </para> 247 </para>
248 </section> 248 </section>
249 249
250 <section id='usingpoky-viewing-dependencies'> 250 <section id='usingpoky-viewing-dependencies-between-recipes-and-tasks'>
251 <title>Viewing Dependencies</title> 251 <title>Viewing Dependencies Between Recipes and Tasks</title>
252 252
253 <para> 253 <para>
254 Sometimes it can be hard to see why BitBake wants to build other 254 Sometimes it can be hard to see why BitBake wants to build other
@@ -348,6 +348,123 @@
348 </para> 348 </para>
349 </section> 349 </section>
350 350
351 <section id='usingpoky-viewing-task-variable-dependencies'>
352 <title>Viewing Task Variable Dependencies</title>
353
354 <para>
355 As mentioned in the
356 "<ulink url='&YOCTO_DOCS_BB_URL;#checksums'>Checksums (Signatures)</ulink>"
357 section of the BitBake User Manual, BitBake tries to automatically
358 determine what variables a task depends on so that it can rerun
359 the task if any values of the variables change.
360 This determination is usually reliable.
361 However, if you do things like construct variable names at runtime,
362 then you might have to manually declare dependencies on those
363 variables using <filename>vardeps</filename> as described in the
364 "<ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'>Variable Flags</ulink>"
365 section of the BitBake User Manual.
366 </para>
367
368 <para>
369 If you are unsure whether a variable dependency is being picked up
370 automatically for a given task, you can list the variable
371 dependencies BitBake has determined by doing the following:
372 <orderedlist>
373 <listitem><para>
374 Build the recipe containing the task:
375 <literallayout class='monospaced'>
376 $ bitbake <replaceable>recipename</replaceable>
377 </literallayout>
378 </para></listitem>
379 <listitem><para>
380 Inside the
381 <link linkend='var-STAMPS_DIR'><filename>STAMPS_DIR</filename></link>
382 directory, find the signature data
383 (<filename>sigdata</filename>) file that corresponds to the
384 task.
385 The <filename>sigdata</filename> files contain a pickled
386 Python database of all the metadata that went into creating
387 the input checksum for the task.
388 As an example, for the
389 <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>
390 task of the <filename>db</filename> recipe, the
391 <filename>sigdata</filename> file might be found in the
392 following location:
393 <literallayout class='monospaced'>
394 ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1
395 </literallayout>
396 For tasks that are accelerated through the shared state
397 (<link linkend='shared-state-cache'>sstate</link>)
398 cache, an additional <filename>siginfo</filename> file is
399 written into
400 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>
401 along with the cached task output.
402 The <filename>siginfo</filename> files contain exactly the
403 same information as <filename>sigdata</filename> files.
404 </para></listitem>
405 <listitem><para>
406 Run <filename>bitbake-dumpsigs</filename> on the
407 <filename>sigdata</filename> or
408 <filename>siginfo</filename> file.
409 Here is an example:
410 <literallayout class='monospaced'>
411 $ bitbake-dumpsigs ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1
412 </literallayout>
413 In the output of the above command, you will find a line
414 like the following, which lists all the (inferred) variable
415 dependencies for the task.
416 This list also includes indirect dependencies from
417 variables depending on other variables, recursively.
418 <literallayout class='monospaced'>
419 Task dependencies: ['PV', 'SRCREV', 'SRC_URI', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]', 'base_do_fetch']
420 </literallayout>
421 <note>
422 Functions (e.g. <filename>base_do_fetch</filename>)
423 also count as variable dependencies.
424 These functions in turn depend on the variables they
425 reference.
426 </note>
427 The output of <filename>bitbake-dumpsigs</filename> also includes
428 the value each variable had, a list of dependencies for each
429 variable, and
430 <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_HASHBASE_WHITELIST'><filename>BB_HASHBASE_WHITELIST</filename></ulink>
431 information.
432 </para></listitem>
433 </orderedlist>
434 </para>
435
436 <para>
437 There is also a <filename>bitbake-diffsigs</filename> command for
438 comparing two <filename>siginfo</filename> or
439 <filename>sigdata</filename> files.
440 This command can be helpful when trying to figure out what changed
441 between two versions of a task.
442 If you call <filename>bitbake-diffsigs</filename> with just one
443 file, the command behaves like
444 <filename>bitbake-dumpsigs</filename>.
445 </para>
446
447 <para>
448 You can also use BitBake to dump out the signature construction
449 information without executing tasks by using either of the
450 following BitBake command-line options:
451 <literallayout class='monospaced'>
452 &dash;&dash;dump-signatures=<replaceable>SIGNATURE_HANDLER</replaceable>
453 -S <replaceable>SIGNATURE_HANDLER</replaceable>
454 </literallayout>
455 <note>
456 Two common values for
457 <replaceable>SIGNATURE_HANDLER</replaceable> are "none" and
458 "printdiff", which dump only the signature or compare the
459 dumped signature with the cached one, respectively.
460 </note>
461 Using BitBake with either of these options causes BitBake to dump
462 out <filename>sigdata</filename> files in the
463 <filename>stamps</filename> directory for every task it would have
464 executed instead of building the specified target package.
465 </para>
466 </section>
467
351 <section id='usingpoky-debugging-taskrunning'> 468 <section id='usingpoky-debugging-taskrunning'>
352 <title>Running Specific Tasks</title> 469 <title>Running Specific Tasks</title>
353 470