diff mbox series

[langdale] arm/classes: Ensure patch files are sorted in apply_local_src_patches

Message ID 20230110133859.2230025-1-peter.hoyes@arm.com
State New
Headers show
Series [langdale] arm/classes: Ensure patch files are sorted in apply_local_src_patches | expand

Commit Message

Peter Hoyes Jan. 10, 2023, 1:38 p.m. UTC
From: Peter Hoyes <Peter.Hoyes@arm.com>

apply_local_src_patches.bbclass was added in a previous patch to handle
the application of patch files located inside the fetched source code.

find is used to collect the patch files which does not guarantee the
order of its output. Pipe the output of find into sort to ensure patch
files are applied in the correct order.

Issue-Id: SCM-5864
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I1082fb7a726a7745289a5aa8bb6447bef57a94b0
---
 meta-arm/classes/apply_local_src_patches.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jon Mason Jan. 10, 2023, 6:27 p.m. UTC | #1
On Tue, 10 Jan 2023 13:38:59 +0000, Peter Hoyes wrote:
> apply_local_src_patches.bbclass was added in a previous patch to handle
> the application of patch files located inside the fetched source code.
> 
> find is used to collect the patch files which does not guarantee the
> order of its output. Pipe the output of find into sort to ensure patch
> files are applied in the correct order.

Applied, thanks!

[1/1] arm/classes: Ensure patch files are sorted in apply_local_src_patches
      commit: 8b95c97a00c9b6dea4221726c0ef58c6c4a3175f

Best regards,
Jon Mason Jan. 13, 2023, 6:05 p.m. UTC | #2
On Tue, 10 Jan 2023 13:38:59 +0000, Peter Hoyes wrote:
> apply_local_src_patches.bbclass was added in a previous patch to handle
> the application of patch files located inside the fetched source code.
> 
> find is used to collect the patch files which does not guarantee the
> order of its output. Pipe the output of find into sort to ensure patch
> files are applied in the correct order.

Applied, thanks!

[1/1] arm/classes: Ensure patch files are sorted in apply_local_src_patches
      commit: 8b95c97a00c9b6dea4221726c0ef58c6c4a3175f

Best regards,
diff mbox series

Patch

diff --git a/meta-arm/classes/apply_local_src_patches.bbclass b/meta-arm/classes/apply_local_src_patches.bbclass
index daa85f4c..e1939353 100644
--- a/meta-arm/classes/apply_local_src_patches.bbclass
+++ b/meta-arm/classes/apply_local_src_patches.bbclass
@@ -32,7 +32,7 @@  apply_local_src_patches() {
     export QUILT_PATCHES=./patches-extra
     mkdir -p patches-extra
 
-    for patch in $(find $input_dir -type f -name *.patch -or -name *.diff)
+    for patch in $(find $input_dir -type f -name *.patch -or -name *.diff | sort)
     do
         patch_basename=`basename $patch`
         if ! quilt applied $patch_basename >/dev/null ; then