diff options
Diffstat (limited to 'documentation/ref-manual/ref-variables.xml')
-rw-r--r-- | documentation/ref-manual/ref-variables.xml | 146 |
1 files changed, 76 insertions, 70 deletions
diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml index afc36a5b14..188cd74935 100644 --- a/documentation/ref-manual/ref-variables.xml +++ b/documentation/ref-manual/ref-variables.xml | |||
@@ -2833,9 +2833,9 @@ | |||
2833 | add any runtime dependencies between the | 2833 | add any runtime dependencies between the |
2834 | packages produced by the two recipes. | 2834 | packages produced by the two recipes. |
2835 | However, as explained in the | 2835 | However, as explained in the |
2836 | <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link> | 2836 | "<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>" |
2837 | glossary entry, runtime dependencies will often | 2837 | section, runtime dependencies will often be |
2838 | be added automatically, meaning | 2838 | added automatically, meaning |
2839 | <filename>DEPENDS</filename> alone is | 2839 | <filename>DEPENDS</filename> alone is |
2840 | sufficient for most recipes. | 2840 | sufficient for most recipes. |
2841 | </para></listitem> | 2841 | </para></listitem> |
@@ -9651,14 +9651,16 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" | |||
9651 | <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link> | 9651 | <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link> |
9652 | task packages data for each recipe and installs it into | 9652 | task packages data for each recipe and installs it into |
9653 | this temporary, shared area. | 9653 | this temporary, shared area. |
9654 | This directory defaults to the following: | 9654 | This directory defaults to the following, which you should |
9655 | not change: | ||
9655 | <literallayout class='monospaced'> | 9656 | <literallayout class='monospaced'> |
9656 | ${STAGING_DIR_HOST}/pkgdata | 9657 | ${STAGING_DIR_HOST}/pkgdata |
9657 | </literallayout> | 9658 | </literallayout> |
9658 | </para> | 9659 | For examples of how this data is used, see the |
9659 | 9660 | "<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>" | |
9660 | <para> | 9661 | section and the |
9661 | Do not change this default. | 9662 | "<link linkend='viewing-package-information-with-oe-pkgdata-util'>Viewing Package Information with <filename>oe-pkgdata-util</filename></link>" |
9663 | section. | ||
9662 | </para> | 9664 | </para> |
9663 | </glossdef> | 9665 | </glossdef> |
9664 | </glossentry> | 9666 | </glossentry> |
@@ -10133,6 +10135,12 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" | |||
10133 | libplds4.so" | 10135 | libplds4.so" |
10134 | </literallayout> | 10136 | </literallayout> |
10135 | </para> | 10137 | </para> |
10138 | |||
10139 | <para> | ||
10140 | For more information, see the | ||
10141 | "<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>" | ||
10142 | section. | ||
10143 | </para> | ||
10136 | </glossdef> | 10144 | </glossdef> |
10137 | </glossentry> | 10145 | </glossentry> |
10138 | 10146 | ||
@@ -10427,40 +10435,60 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" | |||
10427 | 10435 | ||
10428 | <glossentry id='var-RDEPENDS'><glossterm>RDEPENDS</glossterm> | 10436 | <glossentry id='var-RDEPENDS'><glossterm>RDEPENDS</glossterm> |
10429 | <info> | 10437 | <info> |
10430 | RDEPENDS[doc] = "Lists a package's runtime dependencies (i.e. other packages) that must be installed for the package to be built. They must be the names of other packages as listed in the PACKAGES variable, not recipe names (PN)." | 10438 | RDEPENDS[doc] = "Lists runtime dependencies of a package." |
10431 | </info> | 10439 | </info> |
10432 | <glossdef> | 10440 | <glossdef> |
10433 | <para role="glossdeffirst"> | 10441 | <para role="glossdeffirst"> |
10434 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> | 10442 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> |
10435 | Lists a package's runtime dependencies (i.e. other packages) | 10443 | Lists runtime dependencies of a package. |
10436 | that must be installed in order for the built package to run | 10444 | These dependencies are other packages that must be |
10437 | correctly. | 10445 | installed in order for the package to function correctly. |
10438 | If a package in this list cannot be found during the build, | 10446 | As an example, the following assignment declares that the |
10439 | you will get a build error. | 10447 | package <filename>foo</filename> needs the packages |
10448 | <filename>bar</filename> and <filename>baz</filename> to | ||
10449 | be installed: | ||
10450 | <literallayout class='monospaced'> | ||
10451 | RDEPENDS_foo = "bar baz" | ||
10452 | </literallayout> | ||
10453 | The most common types of package runtime dependencies are | ||
10454 | automatically detected and added. | ||
10455 | Therefore, most recipes do not need to set | ||
10456 | <filename>RDEPENDS</filename>. | ||
10457 | For more information, see the | ||
10458 | "<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>" | ||
10459 | section. | ||
10460 | </para> | ||
10461 | |||
10462 | <para> | ||
10463 | The practical effect of the above | ||
10464 | <filename>RDEPENDS</filename> assignment is that | ||
10465 | <filename>bar</filename> and <filename>baz</filename> | ||
10466 | will be declared as dependencies inside the package | ||
10467 | <filename>foo</filename> when it is written out by one of | ||
10468 | the | ||
10469 | <link linkend='ref-tasks-package_write_deb'><filename>do_package_write_*</filename></link> | ||
10470 | tasks. | ||
10471 | Exactly how this is done depends on the package format used | ||
10472 | as described in the | ||
10473 | <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link> | ||
10474 | variable. | ||
10475 | When the corresponding package manager installs the | ||
10476 | package, it will know to also install the packages on | ||
10477 | which it depends. | ||
10440 | </para> | 10478 | </para> |
10441 | 10479 | ||
10442 | <para> | 10480 | <para> |
10443 | When you use the <filename>RDEPENDS</filename> variable | 10481 | To ensure that the packages <filename>bar</filename> and |
10444 | in a recipe, you are essentially stating that the recipe's | 10482 | <filename>baz</filename> get built, the previous |
10483 | <filename>RDEPENDS</filename> assignment also causes a task | ||
10484 | dependency to be added. | ||
10485 | This dependency is from the recipe's | ||
10445 | <link linkend='ref-tasks-build'><filename>do_build</filename></link> | 10486 | <link linkend='ref-tasks-build'><filename>do_build</filename></link> |
10446 | task depends on the existence of a specific package. | 10487 | (not to be confused with the |
10447 | Consider this simple example for two recipes named "a" and | 10488 | <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>) |
10448 | "b" that produce similarly named IPK packages. | 10489 | task to the to the <filename>do_package_write_*</filename> |
10449 | In this example, the <filename>RDEPENDS</filename> | 10490 | task of the recipes that build <filename>bar</filename> and |
10450 | statement appears in the "a" recipe: | 10491 | <filename>baz</filename>. |
10451 | <literallayout class='monospaced'> | ||
10452 | RDEPENDS_${PN} = "b" | ||
10453 | </literallayout> | ||
10454 | Here, the dependency is such that the | ||
10455 | <filename>do_build</filename> task for recipe "a" depends | ||
10456 | on the | ||
10457 | <link linkend='ref-tasks-package_write_ipk'><filename>do_package_write_ipk</filename></link> | ||
10458 | task of recipe "b". | ||
10459 | This means the package file for "b" must be available when | ||
10460 | the output for recipe "a" has been completely built. | ||
10461 | More importantly, package "a" will be marked as depending | ||
10462 | on package "b" in a manner that is understood by the | ||
10463 | package manager. | ||
10464 | </para> | 10492 | </para> |
10465 | 10493 | ||
10466 | <para> | 10494 | <para> |
@@ -10480,7 +10508,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" | |||
10480 | <para> | 10508 | <para> |
10481 | Because the <filename>RDEPENDS</filename> variable applies | 10509 | Because the <filename>RDEPENDS</filename> variable applies |
10482 | to packages being built, you should always use the variable | 10510 | to packages being built, you should always use the variable |
10483 | in a form with an attached package name. | 10511 | in a form with an attached package name (remember that a |
10512 | single recipe can build multiple packages). | ||
10484 | For example, suppose you are building a development package | 10513 | For example, suppose you are building a development package |
10485 | that depends on the <filename>perl</filename> package. | 10514 | that depends on the <filename>perl</filename> package. |
10486 | In this case, you would use the following | 10515 | In this case, you would use the following |
@@ -10508,41 +10537,18 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" | |||
10508 | </para> | 10537 | </para> |
10509 | 10538 | ||
10510 | <para> | 10539 | <para> |
10511 | The package name you attach to the | 10540 | The package names you use with |
10512 | <filename>RDEPENDS</filename> variable must appear | 10541 | <filename>RDEPENDS</filename> must appear as they would in |
10513 | as it would in the <filename>PACKAGES</filename> | 10542 | the <filename>PACKAGES</filename> variable. |
10514 | namespace before any renaming of the output package by | 10543 | The |
10515 | classes like | 10544 | <link linkend='var-PKG'><filename>PKG</filename></link> |
10516 | <link linkend='ref-classes-debian'><filename>debian</filename></link>. | 10545 | variable allows a different name to be used for |
10517 | </para> | 10546 | the final package (e.g. the |
10518 | 10547 | <link linkend='ref-classes-debian'><filename>debian</filename></link> | |
10519 | <para> | 10548 | class uses this to rename packages), but this final package |
10520 | In many cases you do not need to explicitly add | 10549 | name cannot be used with <filename>RDEPENDS</filename>, |
10521 | runtime dependencies using | 10550 | which makes sense as <filename>RDEPENDS</filename> is meant |
10522 | <filename>RDEPENDS</filename> since some automatic | 10551 | to be independent of the package format used. |
10523 | handling occurs: | ||
10524 | <itemizedlist> | ||
10525 | <listitem><para><emphasis><filename>shlibdeps</filename></emphasis>: | ||
10526 | If a runtime package contains a compiled binary, | ||
10527 | the build processes the binary in order to | ||
10528 | determine any shared libraries | ||
10529 | (<filename>.so</filename> files) to which it is | ||
10530 | dynamically linked. | ||
10531 | The build process adds the packages containing | ||
10532 | these libraries to <filename>RDEPENDS</filename> | ||
10533 | when creating the runtime package. | ||
10534 | In addition, if the shared library is versioned, | ||
10535 | the dependency will have the version appended to it | ||
10536 | in order to force an upgrade to the appropriate | ||
10537 | version if needed. | ||
10538 | </para></listitem> | ||
10539 | <listitem><para><emphasis><filename>pcdeps</filename></emphasis>: If | ||
10540 | the package ships a <filename>pkg-config</filename> | ||
10541 | information file, the build process uses this file | ||
10542 | to add items to the <filename>RDEPENDS</filename> | ||
10543 | variable to create the runtime packages. | ||
10544 | </para></listitem> | ||
10545 | </itemizedlist> | ||
10546 | </para> | 10552 | </para> |
10547 | 10553 | ||
10548 | <para> | 10554 | <para> |