documentation: poky-ref-manual - Updates to DEPENDS and RDEPENDS

Suggested changes to help clear up what the list of items
in each of these variables should be and how automatic
handling of libraries is dealt with.

Richard Purdie reviewed the changes.

(From yocto-docs rev: 53865f904d5d4675286419a57bbb9282edfc1d0b)

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 2012-10-19 10:06:39 -07:00 committed by Richard Purdie
parent 50247c8f6e
commit 2889498dbb
1 changed files with 52 additions and 34 deletions

View File

@ -435,9 +435,11 @@
<glossentry id='var-DEPENDS'><glossterm>DEPENDS</glossterm> <glossentry id='var-DEPENDS'><glossterm>DEPENDS</glossterm>
<glossdef> <glossdef>
<para> <para>
A list of build-time dependencies for a given recipe. Lists a recipe's build-time dependencies
The variable indicates recipes that must have been staged before a (i.e. other recipe files).
particular recipe can configure. The system ensures that all the dependencies listed
have been built and have their contents in the appropriate
sysroots before the recipe's configure task is executed.
</para> </para>
</glossdef> </glossdef>
</glossentry> </glossentry>
@ -2002,45 +2004,61 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossentry id='var-RDEPENDS'><glossterm>RDEPENDS</glossterm> <glossentry id='var-RDEPENDS'><glossterm>RDEPENDS</glossterm>
<glossdef> <glossdef>
<para> <para>
A list of packages that must be installed as part of a package being built. Lists a package's run-time dependencies (i.e. other packages)
The package being built has a runtime dependency on the packages in the that must be installed for the package to be built.
variable's list. In other words, in order for the package to be built and
In other words, in order for the package being built to run correctly, run correctly, it depends on the listed packages.
it depends on these listed packages. If a package in this list cannot be found, it is probable
If a package in this list cannot be found during the build, the build that a dependency error would occur before the build.
will not complete.
</para> </para>
<para> <para>
Because the <filename>RDEPENDS</filename> variable applies to packages The names of the variables you list with
being built, you should <filename>RDEPENDS</filename> must be the names of other
always attach an override to the variable to specify the particular runtime package packages as listed in the
that has the dependency. <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
For example, suppose you are building a development package that depends variable.
on the <filename>perl</filename> package. You should not list recipe names (<filename>PN</filename>).
In this case, you would use the following <filename>RDEPENDS</filename> </para>
statement:
<para>
Because the <filename>RDEPENDS</filename> variable applies
to packages being built, you should
always attach a package name to the variable to specify the
particular run-time package that has the dependency.
For example, suppose you are building a development package
that depends on the <filename>perl</filename> package.
In this case, you would use the following
<filename>RDEPENDS</filename> statement:
<literallayout class='monospaced'> <literallayout class='monospaced'>
RDEPENDS_${PN}-dev += "perl" RDEPENDS_${PN}-dev += "perl"
</literallayout> </literallayout>
In the example, the package name (<filename>${PN}-dev</filename>) must In the example, the package name
appear as it would in the (<filename>${PN}-dev</filename>) must appear as it would
<filename><link linkend='var-PACKAGES'>PACKAGES</link></filename> namespace before any in the
renaming of the output package by classes like <filename>debian.bbclass</filename>. <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
namespace before any renaming of the output package by
classes like <filename>debian.bbclass</filename>.
</para> </para>
<para> <para>
Some automatic handling occurs around the <filename>RDEPENDS</filename> In many cases you do not need to explicitly add dependencies
variable: to <filename>RDEPENDS</filename> since some automatic
handling occurs:
<itemizedlist> <itemizedlist>
<listitem><para><emphasis><filename>shlibdeps</filename></emphasis>: If a runtime <listitem><para><emphasis><filename>shlibdeps</filename></emphasis>: If
package contains a shared library (<filename>.so</filename>), the build a run-time package contains a shared library
processes the library in order to determine other libraries to which it (<filename>.so</filename>), the build
is dynamically linked. processes the library in order to determine other
The build process adds these libraries to <filename>RDEPENDS</filename> libraries to which it is dynamically linked.
to create the runtime package.</para></listitem> The build process adds these libraries to
<listitem><para><emphasis><filename>pcdeps</filename></emphasis>: If the package <filename>RDEPENDS</filename> when creating the run-time
ships a <filename>pkg-config</filename> information file, the build process package.</para></listitem>
uses this file to add items to the <filename>RDEPENDS</filename> <listitem><para><emphasis><filename>pcdeps</filename></emphasis>: If
variable to create the runtime packages. the package ships a <filename>pkg-config</filename>
information file, the build process uses this file
to add items to the <filename>RDEPENDS</filename>
variable to create the run-time packages.
</para></listitem> </para></listitem>
</itemizedlist> </itemizedlist>
</para> </para>