summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/doc/user-manual/user-manual-metadata.xml114
1 files changed, 73 insertions, 41 deletions
diff --git a/bitbake/doc/user-manual/user-manual-metadata.xml b/bitbake/doc/user-manual/user-manual-metadata.xml
index 2e19f4572c..80e5b648db 100644
--- a/bitbake/doc/user-manual/user-manual-metadata.xml
+++ b/bitbake/doc/user-manual/user-manual-metadata.xml
@@ -1502,24 +1502,36 @@
1502 <section id='dependencies'> 1502 <section id='dependencies'>
1503 <title>Dependencies</title> 1503 <title>Dependencies</title>
1504 1504
1505 <section id='dependencies-overview'> 1505 <para>
1506 <title>Overview</title> 1506 To allow for efficient operation given multiple processes
1507 executing in parallel, BitBake handles dependencies at
1508 the task level.
1509 BitBake supports a robust method to handle these dependencies.
1510 </para>
1507 1511
1508 <para> 1512 <para>
1509 BitBake handles dependencies at the task level since to 1513 This section describes several types of dependency mechanisms.
1510 allow for efficient operation with multiple 1514 </para>
1511 processes executing in parallel, a robust method of
1512 specifying task dependencies is needed.
1513 </para>
1514 </section>
1515 1515
1516 <section id='dependencies-internal-to-the-bb-file'> 1516 <section id='dependencies-internal-to-the-bb-file'>
1517 <title>Dependencies Internal to the <filename>.bb</filename> File</title> 1517 <title>Dependencies Internal to the <filename>.bb</filename> File</title>
1518 1518
1519 <para> 1519 <para>
1520 Where the dependencies are internal to a given 1520 BitBake uses the <filename>addtask</filename> directive
1521 <filename>.bb</filename> file, the dependencies are handled by the 1521 to manage dependencies that are internal to a given recipe
1522 previously detailed <filename>addtask</filename> directive. 1522 file.
1523 You can use the <filename>addtask</filename> directive to
1524 indicate when a task is dependent on other tasks or when
1525 other tasks depend on that recipe.
1526 Here is an example:
1527 <literallayout class='monospaced'>
1528 addtask printdate after do_fetch before do_build
1529 </literallayout>
1530 In this example, the <filename>printdate</filename> task is
1531 depends on the completion of the <filename>do_fetch</filename>
1532 task.
1533 And, the <filename>do_build</filename> depends on the completion
1534 of the <filename>printdate</filename> task.
1523 </para> 1535 </para>
1524 </section> 1536 </section>
1525 1537
@@ -1527,15 +1539,18 @@
1527 <title>Build Dependencies</title> 1539 <title>Build Dependencies</title>
1528 1540
1529 <para> 1541 <para>
1530 <filename>DEPENDS</filename> lists build time dependencies. 1542 BitBake uses the
1531 The 'deptask' flag for tasks is used to signify the task of each 1543 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
1532 item listed in <filename>DEPENDS</filename> which must have 1544 variable to manage build time dependencies.
1533 completed before that task can be executed. 1545 The "deptask" varflag for tasks signifies the task of each
1546 item listed in <filename>DEPENDS</filename> that must
1547 complete before that task can be executed.
1548 Here is an example:
1534 <literallayout class='monospaced'> 1549 <literallayout class='monospaced'>
1535 do_configure[deptask] = "do_populate_staging" 1550 do_configure[deptask] = "do_populate_staging"
1536 </literallayout> 1551 </literallayout>
1537 In the previous example, the <filename>do_populate_staging</filename> 1552 In this example, the <filename>do_populate_staging</filename>
1538 task of each item in <filename>DEPENDS</filename> must have completed before 1553 task of each item in <filename>DEPENDS</filename> must complete before
1539 <filename>do_configure</filename> can execute. 1554 <filename>do_configure</filename> can execute.
1540 </para> 1555 </para>
1541 </section> 1556 </section>
@@ -1544,10 +1559,19 @@
1544 <title>Runtime Dependencies</title> 1559 <title>Runtime Dependencies</title>
1545 1560
1546 <para> 1561 <para>
1562 BitBake uses the
1563 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>,
1564 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>, and
1565 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
1566 variables to manage runtime dependencies.
1567 </para>
1568
1569 <para>
1547 The <filename>PACKAGES</filename> variable lists runtime 1570 The <filename>PACKAGES</filename> variable lists runtime
1548 packages and each of these can have <filename>RDEPENDS</filename> and 1571 packages.
1572 Each of those packages can have <filename>RDEPENDS</filename> and
1549 <filename>RRECOMMENDS</filename> runtime dependencies. 1573 <filename>RRECOMMENDS</filename> runtime dependencies.
1550 The 'rdeptask' flag for tasks is used to signify the task of each 1574 The "rdeptask" flag for tasks is used to signify the task of each
1551 item runtime dependency which must have completed before that 1575 item runtime dependency which must have completed before that
1552 task can be executed. 1576 task can be executed.
1553 <literallayout class='monospaced'> 1577 <literallayout class='monospaced'>
@@ -1563,25 +1587,29 @@
1563 <title>Recursive Dependencies</title> 1587 <title>Recursive Dependencies</title>
1564 1588
1565 <para> 1589 <para>
1566 These are specified with the 'recrdeptask' flag 1590 BitBake uses the "recrdeptask" flag to manage
1567 which is used to signify the task(s) of dependencies 1591 recursive task dependencies.
1568 which must have completed before that task can be 1592 BitBake looks through the build-time and runtime
1569 executed. 1593 dependencies of the current recipe, looks through
1570 It works by looking though the build 1594 the task's inter-task
1571 and runtime dependencies of the current recipe as well 1595 dependencies, and then adds dependencies for the
1572 as any inter-task dependencies the task has, 1596 listed task.
1573 then adding a dependency on the listed task. 1597 Once BitBake has accomplished this, it recursively works through
1574 It will then recurse through the dependencies of those 1598 the dependencies of those tasks.
1575 tasks and so on. 1599 Iterative passes continue until all dependencies are discovered
1600 and added.
1576 </para> 1601 </para>
1577 1602
1578 <para> 1603 <para>
1579 It may be desirable to recurse not just through the 1604 You might want to not only have BitBake look for
1580 dependencies of those tasks but through the 1605 dependencies of those tasks, but also have BitBake look
1581 build and runtime dependencies of dependent tasks too. 1606 for build-time and runtime dependencies of the dependent
1582 If that is the case, the taskname itself should 1607 tasks as well.
1583 be referenced in the task list (e.g. 1608 If that is the case, you need to reference the task name
1584 <filename>do_a[recrdeptask] = "do_a do_b"</filename>). 1609 itself in the task list:
1610 <literallayout class='monospaced'>
1611 do_a[recrdeptask] = "do_a do_b"
1612 </literallayout>
1585 </para> 1613 </para>
1586 </section> 1614 </section>
1587 1615
@@ -1589,19 +1617,23 @@
1589 <title>Inter-Task Dependencies</title> 1617 <title>Inter-Task Dependencies</title>
1590 1618
1591 <para> 1619 <para>
1592 The 'depends' flag for tasks is a more generic form which 1620 BitBake uses the "depends" flag in a more generic form
1593 allows an inter-dependency on specific tasks rather than specifying 1621 to manage inter-task dependencies.
1622 This more generic form allows for inter-dependency
1623 checks for specific tasks rather than checks for
1594 the data in <filename>DEPENDS</filename>. 1624 the data in <filename>DEPENDS</filename>.
1625 Here is an example:
1595 <literallayout class='monospaced'> 1626 <literallayout class='monospaced'>
1596 do_patch[depends] = "quilt-native:do_populate_staging" 1627 do_patch[depends] = "quilt-native:do_populate_staging"
1597 </literallayout> 1628 </literallayout>
1598 In the previous example, the <filename>do_populate_staging</filename> 1629 In this example, the <filename>do_populate_staging</filename>
1599 task of the target quilt-native must have completed before the 1630 task of the target <filename>quilt-native</filename>
1631 must have completed before the
1600 <filename>do_patch</filename> task can execute. 1632 <filename>do_patch</filename> task can execute.
1601 </para> 1633 </para>
1602 1634
1603 <para> 1635 <para>
1604 The 'rdepends' flag works in a similar way but takes targets 1636 The "rdepends" flag works in a similar way but takes targets
1605 in the runtime namespace instead of the build-time dependency 1637 in the runtime namespace instead of the build-time dependency
1606 namespace. 1638 namespace.
1607 </para> 1639 </para>