From: Claudius Heine <ch@denx.de>
To: isar-users@googlegroups.com
Cc: Claudius Heine <ch@denx.de>
Subject: [PATCH] inc files: append local files path to FILESPATH
Date: Wed, 5 Jul 2023 10:11:36 +0200 [thread overview]
Message-ID: <20230705081136.606969-1-ch@denx.de> (raw)
FILESEXTRAPATHS is meant to allow bbappend files to overwrite files from
their recipe. For this reason the 'normal' pattern in bbappend files is
to prepend the local file path to FILESEXTRAPATHS, which results in
files from the local file path to be preferred over files from the
original recipe, or other, lower prioritized bbappend files.
The `.inc` files are meant to be included by other recipes (`.bb`)
files. So it should still allow the recipe (`.bb` file) to overwrite
files its files that where added via the default recipes `FILESPATH`
search path.
If a `.inc` file use `FILESEXTRAPATHS:prepend` to add its local file
path to `FILESPATH`, then the recipe, that includes the `.inc` file
would have to use `FILESEXTRAPATHS:prepend` as well, after including the
`.inc` file in order to overwrite the local files from the `.inc` file.
However this is only a workaround of the issue that originates from the
`.inc` file using the `FILESEXTRAPATHS` variable.
`.inc` should append its local file search path to `FILESPATH`, so that
it allows other recipes to overwrite any file from it via its default
`FILESPATH`, without requiring an additional workaround.
This patch replaces all occurences of
FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
with
FILESPATH:append := ":${FILE_DIRNAME}/files"
in the `.inc` files.
Signed-off-by: Claudius Heine <ch@denx.de>
---
meta/recipes-bsp/barebox/barebox.inc | 2 +-
meta/recipes-bsp/optee-os/optee-os-custom.inc | 2 +-
.../trusted-firmware-a/trusted-firmware-a-custom.inc | 2 +-
meta/recipes-bsp/u-boot/u-boot-custom.inc | 2 +-
meta/recipes-kernel/kselftest/kselftest.inc | 2 +-
meta/recipes-kernel/linux-module/module.inc | 2 +-
meta/recipes-kernel/linux/linux-custom.inc | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/meta/recipes-bsp/barebox/barebox.inc b/meta/recipes-bsp/barebox/barebox.inc
index 2999113..73694e2 100644
--- a/meta/recipes-bsp/barebox/barebox.inc
+++ b/meta/recipes-bsp/barebox/barebox.inc
@@ -14,7 +14,7 @@ BAREBOX_BUILD_DIR ?= "build"
BAREBOX_VERSION_EXTENSION ?= ""
BAREBOX_ENV ?= ""
-FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
+FILESPATH:append := ":${FILE_DIRNAME}/files"
SRC_URI += "file://rules.tmpl \
file://version.cfg.tmpl \
file://defaultenv.cfg.tmpl"
diff --git a/meta/recipes-bsp/optee-os/optee-os-custom.inc b/meta/recipes-bsp/optee-os/optee-os-custom.inc
index d48827a..57eddbc 100644
--- a/meta/recipes-bsp/optee-os/optee-os-custom.inc
+++ b/meta/recipes-bsp/optee-os/optee-os-custom.inc
@@ -7,7 +7,7 @@
inherit dpkg
-FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
+FILESPATH:append := ":${FILE_DIRNAME}/files"
SRC_URI += "file://debian/"
diff --git a/meta/recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc b/meta/recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc
index 052d9a4..def4be8 100644
--- a/meta/recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc
+++ b/meta/recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc
@@ -7,7 +7,7 @@
inherit dpkg
-FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
+FILESPATH:append := ":${FILE_DIRNAME}/files"
SRC_URI += "file://debian/"
diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
index 876eb36..f16906c 100644
--- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
@@ -5,7 +5,7 @@
#
# SPDX-License-Identifier: MIT
-FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
+FILESPATH:append := ":${FILE_DIRNAME}/files"
DESCRIPTION ?= "Custom U-Boot"
diff --git a/meta/recipes-kernel/kselftest/kselftest.inc b/meta/recipes-kernel/kselftest/kselftest.inc
index eb61582..be13b48 100644
--- a/meta/recipes-kernel/kselftest/kselftest.inc
+++ b/meta/recipes-kernel/kselftest/kselftest.inc
@@ -7,7 +7,7 @@
inherit dpkg
-FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+FILESPATH:append := ":${THISDIR}/files"
# Some test-cases like memfd compilation failed in cross-compilation.
# Force native compilation for now to have consistent output across
diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc
index 76ad860..333c66b 100644
--- a/meta/recipes-kernel/linux-module/module.inc
+++ b/meta/recipes-kernel/linux-module/module.inc
@@ -5,7 +5,7 @@
#
# SPDX-License-Identifier: MIT
-FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
+FILESPATH:append := ":${FILE_DIRNAME}/files"
DESCRIPTION ?= "Custom kernel module ${PN}"
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 1404ab0..b9c9721 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -47,7 +47,7 @@ LINUX_VERSION_EXTENSION ?= ""
KERNEL_DEFCONFIG ??= ""
# Add our template meta-data to the sources
-FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
+FILESPATH:append := ":${FILE_DIRNAME}/files"
SRC_URI += "file://debian"
# Variables and files that make our templates
--
2.40.1
next reply other threads:[~2023-07-05 8:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 8:11 Claudius Heine [this message]
2023-08-02 21:34 ` Uladzimir Bely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230705081136.606969-1-ch@denx.de \
--to=ch@denx.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox