summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2016-08-22 13:13:14 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-25 23:09:29 +0100
commit1769e1a2dec036dbe950b86dbdc95ab5798ece38 (patch)
tree04046dabf99cfac8daf8329b26f177fbdd8fe195 /documentation
parenta2e8f196d735c16bf89a6753691262b0e46fd60f (diff)
downloadpoky-1769e1a2dec036dbe950b86dbdc95ab5798ece38.tar.gz
ref-manual: Suggested fleshing out of the sigdata/siginfo documentation
Fixes [YOCTO #10141] Provided several fixes to address this situation: * Renamed "Debugging Build Failures" to "Debugging Tools and Techniques" as it fit better the subsections. * Renamed "Viewing Dependencies" to "Viewing Dependencies Between Recipes and Tasks" as it fit better the description. * Added a new "Viewing Task Variable Dependencies" section to describe how sigdata and siginfo stuff can be used. * Replaced the contents of "4.3.4.1 Debugging" with a shorter bit that now references into the new section on veiwing task variable dependencies. (From yocto-docs rev: 539d76366055bed74ccc926519e969324cac470d) 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/technical-details.xml59
-rw-r--r--documentation/ref-manual/usingpoky.xml125
2 files changed, 130 insertions, 54 deletions
diff --git a/documentation/ref-manual/technical-details.xml b/documentation/ref-manual/technical-details.xml
index 5ef764c8e0..6bad547e50 100644
--- a/documentation/ref-manual/technical-details.xml
+++ b/documentation/ref-manual/technical-details.xml
@@ -901,56 +901,15 @@
901 <title>Debugging</title> 901 <title>Debugging</title>
902 902
903 <para> 903 <para>
904 When things go wrong, debugging needs to be straightforward. 904 Seeing what metadata went into creating the input signature
905 Because of this, the Yocto Project includes strong debugging 905 of a shared state (sstate) task can be a useful debugging aid.
906 tools: 906 This information is available in signature information
907 <itemizedlist> 907 (<filename>siginfo</filename>) files in
908 <listitem><para>Whenever a shared state package is written 908 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>.
909 out into the 909 For information on how to view and interpret information in
910 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>, 910 <filename>siginfo</filename> files, see the
911 a corresponding <filename>.siginfo</filename> file is 911 "<link linkend='usingpoky-viewing-task-variable-dependencies'>Viewing Task Variable Dependencies</link>"
912 also written. 912 section.
913 This file contains a pickled Python database of all
914 the Metadata that went into creating the hash for a
915 given shared state package.
916 Whenever a stamp is written into the stamp directory
917 <link linkend='var-STAMP'><filename>STAMP</filename></link>,
918 a corresponding <filename>.sigdata</filename> file
919 is created that contains the same hash data that
920 represented the executed task.
921 </para></listitem>
922 <listitem><para>You can use BitBake to dump out the
923 signature construction information without executing
924 tasks by using either of the following BitBake
925 command-line options:
926 <literallayout class='monospaced'>
927 &dash;&dash;dump-signatures=<replaceable>SIGNATURE_HANDLER</replaceable>
928 -S <replaceable>SIGNATURE_HANDLER</replaceable>
929 </literallayout>
930 <note>
931 Two common values for
932 <replaceable>SIGNATURE_HANDLER</replaceable> are
933 "none" and "printdiff" to only dump the signature
934 or to compare the dumped signature with the
935 cached one, respectively.
936 </note>
937 Using BitBake with either of these options causes
938 BitBake to dump out <filename>.sigdata</filename> files
939 in the stamp directory for every task it would have
940 executed instead of building the specified target
941 package.
942 </para></listitem>
943 <listitem><para>There is a
944 <filename>bitbake-diffsigs</filename> command that
945 can process <filename>.sigdata</filename> and
946 <filename>.siginfo</filename> files.
947 If you specify one of these files, BitBake dumps out
948 the dependency information in the file.
949 If you specify two files, BitBake compares the two
950 files and dumps out the differences between the two.
951 This more easily helps answer the question of "What
952 changed between X and Y?"</para></listitem>
953 </itemizedlist>
954 </para> 913 </para>
955 </section> 914 </section>
956 915
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