summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-23 10:30:46 +0100
committerErich Eckner <git@eckner.net>2018-02-23 10:30:46 +0100
commitff4a1f4cdb66d930fc781222a093b322f157e3f8 (patch)
tree0a86cc90720c027746aabc74311c9f607334defe /bin
parenta4cb656d8fd5f7ca3358cc629ee2e8118f242089 (diff)
downloadbuilder-ff4a1f4cdb66d930fc781222a093b322f157e3f8.tar.xz
bin/build-packages: do not overwrite our files by upstream ones if source package is extracted
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-packages15
1 files changed, 13 insertions, 2 deletions
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}" | \