Yocto Project Documentation
 help / color / mirror / Atom feed
* [docs][PATCH] ref-manual: Clarify recommended operator for PROVIDES
@ 2021-01-19 15:57 Joshua Watt
  2021-01-19 16:00 ` Robert P. J. Day
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Joshua Watt @ 2021-01-19 15:57 UTC (permalink / raw)
  To: docs; +Cc: quentin.schulz, richard.purdie, rpjday, Joshua Watt

Updates the documentation for PROVIDES so that it recommends "+="
instead of "=".

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 documentation/ref-manual/variables.rst | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 4ce264813..2ea0cc36c 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -5915,23 +5915,17 @@ system and gives an overview of their function and contents.
       file ``eudev_3.2.9.bb``:
       ::
 
-         PROVIDES = "udev"
+         PROVIDES += "udev"
 
       The ``PROVIDES`` statement
       results in the "eudev" recipe also being available as simply "udev".
 
       .. note::
 
-         Given that a recipe's own recipe name is already implicitly in its
-         own PROVIDES list, it is unnecessary to add aliases with the "+=" operator;
-         using a simple assignment will be sufficient. In other words,
-         while you could write:
-         ::
-
-                 PROVIDES += "udev"
-
-
-         in the above, the "+=" is overkill and unnecessary.
+         A recipe's own recipe name (:term:`${PN}`) is always implicitly
+         included in the recipe aliases, so while using "+=" in the above
+         example may not be strictly necessary it is recommend to avoid
+         confusion.
 
       In addition to providing recipes under alternate names, the
       ``PROVIDES`` mechanism is also used to implement virtual targets. A
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-19 16:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-19 15:57 [docs][PATCH] ref-manual: Clarify recommended operator for PROVIDES Joshua Watt
2021-01-19 16:00 ` Robert P. J. Day
2021-01-19 16:03 ` Quentin Schulz
2021-01-19 16:12   ` Joshua Watt
2021-01-19 16:42 ` [docs][PATCH v2] " Joshua Watt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox