bitbake: user-manual-metadata.xml: Re-write the "Dependencies" section.

General edits and dumping of the useless "Overview" section.

(Bitbake rev: b11ad97b9334a86b2f3b10bdf5597910854475bd)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark 2014-02-10 16:18:47 -06:00 committed by Richard Purdie
parent bfafc2fc3c
commit 666a7b0924
1 changed files with 73 additions and 41 deletions

View File

@ -1502,24 +1502,36 @@
<section id='dependencies'> <section id='dependencies'>
<title>Dependencies</title> <title>Dependencies</title>
<section id='dependencies-overview'> <para>
<title>Overview</title> To allow for efficient operation given multiple processes
executing in parallel, BitBake handles dependencies at
the task level.
BitBake supports a robust method to handle these dependencies.
</para>
<para> <para>
BitBake handles dependencies at the task level since to This section describes several types of dependency mechanisms.
allow for efficient operation with multiple </para>
processes executing in parallel, a robust method of
specifying task dependencies is needed.
</para>
</section>
<section id='dependencies-internal-to-the-bb-file'> <section id='dependencies-internal-to-the-bb-file'>
<title>Dependencies Internal to the <filename>.bb</filename> File</title> <title>Dependencies Internal to the <filename>.bb</filename> File</title>
<para> <para>
Where the dependencies are internal to a given BitBake uses the <filename>addtask</filename> directive
<filename>.bb</filename> file, the dependencies are handled by the to manage dependencies that are internal to a given recipe
previously detailed <filename>addtask</filename> directive. file.
You can use the <filename>addtask</filename> directive to
indicate when a task is dependent on other tasks or when
other tasks depend on that recipe.
Here is an example:
<literallayout class='monospaced'>
addtask printdate after do_fetch before do_build
</literallayout>
In this example, the <filename>printdate</filename> task is
depends on the completion of the <filename>do_fetch</filename>
task.
And, the <filename>do_build</filename> depends on the completion
of the <filename>printdate</filename> task.
</para> </para>
</section> </section>
@ -1527,15 +1539,18 @@
<title>Build Dependencies</title> <title>Build Dependencies</title>
<para> <para>
<filename>DEPENDS</filename> lists build time dependencies. BitBake uses the
The 'deptask' flag for tasks is used to signify the task of each <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
item listed in <filename>DEPENDS</filename> which must have variable to manage build time dependencies.
completed before that task can be executed. The "deptask" varflag for tasks signifies the task of each
item listed in <filename>DEPENDS</filename> that must
complete before that task can be executed.
Here is an example:
<literallayout class='monospaced'> <literallayout class='monospaced'>
do_configure[deptask] = "do_populate_staging" do_configure[deptask] = "do_populate_staging"
</literallayout> </literallayout>
In the previous example, the <filename>do_populate_staging</filename> In this example, the <filename>do_populate_staging</filename>
task of each item in <filename>DEPENDS</filename> must have completed before task of each item in <filename>DEPENDS</filename> must complete before
<filename>do_configure</filename> can execute. <filename>do_configure</filename> can execute.
</para> </para>
</section> </section>
@ -1543,11 +1558,20 @@
<section id='runtime-dependencies'> <section id='runtime-dependencies'>
<title>Runtime Dependencies</title> <title>Runtime Dependencies</title>
<para>
BitBake uses the
<link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>,
<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>, and
<link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
variables to manage runtime dependencies.
</para>
<para> <para>
The <filename>PACKAGES</filename> variable lists runtime The <filename>PACKAGES</filename> variable lists runtime
packages and each of these can have <filename>RDEPENDS</filename> and packages.
Each of those packages can have <filename>RDEPENDS</filename> and
<filename>RRECOMMENDS</filename> runtime dependencies. <filename>RRECOMMENDS</filename> runtime dependencies.
The 'rdeptask' flag for tasks is used to signify the task of each The "rdeptask" flag for tasks is used to signify the task of each
item runtime dependency which must have completed before that item runtime dependency which must have completed before that
task can be executed. task can be executed.
<literallayout class='monospaced'> <literallayout class='monospaced'>
@ -1563,25 +1587,29 @@
<title>Recursive Dependencies</title> <title>Recursive Dependencies</title>
<para> <para>
These are specified with the 'recrdeptask' flag BitBake uses the "recrdeptask" flag to manage
which is used to signify the task(s) of dependencies recursive task dependencies.
which must have completed before that task can be BitBake looks through the build-time and runtime
executed. dependencies of the current recipe, looks through
It works by looking though the build the task's inter-task
and runtime dependencies of the current recipe as well dependencies, and then adds dependencies for the
as any inter-task dependencies the task has, listed task.
then adding a dependency on the listed task. Once BitBake has accomplished this, it recursively works through
It will then recurse through the dependencies of those the dependencies of those tasks.
tasks and so on. Iterative passes continue until all dependencies are discovered
and added.
</para> </para>
<para> <para>
It may be desirable to recurse not just through the You might want to not only have BitBake look for
dependencies of those tasks but through the dependencies of those tasks, but also have BitBake look
build and runtime dependencies of dependent tasks too. for build-time and runtime dependencies of the dependent
If that is the case, the taskname itself should tasks as well.
be referenced in the task list (e.g. If that is the case, you need to reference the task name
<filename>do_a[recrdeptask] = "do_a do_b"</filename>). itself in the task list:
<literallayout class='monospaced'>
do_a[recrdeptask] = "do_a do_b"
</literallayout>
</para> </para>
</section> </section>
@ -1589,19 +1617,23 @@
<title>Inter-Task Dependencies</title> <title>Inter-Task Dependencies</title>
<para> <para>
The 'depends' flag for tasks is a more generic form which BitBake uses the "depends" flag in a more generic form
allows an inter-dependency on specific tasks rather than specifying to manage inter-task dependencies.
This more generic form allows for inter-dependency
checks for specific tasks rather than checks for
the data in <filename>DEPENDS</filename>. the data in <filename>DEPENDS</filename>.
Here is an example:
<literallayout class='monospaced'> <literallayout class='monospaced'>
do_patch[depends] = "quilt-native:do_populate_staging" do_patch[depends] = "quilt-native:do_populate_staging"
</literallayout> </literallayout>
In the previous example, the <filename>do_populate_staging</filename> In this example, the <filename>do_populate_staging</filename>
task of the target quilt-native must have completed before the task of the target <filename>quilt-native</filename>
must have completed before the
<filename>do_patch</filename> task can execute. <filename>do_patch</filename> task can execute.
</para> </para>
<para> <para>
The 'rdepends' flag works in a similar way but takes targets The "rdepends" flag works in a similar way but takes targets
in the runtime namespace instead of the build-time dependency in the runtime namespace instead of the build-time dependency
namespace. namespace.
</para> </para>