[PATCH] arm/classes: add apply_local_src_patches task

Clement Faure <[email protected]> Mon, 1 Dec 2025 09:27:30 +0100
Newsgroups org.yoctoproject.lists.meta-arm
Message-ID <[email protected]>
When a recipe uses the externalsrc class, the do_patch task is
skipped entirely as specified in SRCTREECOVEREDTASKS.
Since do_apply_local_src_patches function is registered as a postfuncs,
it would never run in that specific case.

This cause recipes relying on do_apply_local_src_patches to miss the
local source patching when built from external source tree.

To address the issue, schedule a new task after the do_patch and before
the do_configure, ensuring the local patching executes regardless of
whether do_patch was skipped by externalsrc.

Signed-off-by: Clement Faure <[email protected]>
---
 meta-arm/classes/apply_local_src_patches.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-arm/classes/apply_local_src_patches.bbclass b/meta-arm/classes/apply_local_src_patches.bbclass
index 0897b51b..64ed19e5 100644
--- a/meta-arm/classes/apply_local_src_patches.bbclass
+++ b/meta-arm/classes/apply_local_src_patches.bbclass
@@ -50,4 +50,4 @@ apply_local_src_patches() {
 do_apply_local_src_patches() {
     apply_local_src_patches "${LOCAL_SRC_PATCHES_INPUT_DIR}" "${LOCAL_SRC_PATCHES_DEST_DIR}"
 }
-do_patch[postfuncs] += "do_apply_local_src_patches"
+addtask apply_local_src_patches after do_patch before do_configure
-- 
2.43.0