ref-manual: Clarify recommended operator for PROVIDES

Submitted by Joshua Watt on Jan. 19, 2021, 3:57 p.m. | Patch ID: 179208

Details

Message ID 20210119155751.11243-1-JPEWhacker@gmail.com
State Superseded
Headers show

Commit Message

Joshua Watt Jan. 19, 2021, 3:57 p.m.
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(-)

Patch hide | download patch | download mbox

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

Comments

Robert P. J. Day Jan. 19, 2021, 4 p.m.
On Tue, 19 Jan 2021, Joshua Watt wrote:

> 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
                                                        recommended

rday
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#853): https://lists.yoctoproject.org/g/docs/message/853
Mute This Topic: https://lists.yoctoproject.org/mt/79954502/3617530
Group Owner: docs+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Quentin Schulz Jan. 19, 2021, 4:03 p.m.
Hi Joshua,

On Tue, Jan 19, 2021 at 09:57:51AM -0600, Joshua Watt wrote:
> 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

s/included in the recipe aliases/included in its own PROVIDES list/ ?

Just a suggestion.

> +         example may not be strictly necessary it is recommend to avoid

s/recommend/recommended/

Thanks,
Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#854): https://lists.yoctoproject.org/g/docs/message/854
Mute This Topic: https://lists.yoctoproject.org/mt/79954502/3617530
Group Owner: docs+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Joshua Watt Jan. 19, 2021, 4:12 p.m.
On 1/19/21 10:03 AM, Quentin Schulz wrote:
> Hi Joshua,
>
> On Tue, Jan 19, 2021 at 09:57:51AM -0600, Joshua Watt wrote:
>> 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
> s/included in the recipe aliases/included in its own PROVIDES list/ ?
>
> Just a suggestion.

Hmm, yes. I was trying to avoid saying ${PN} was in PROVIDES because I 
though it wasn't, but I see that it is (using _prepend).


>
>> +         example may not be strictly necessary it is recommend to avoid
> s/recommend/recommended/
>
> Thanks,
> Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#855): https://lists.yoctoproject.org/g/docs/message/855
Mute This Topic: https://lists.yoctoproject.org/mt/79954502/3617530
Group Owner: docs+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Joshua Watt Jan. 20, 2021, 3:42 a.m.
This is a system generated Comment: Patch 179208 was automatically marked as superseded by patch 179209.