From ff4a1f4cdb66d930fc781222a093b322f157e3f8 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 23 Feb 2018 10:30:46 +0100 Subject: bin/build-packages: do not overwrite our files by upstream ones if source package is extracted --- bin/build-packages | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/build-packages b/bin/build-packages index 0e734dd..f15c99e 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -307,8 +307,19 @@ while [ "${count}" -ne 0 ]; do # we can't improve anything continue fi - # TODO: the below command also overwrites files which are intentionally overwritten by us (e.g. "config" in "core/linux" or "extra/linux-zen") - tar -xz --overwrite -f "${source_name}" --exclude PKGBUILD --strip-components=1 || true + # shellcheck disable=SC2046 + tar -xz --overwrite \ + -f "${source_name}" \ + --exclude PKGBUILD \ + $( + if [ -n "${PKGBUILD_mod}" ]; then + git -C "${repo_paths__archlinux32}/${PKGBUILD_mod%/*}" archive "${mod_git_revision}" -- . | \ + tar -t | \ + sed 's/^/--exclude /' + fi + ) \ + --strip-components=1 \ + || true fi if echo "${straw}" | \ -- cgit v1.2.3-70-g09d2