diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-04 10:50:35 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-06 06:34:58 +0100 |
commit | 0b973973f326f3a4c98c099210b93115449a6f61 (patch) | |
tree | 1136003444f2526226c4dd6d1a8235359bb62ff2 | |
parent | 9a34ef5987d5e4a287a90b164fdcea544dc527b8 (diff) | |
download | poky-0b973973f326f3a4c98c099210b93115449a6f61.tar.gz |
bitbake: doc: Fix append/prepend/remove references
Fix some references missed during the overrides syntax migration.
Thanks to Quentin Schulz <foss@0leil.net> for the patch.
(Bitbake rev: 2fd03ec7b136c694f2ced43b3abb69f719c99ec2)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst index 6b88fd11e0..b0494d0809 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | |||
@@ -325,14 +325,14 @@ Surrounding spaces and spacing are preserved. Here is an example:: | |||
325 | The variable ``FOO`` becomes | 325 | The variable ``FOO`` becomes |
326 | " 789 123456 " and ``FOO2`` becomes " abcdef ". | 326 | " 789 123456 " and ``FOO2`` becomes " abcdef ". |
327 | 327 | ||
328 | Like "_append" and "_prepend", "_remove" is applied at variable | 328 | Like ":append" and ":prepend", ":remove" is applied at variable |
329 | expansion time. | 329 | expansion time. |
330 | 330 | ||
331 | Override Style Operation Advantages | 331 | Override Style Operation Advantages |
332 | ----------------------------------- | 332 | ----------------------------------- |
333 | 333 | ||
334 | An advantage of the override style operations "_append", "_prepend", and | 334 | An advantage of the override style operations ":append", ":prepend", and |
335 | "_remove" as compared to the "+=" and "=+" operators is that the | 335 | ":remove" as compared to the "+=" and "=+" operators is that the |
336 | override style operators provide guaranteed operations. For example, | 336 | override style operators provide guaranteed operations. For example, |
337 | consider a class ``foo.bbclass`` that needs to add the value "val" to | 337 | consider a class ``foo.bbclass`` that needs to add the value "val" to |
338 | the variable ``FOO``, and a recipe that uses ``foo.bbclass`` as follows:: | 338 | the variable ``FOO``, and a recipe that uses ``foo.bbclass`` as follows:: |
@@ -347,14 +347,14 @@ not what is desired:: | |||
347 | FOO += "val" | 347 | FOO += "val" |
348 | 348 | ||
349 | If, on the other hand, ``foo.bbclass`` | 349 | If, on the other hand, ``foo.bbclass`` |
350 | uses the "_append" operator, then the final value of ``FOO`` will be | 350 | uses the ":append" operator, then the final value of ``FOO`` will be |
351 | "initial val", as intended:: | 351 | "initial val", as intended:: |
352 | 352 | ||
353 | FOO:append = " val" | 353 | FOO:append = " val" |
354 | 354 | ||
355 | .. note:: | 355 | .. note:: |
356 | 356 | ||
357 | It is never necessary to use "+=" together with "_append". The following | 357 | It is never necessary to use "+=" together with ":append". The following |
358 | sequence of assignments appends "barbaz" to FOO:: | 358 | sequence of assignments appends "barbaz" to FOO:: |
359 | 359 | ||
360 | FOO:append = "bar" | 360 | FOO:append = "bar" |
@@ -379,8 +379,8 @@ You can find more out about variable flags in general in the | |||
379 | 379 | ||
380 | You can define, append, and prepend values to variable flags. All the | 380 | You can define, append, and prepend values to variable flags. All the |
381 | standard syntax operations previously mentioned work for variable flags | 381 | standard syntax operations previously mentioned work for variable flags |
382 | except for override style syntax (i.e. "_prepend", "_append", and | 382 | except for override style syntax (i.e. ":prepend", ":append", and |
383 | "_remove"). | 383 | ":remove"). |
384 | 384 | ||
385 | Here are some examples showing how to set variable flags:: | 385 | Here are some examples showing how to set variable flags:: |
386 | 386 | ||
@@ -581,7 +581,7 @@ variable. | |||
581 | ``do_compile`` task. | 581 | ``do_compile`` task. |
582 | 582 | ||
583 | You can also use this syntax with other combinations (e.g. | 583 | You can also use this syntax with other combinations (e.g. |
584 | "``_prepend``") as shown in the following example:: | 584 | "``:prepend``") as shown in the following example:: |
585 | 585 | ||
586 | EXTRA_OEMAKE:prepend:task-compile = "${PARALLEL_MAKE} " | 586 | EXTRA_OEMAKE:prepend:task-compile = "${PARALLEL_MAKE} " |
587 | 587 | ||
@@ -613,7 +613,7 @@ users. | |||
613 | 613 | ||
614 | There is often confusion concerning the order in which overrides and | 614 | There is often confusion concerning the order in which overrides and |
615 | various "append" operators take effect. Recall that an append or prepend | 615 | various "append" operators take effect. Recall that an append or prepend |
616 | operation using "_append" and "_prepend" does not result in an immediate | 616 | operation using ":append" and ":prepend" does not result in an immediate |
617 | assignment as would "+=", ".=", "=+", or "=.". Consider the following | 617 | assignment as would "+=", ".=", "=+", or "=.". Consider the following |
618 | example:: | 618 | example:: |
619 | 619 | ||
@@ -671,7 +671,7 @@ For this case, the type of append | |||
671 | operators are affecting the order of assignments as BitBake passes | 671 | operators are affecting the order of assignments as BitBake passes |
672 | through the code multiple times. Initially, ``A`` is set to "1 45" | 672 | through the code multiple times. Initially, ``A`` is set to "1 45" |
673 | because of the three statements that use immediate operators. After | 673 | because of the three statements that use immediate operators. After |
674 | these assignments are made, BitBake applies the "_append" operations. | 674 | these assignments are made, BitBake applies the ":append" operations. |
675 | Those operations result in ``A`` becoming "1 4523". | 675 | Those operations result in ``A`` becoming "1 4523". |
676 | 676 | ||
677 | Sharing Functionality | 677 | Sharing Functionality |
@@ -908,7 +908,7 @@ rules. The scripts are executed by ``/bin/sh``, which may not be a bash | |||
908 | shell but might be something such as ``dash``. You should not use | 908 | shell but might be something such as ``dash``. You should not use |
909 | Bash-specific script (bashisms). | 909 | Bash-specific script (bashisms). |
910 | 910 | ||
911 | Overrides and override-style operators like ``_append`` and ``_prepend`` | 911 | Overrides and override-style operators like ``:append`` and ``:prepend`` |
912 | can also be applied to shell functions. Most commonly, this application | 912 | can also be applied to shell functions. Most commonly, this application |
913 | would be used in a ``.bbappend`` file to modify functions in the main | 913 | would be used in a ``.bbappend`` file to modify functions in the main |
914 | recipe. It can also be used to modify functions inherited from classes. | 914 | recipe. It can also be used to modify functions inherited from classes. |
@@ -1135,7 +1135,7 @@ equivalent to the following snippet:: | |||
1135 | values set for the variables within the anonymous functions become | 1135 | values set for the variables within the anonymous functions become |
1136 | available to tasks, which always run after parsing. | 1136 | available to tasks, which always run after parsing. |
1137 | 1137 | ||
1138 | Overrides and override-style operators such as "``_append``" are applied | 1138 | Overrides and override-style operators such as "``:append``" are applied |
1139 | before anonymous functions run. In the following example, ``FOO`` ends | 1139 | before anonymous functions run. In the following example, ``FOO`` ends |
1140 | up with the value "foo from anonymous":: | 1140 | up with the value "foo from anonymous":: |
1141 | 1141 | ||
@@ -1165,7 +1165,7 @@ To understand the benefits of this feature, consider the basic scenario | |||
1165 | where a class defines a task function and your recipe inherits the | 1165 | where a class defines a task function and your recipe inherits the |
1166 | class. In this basic scenario, your recipe inherits the task function as | 1166 | class. In this basic scenario, your recipe inherits the task function as |
1167 | defined in the class. If desired, your recipe can add to the start and | 1167 | defined in the class. If desired, your recipe can add to the start and |
1168 | end of the function by using the "_prepend" or "_append" operations | 1168 | end of the function by using the ":prepend" or ":append" operations |
1169 | respectively, or it can redefine the function completely. However, if it | 1169 | respectively, or it can redefine the function completely. However, if it |
1170 | redefines the function, there is no means for it to call the class | 1170 | redefines the function, there is no means for it to call the class |
1171 | version of the function. ``EXPORT_FUNCTIONS`` provides a mechanism that | 1171 | version of the function. ``EXPORT_FUNCTIONS`` provides a mechanism that |