public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH 1/7] common-tasks.rst: remove SRC_URI:append from examples
@ 2022-09-12  7:32 Mikko Rapeli
  2022-09-12  7:32 ` [PATCH 2/7] kernel-dev/common.rst: " Mikko Rapeli
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Mikko Rapeli @ 2022-09-12  7:32 UTC (permalink / raw)
  To: openembedded-core, docs; +Cc: Mikko Rapeli

Using SRC_URI:append without recipe, machine or architecture
specific limitations makes the :append'ed text unremovable
and thus users and custom layers can not change the variable
anymore. This makes it hard to e.g. 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.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 documentation/dev-manual/common-tasks.rst | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/documentation/dev-manual/common-tasks.rst b/documentation/dev-manual/common-tasks.rst
index b08a55331d..3112f9b893 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.
 
       S = "${WORKDIR}/postfix-${PV}"
       CFLAGS += "-DNO_ASM"
-      SRC_URI:append = " file://fixup.patch"
+      CFLAGS:append = " --enable-important-feature"
 
 -  *Functions:* Functions provide a series of actions to be performed.
    You usually use functions to override the default implementation of a
@@ -2708,19 +2708,20 @@ in the BitBake User Manual.
    to existing variables. This operator does not add any additional
    space. Also, the operator is applied after all the ``+=``, and ``=+``
    operators have been applied and after all ``=`` assignments have
-   occurred.
+   occurred. This means that if ``:append`` is used, that text can not be
+   removed.
 
    The following example shows the space being explicitly added to the
    start to ensure the appended value is not merged with the existing
    value::
 
-      SRC_URI:append = " file://fix-makefile.patch"
+      CFLAGS:append = " --enable-important-feature"
 
    You can also use
    the ``:append`` operator with overrides, which results in the actions
    only being performed for the specified target or machine::
 
-      SRC_URI:append:sh4 = " file://fix-makefile.patch"
+      CFLAGS:append:sh4 = " --enable-important-sh4-specific-feature"
 
 -  *Prepending (:prepend):* Use the ``:prepend`` operator to prepend
    values to existing variables. This operator does not add any
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-09-20  7:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-12  7:32 [PATCH 1/7] common-tasks.rst: remove SRC_URI:append from examples Mikko Rapeli
2022-09-12  7:32 ` [PATCH 2/7] kernel-dev/common.rst: " Mikko Rapeli
2022-09-12  7:32 ` [PATCH 3/7] u-boot: switch from append to += in SRC_URI Mikko Rapeli
2022-09-12  7:32 ` [PATCH 4/7] glibc-tests: use += instead of :append Mikko Rapeli
2022-09-12  7:32 ` [PATCH 5/7] go-native: switch from SRC_URI:append to SRC_URI += Mikko Rapeli
2022-09-12  7:32 ` [PATCH 6/7] python3-rfc3986-validator: " Mikko Rapeli
2022-09-12  7:32 ` [PATCH 7/7] linux-libc-headers: " Mikko Rapeli
2022-09-19 15:04 ` [docs] [PATCH 1/7] common-tasks.rst: remove SRC_URI:append from examples Quentin Schulz
2022-09-19 20:35   ` [OE-core] " Michael Opdenacker
2022-09-20  7:34     ` Mikko Rapeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox