mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
ref-manual: update PROVIDES example, clarify use of "+="
Update the example used in explaining the PROVIDES variable to one that actually exists, and point out that "+=" is unnecessary, a simple assignment is sufficient. (From yocto-docs rev: 80cd888ee81757bc5281f174b26974391ee45522) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
f63d44ab32
commit
5486dd3680
@@ -11542,23 +11542,35 @@
|
|||||||
By default, a recipe's own
|
By default, a recipe's own
|
||||||
<filename><link linkend='var-PN'>PN</link></filename>
|
<filename><link linkend='var-PN'>PN</link></filename>
|
||||||
is implicitly already in its <filename>PROVIDES</filename>
|
is implicitly already in its <filename>PROVIDES</filename>
|
||||||
list.
|
list and therefore does not need to mention that it provides itself.
|
||||||
If a recipe uses <filename>PROVIDES</filename>, the
|
If a recipe uses <filename>PROVIDES</filename>, the
|
||||||
additional aliases are synonyms for the recipe and can
|
additional aliases are synonyms for the recipe and can
|
||||||
be useful satisfying dependencies of other recipes during
|
be useful for satisfying dependencies of other recipes during
|
||||||
the build as specified by
|
the build as specified by
|
||||||
<filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>.
|
<filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Consider the following example
|
Consider the following example
|
||||||
<filename>PROVIDES</filename> statement from a recipe
|
<filename>PROVIDES</filename> statement from the recipe
|
||||||
file <filename>libav_0.8.11.bb</filename>:
|
file <filename>eudev_3.2.9.bb</filename>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
PROVIDES += "libpostproc"
|
PROVIDES = "udev"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
The <filename>PROVIDES</filename> statement results in
|
The <filename>PROVIDES</filename> statement results in
|
||||||
the "libav" recipe also being known as "libpostproc".
|
the "eudev" recipe also being available as simply "udev".
|
||||||
|
|
||||||
|
<note>
|
||||||
|
Given that a recipe's own recipe name is already
|
||||||
|
implicitly in its own <filename>PROVIDES</filename> list,
|
||||||
|
it is unnecessary to add aliases with the "+=" operator;
|
||||||
|
using a simple assignment will be sufficient. In other
|
||||||
|
words, while you could write:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
PROVIDES += "udev"
|
||||||
|
</literallayout>
|
||||||
|
in the above, the "+=" is overkill and unnecessary.
|
||||||
|
</note>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|||||||
Reference in New Issue
Block a user