summaryrefslogtreecommitdiffstats
path: root/bitbake/doc/user-manual/user-manual-metadata.xml
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-18 14:34:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-27 21:03:22 +0000
commit552d54f2ecadfc6b8af5c2cc8c44d15c23928bef (patch)
tree4641f036fe6b75032ae32a0ee3239c75e7dde402 /bitbake/doc/user-manual/user-manual-metadata.xml
parentac576f40ac855eeef3fff38a863c2fd93d4030cf (diff)
downloadpoky-552d54f2ecadfc6b8af5c2cc8c44d15c23928bef.tar.gz
bitbake: user-manual-metadata: Clean up task documentation
(Bitbake rev: 55158ce6c5435544a62a60c0055724619bafde27) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/doc/user-manual/user-manual-metadata.xml')
-rw-r--r--bitbake/doc/user-manual/user-manual-metadata.xml28
1 files changed, 24 insertions, 4 deletions
diff --git a/bitbake/doc/user-manual/user-manual-metadata.xml b/bitbake/doc/user-manual/user-manual-metadata.xml
index 0ce2549daf..69d103dcac 100644
--- a/bitbake/doc/user-manual/user-manual-metadata.xml
+++ b/bitbake/doc/user-manual/user-manual-metadata.xml
@@ -474,10 +474,24 @@
474 </para> 474 </para>
475 </section> 475 </section>
476 476
477 <section> 477 <section id='tasks'>
478 <title>Tasks</title> 478 <title>Tasks</title>
479 <para><emphasis>NOTE:</emphasis> This is only supported in .bb and .bbclass files.</para> 479
480 <para>In BitBake, each step that needs to be run for a given .bb is known as a task. There is a command <filename>addtask</filename> to add new tasks (must be a defined Python executable metadata and must start with <quote>do_</quote>) and describe intertask dependencies. 480 <note>
481 This is only supported in <filename>.bb</filename>
482 and <filename>.bbclass</filename> files.
483 </note>
484
485 <para>
486 A shell or Python function executable through the
487 <filename>exec_func</filename> can be promoted to become a task.
488 Tasks are the execution unit Bitbake uses and each step that
489 needs to be run for a given <filename>.bb</filename> is known as
490 a task.
491 There is an <filename>addtask</filename> command to add new tasks
492 and promote functions which by convention must start with “do_”.
493 The <filename>addtask</filename> command is also used to describe
494 intertask dependencies.
481 <literallayout class='monospaced'> 495 <literallayout class='monospaced'>
482 python do_printdate () { 496 python do_printdate () {
483 import time print 497 import time print
@@ -485,7 +499,13 @@
485 } 499 }
486 addtask printdate after do_fetch before do_build 500 addtask printdate after do_fetch before do_build
487 </literallayout> 501 </literallayout>
488 This defines the necessary Python function and adds it as a task which is now a dependency of do_build, the default task. If anyone executes the do_build task, that will result in do_printdate being run first. 502 The above example defined a Python function, then adds
503 it as a task which is now a dependency of
504 <filename>do_build</filename>, the default task and states it
505 has to happen after <filename>do_fetch</filename>.
506 If anyone executes the <filename>do_build</filename>
507 task, that will result in <filename>do_printdate</filename>
508 being run first.
489 </para> 509 </para>
490 </section> 510 </section>
491 511