ref-manual: update PROVIDES example, clarify use of "+="

Submitted by Robert P. J. Day on March 23, 2020, 1:57 p.m. | Patch ID: 171224


Message ID alpine.LFD.2.21.2003230956160.15521@localhost.localdomain
State New
Headers show

Commit Message

Robert P. J. Day March 23, 2020, 1:57 p.m.
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.

Signed-off-by: Robert P. J. Day <>


Patch hide | download patch | download mbox

diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml
index 7ab37de31..b3ecfed09 100644
--- a/documentation/ref-manual/ref-variables.xml
+++ b/documentation/ref-manual/ref-variables.xml
@@ -11544,23 +11544,35 @@ 
                     By default, a recipe's own
                     <filename><link linkend='var-PN'>PN</link></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
                     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
                     <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>.

                     Consider the following example
-                    <filename>PROVIDES</filename> statement from a recipe
-                    file <filename></filename>:
+                    <filename>PROVIDES</filename> statement from the recipe
+                    file <filename></filename>:
                     <literallayout class='monospaced'>
-     PROVIDES += "libpostproc"
+     PROVIDES = "udev"
                     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>