summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-04 10:50:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-06 06:34:58 +0100
commit0b973973f326f3a4c98c099210b93115449a6f61 (patch)
tree1136003444f2526226c4dd6d1a8235359bb62ff2
parent9a34ef5987d5e4a287a90b164fdcea544dc527b8 (diff)
downloadpoky-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.rst26
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::
325The variable ``FOO`` becomes 325The variable ``FOO`` becomes
326" 789 123456 " and ``FOO2`` becomes " abcdef ". 326" 789 123456 " and ``FOO2`` becomes " abcdef ".
327 327
328Like "_append" and "_prepend", "_remove" is applied at variable 328Like ":append" and ":prepend", ":remove" is applied at variable
329expansion time. 329expansion time.
330 330
331Override Style Operation Advantages 331Override Style Operation Advantages
332----------------------------------- 332-----------------------------------
333 333
334An advantage of the override style operations "_append", "_prepend", and 334An 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
336override style operators provide guaranteed operations. For example, 336override style operators provide guaranteed operations. For example,
337consider a class ``foo.bbclass`` that needs to add the value "val" to 337consider a class ``foo.bbclass`` that needs to add the value "val" to
338the variable ``FOO``, and a recipe that uses ``foo.bbclass`` as follows:: 338the 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
349If, on the other hand, ``foo.bbclass`` 349If, on the other hand, ``foo.bbclass``
350uses the "_append" operator, then the final value of ``FOO`` will be 350uses 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
380You can define, append, and prepend values to variable flags. All the 380You can define, append, and prepend values to variable flags. All the
381standard syntax operations previously mentioned work for variable flags 381standard syntax operations previously mentioned work for variable flags
382except for override style syntax (i.e. "_prepend", "_append", and 382except for override style syntax (i.e. ":prepend", ":append", and
383"_remove"). 383":remove").
384 384
385Here are some examples showing how to set variable flags:: 385Here 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
614There is often confusion concerning the order in which overrides and 614There is often confusion concerning the order in which overrides and
615various "append" operators take effect. Recall that an append or prepend 615various "append" operators take effect. Recall that an append or prepend
616operation using "_append" and "_prepend" does not result in an immediate 616operation using ":append" and ":prepend" does not result in an immediate
617assignment as would "+=", ".=", "=+", or "=.". Consider the following 617assignment as would "+=", ".=", "=+", or "=.". Consider the following
618example:: 618example::
619 619
@@ -671,7 +671,7 @@ For this case, the type of append
671operators are affecting the order of assignments as BitBake passes 671operators are affecting the order of assignments as BitBake passes
672through the code multiple times. Initially, ``A`` is set to "1 45" 672through the code multiple times. Initially, ``A`` is set to "1 45"
673because of the three statements that use immediate operators. After 673because of the three statements that use immediate operators. After
674these assignments are made, BitBake applies the "_append" operations. 674these assignments are made, BitBake applies the ":append" operations.
675Those operations result in ``A`` becoming "1 4523". 675Those operations result in ``A`` becoming "1 4523".
676 676
677Sharing Functionality 677Sharing Functionality
@@ -908,7 +908,7 @@ rules. The scripts are executed by ``/bin/sh``, which may not be a bash
908shell but might be something such as ``dash``. You should not use 908shell but might be something such as ``dash``. You should not use
909Bash-specific script (bashisms). 909Bash-specific script (bashisms).
910 910
911Overrides and override-style operators like ``_append`` and ``_prepend`` 911Overrides and override-style operators like ``:append`` and ``:prepend``
912can also be applied to shell functions. Most commonly, this application 912can also be applied to shell functions. Most commonly, this application
913would be used in a ``.bbappend`` file to modify functions in the main 913would be used in a ``.bbappend`` file to modify functions in the main
914recipe. It can also be used to modify functions inherited from classes. 914recipe. It can also be used to modify functions inherited from classes.
@@ -1135,7 +1135,7 @@ equivalent to the following snippet::
1135values set for the variables within the anonymous functions become 1135values set for the variables within the anonymous functions become
1136available to tasks, which always run after parsing. 1136available to tasks, which always run after parsing.
1137 1137
1138Overrides and override-style operators such as "``_append``" are applied 1138Overrides and override-style operators such as "``:append``" are applied
1139before anonymous functions run. In the following example, ``FOO`` ends 1139before anonymous functions run. In the following example, ``FOO`` ends
1140up with the value "foo from anonymous":: 1140up with the value "foo from anonymous"::
1141 1141
@@ -1165,7 +1165,7 @@ To understand the benefits of this feature, consider the basic scenario
1165where a class defines a task function and your recipe inherits the 1165where a class defines a task function and your recipe inherits the
1166class. In this basic scenario, your recipe inherits the task function as 1166class. In this basic scenario, your recipe inherits the task function as
1167defined in the class. If desired, your recipe can add to the start and 1167defined in the class. If desired, your recipe can add to the start and
1168end of the function by using the "_prepend" or "_append" operations 1168end of the function by using the ":prepend" or ":append" operations
1169respectively, or it can redefine the function completely. However, if it 1169respectively, or it can redefine the function completely. However, if it
1170redefines the function, there is no means for it to call the class 1170redefines the function, there is no means for it to call the class
1171version of the function. ``EXPORT_FUNCTIONS`` provides a mechanism that 1171version of the function. ``EXPORT_FUNCTIONS`` provides a mechanism that