ref-manual: Clarify recommended operator for PROVIDES
PATCH 1/1 ref-manual: Clarify recommended operator for PROVIDES
Updates the documentation for PROVIDES so that it recommends "+=" instead of "=".
--- documentation/ref-manual/variables.rst | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)
documentation/ref-manual/variables.rst +5 -11
@@ -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
Signature · 1 line
2.30.0
Quoted 27 lines · Joshua Watt
Updates the documentation for PROVIDES so that it recommends "+=" instead of "=".
Signed-off-by Joshua Watt <[email protected]>--- documentation/ref-manual/variables.rst | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)documentation/ref-manual/variables.rst +1
-4@@ -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,
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5927
Quoted 10 lines
documentation/ref-manual/variables.rst +3
-7- 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
Hi Joshua,
Quoted 26 lines · Joshua Watt
Updates the documentation for PROVIDES so that it recommends "+=" instead of "=".
Signed-off-by Joshua Watt <[email protected]>--- documentation/ref-manual/variables.rst | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)documentation/ref-manual/variables.rst +1
-3@@ -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;
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5926
Quoted 10 lines
documentation/ref-manual/variables.rst +2
-8- 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.
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5927
Quoted 1 line
documentation/ref-manual/variables.rst +1
-0+ example may not be strictly necessary it is recommend to avoid
s/recommend/recommended/
Thanks,
Quentin
Quoted 41 lines · Quentin Schulz
Hi Joshua,
Quoted 26 lines · Joshua Watt
Updates the documentation for PROVIDES so that it recommends "+=" instead of "=".
Signed-off-by Joshua Watt <[email protected]>--- documentation/ref-manual/variables.rst | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)documentation/ref-manual/variables.rst +1
-3@@ -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;documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5926
Quoted 10 lines
documentation/ref-manual/variables.rst +2
-8- 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 aboves/included in the recipe aliases/included in its own PROVIDES list/ ?
Quoted 1 line
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).
Quoted 6 lines
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 5927
Quoted 2 lines
documentation/ref-manual/variables.rst +1
-0+ example may not be strictly necessary it is recommend to avoids/recommend/recommended/
Thanks,
Quentin
PATCH v2 1/1 ref-manual: Clarify recommended operator for PROVIDES
In reply to Joshua WattUpdates the documentation for PROVIDES so that it recommends "+=" instead of "=".
--- documentation/ref-manual/variables.rst | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
documentation/ref-manual/variables.rst +4 -11
@@ -5915,23 +5915,16 @@ 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 prepended + to `PROVIDES`, so while using "+=" in the above example may not be + strictly necessary it is recommended to avoid confusion. In addition to providing recipes under alternate names, the ``PROVIDES`` mechanism is also used to implement virtual targets. A
Signature · 1 line
2.30.0