diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-18 14:34:14 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-27 21:03:22 +0000 |
commit | 552d54f2ecadfc6b8af5c2cc8c44d15c23928bef (patch) | |
tree | 4641f036fe6b75032ae32a0ee3239c75e7dde402 /bitbake | |
parent | ac576f40ac855eeef3fff38a863c2fd93d4030cf (diff) | |
download | ast2050-yocto-poky-552d54f2ecadfc6b8af5c2cc8c44d15c23928bef.zip ast2050-yocto-poky-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')
-rw-r--r-- | bitbake/doc/user-manual/user-manual-metadata.xml | 28 |
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 0ce2549..69d103d 100644 --- a/bitbake/doc/user-manual/user-manual-metadata.xml +++ b/bitbake/doc/user-manual/user-manual-metadata.xml @@ -474,10 +474,24 @@ </para> </section> - <section> + <section id='tasks'> <title>Tasks</title> - <para><emphasis>NOTE:</emphasis> This is only supported in .bb and .bbclass files.</para> - <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. + + <note> + This is only supported in <filename>.bb</filename> + and <filename>.bbclass</filename> files. + </note> + + <para> + A shell or Python function executable through the + <filename>exec_func</filename> can be promoted to become a task. + Tasks are the execution unit Bitbake uses and each step that + needs to be run for a given <filename>.bb</filename> is known as + a task. + There is an <filename>addtask</filename> command to add new tasks + and promote functions which by convention must start with “do_”. + The <filename>addtask</filename> command is also used to describe + intertask dependencies. <literallayout class='monospaced'> python do_printdate () { import time print @@ -485,7 +499,13 @@ } addtask printdate after do_fetch before do_build </literallayout> - 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. + The above example defined a Python function, then adds + it as a task which is now a dependency of + <filename>do_build</filename>, the default task and states it + has to happen after <filename>do_fetch</filename>. + If anyone executes the <filename>do_build</filename> + task, that will result in <filename>do_printdate</filename> + being run first. </para> </section> |