From b9155febc20f521adc00873a9097be0a016b5a20 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Tue, 1 Aug 2023 21:33:34 +0200 Subject: [PATCH] pkg: debian: Sort patches before applying them --- .github/scripts/package/debian.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/scripts/package/debian.sh b/.github/scripts/package/debian.sh index bc9f3cc58..bb6f3b6a6 100644 --- a/.github/scripts/package/debian.sh +++ b/.github/scripts/package/debian.sh @@ -76,16 +76,17 @@ build-packages) pushd linux || exit 1 # apply surface build/packaging patches - find .. -name '*.patch' -type f -print0 | xargs -0 -I '{}' \ + find .. -name '*.patch' -type f -print0 | sort -z | xargs -0 -I '{}' \ git apply --index --reject {} git add . git commit --allow-empty -m "Apply linux-surface packaging patches" KERNEL_MAJORVER="${KERNEL_VERSION%.*}" + PATCHES="../../../../patches/${KERNEL_MAJORVER}" # apply surface patches - find "../../../../patches/${KERNEL_MAJORVER}" -name '*.patch' -type f -print0 | xargs -0 -I '{}' \ + find "${PATCHES}" -name '*.patch' -type f -print0 | sort -z | xargs -0 -I '{}' \ git apply --index --reject {} git add .