From f57e4e537e4b194303a5f259a33390dfda7becf2 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Wed, 27 Oct 2021 15:06:19 +0200 Subject: [PATCH] pkg/arch: Use git to apply commits Applying patches with 'patch' creates problems when renaming files and changing them later in a different change in the the same patch file, causing patch to complain that the file does not exist. So use 'git am' instead. --- pkg/arch/kernel/PKGBUILD | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/arch/kernel/PKGBUILD b/pkg/arch/kernel/PKGBUILD index ca6593daa..60c469c00 100644 --- a/pkg/arch/kernel/PKGBUILD +++ b/pkg/arch/kernel/PKGBUILD @@ -77,13 +77,17 @@ prepare() { echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname + # setup git + git config --global user.email "surfacebot@users.noreply.github.com" + git config --global user.name "surfacebot" + local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue echo "Applying patch $src..." - patch -Np1 < "../$src" + git am -3 "../$src" done echo "Setting config..."