diff options
author | Mikko Rapeli <mikko.rapeli@linaro.org> | 2022-09-20 10:45:47 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-09-24 17:44:55 +0100 |
commit | f54b2789d9a1945b749ddf43c6fda114178c1d6b (patch) | |
tree | 508c36c8b5e1dda898f20612b4421e0ec166e8f2 /documentation/dev-manual | |
parent | b26546f537b90c5b5ba3131b2fe2f93d16549b1c (diff) | |
download | poky-f54b2789d9a1945b749ddf43c6fda114178c1d6b.tar.gz |
common-tasks.rst: remove SRC_URI:append from examples
Using SRC_URI:append without recipe, machine or architecture specific
limitations makes the :append'ed text more difficult to override than if
the "+=" operator was used. This makes it hard for example to override
SRC_URI completely in a bbappend to update the full recipe to a newer
version. Thus common, reusable layers which users are meant to re-use
and customize should not use SRC_URI:append but SRC_URI += instead.
(From yocto-docs rev: 34533ac2ee5d85a41330dd865062dce1e46b83fc)
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r-- | documentation/dev-manual/common-tasks.rst | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/documentation/dev-manual/common-tasks.rst b/documentation/dev-manual/common-tasks.rst index bdc528b723..17d1433150 100644 --- a/documentation/dev-manual/common-tasks.rst +++ b/documentation/dev-manual/common-tasks.rst | |||
@@ -2577,7 +2577,7 @@ chapter of the BitBake User Manual. | |||
2577 | 2577 | ||
2578 | S = "${WORKDIR}/postfix-${PV}" | 2578 | S = "${WORKDIR}/postfix-${PV}" |
2579 | CFLAGS += "-DNO_ASM" | 2579 | CFLAGS += "-DNO_ASM" |
2580 | SRC_URI:append = " file://fixup.patch" | 2580 | CFLAGS:append = " --enable-important-feature" |
2581 | 2581 | ||
2582 | - *Functions:* Functions provide a series of actions to be performed. | 2582 | - *Functions:* Functions provide a series of actions to be performed. |
2583 | You usually use functions to override the default implementation of a | 2583 | You usually use functions to override the default implementation of a |
@@ -2708,19 +2708,21 @@ in the BitBake User Manual. | |||
2708 | to existing variables. This operator does not add any additional | 2708 | to existing variables. This operator does not add any additional |
2709 | space. Also, the operator is applied after all the ``+=``, and ``=+`` | 2709 | space. Also, the operator is applied after all the ``+=``, and ``=+`` |
2710 | operators have been applied and after all ``=`` assignments have | 2710 | operators have been applied and after all ``=`` assignments have |
2711 | occurred. | 2711 | occurred. This means that if ``:append`` is used in a recipe, it can |
2712 | only be overridden by another layer using the special ``:remove`` | ||
2713 | operator, which in turn will prevent further layers from adding it back. | ||
2712 | 2714 | ||
2713 | The following example shows the space being explicitly added to the | 2715 | The following example shows the space being explicitly added to the |
2714 | start to ensure the appended value is not merged with the existing | 2716 | start to ensure the appended value is not merged with the existing |
2715 | value:: | 2717 | value:: |
2716 | 2718 | ||
2717 | SRC_URI:append = " file://fix-makefile.patch" | 2719 | CFLAGS:append = " --enable-important-feature" |
2718 | 2720 | ||
2719 | You can also use | 2721 | You can also use |
2720 | the ``:append`` operator with overrides, which results in the actions | 2722 | the ``:append`` operator with overrides, which results in the actions |
2721 | only being performed for the specified target or machine:: | 2723 | only being performed for the specified target or machine:: |
2722 | 2724 | ||
2723 | SRC_URI:append:sh4 = " file://fix-makefile.patch" | 2725 | CFLAGS:append:sh4 = " --enable-important-sh4-specific-feature" |
2724 | 2726 | ||
2725 | - *Prepending (:prepend):* Use the ``:prepend`` operator to prepend | 2727 | - *Prepending (:prepend):* Use the ``:prepend`` operator to prepend |
2726 | values to existing variables. This operator does not add any | 2728 | values to existing variables. This operator does not add any |