public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] inc files: append local files path to FILESPATH
@ 2023-07-05  8:11 Claudius Heine
  2023-08-02 21:34 ` Uladzimir Bely
  0 siblings, 1 reply; 2+ messages in thread
From: Claudius Heine @ 2023-07-05  8:11 UTC (permalink / raw)
  To: isar-users; +Cc: Claudius Heine

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


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

* Re: [PATCH] inc files: append local files path to FILESPATH
  2023-07-05  8:11 [PATCH] inc files: append local files path to FILESPATH Claudius Heine
@ 2023-08-02 21:34 ` Uladzimir Bely
  0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2023-08-02 21:34 UTC (permalink / raw)
  To: Claudius Heine, isar-users

On Wed, 2023-07-05 at 10:11 +0200, Claudius Heine wrote:
> 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>

Applied to next, thanks.

New .inc files from new optee* recipes were also considered.

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

end of thread, other threads:[~2023-08-02 21:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-05  8:11 [PATCH] inc files: append local files path to FILESPATH Claudius Heine
2023-08-02 21:34 ` Uladzimir Bely

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