summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xarchPackagesUpdate45
-rw-r--r--report-installed-packages.PKGBUILDpatch6
2 files changed, 39 insertions, 12 deletions
diff --git a/archPackagesUpdate b/archPackagesUpdate
index b83830432..0c7e5c5a8 100755
--- a/archPackagesUpdate
+++ b/archPackagesUpdate
@@ -545,18 +545,39 @@ if ${aufRechenknecht}; then
cd "${tmpDir}/${paket}"
rm -rf --one-file-system src pkg
- # report installed packages at end of package() function - if the build process succeeded,
- # these packages should work
- echo '
- if [ "$(uname -m)" = "i686" ]; then
- eval "$(
- declare -f package | \
- sed '"'"'
- $ i sudo report-installed-packages archlinux-reports@eckner.net buildmaster@archlinux32.org
- '"'"'
- )"
- fi
- ' >> PKGBUILD
+ # add PKGBUILD-patches to the PKGBUILD
+ {
+ printf '%s\n' \
+ 'eval "$(' \
+ ' declare -f package | \' \
+ ' sed '"'"'$d'"'"
+ for patch in "${tmp_dir}/"*".PKGBUILDpatch"; do
+ printf ' cat "${srcdir}/%s"\n' \
+ "${patch##*/}"
+ cp "${patch}" .
+ done
+ printf '%s\n' \
+ ')"' \
+ 'source+=('
+ for patch in "${tmp_dir}/"*".PKGBUILDpatch"; do
+ printf '"%s"\n' \
+ "${patch##*/}"
+ done
+ printf ')\n'
+ sed '
+ s/^\s*\([^=[:space:]]\+sums\)=.*$/\1/
+ t
+ d
+ ' PKGBUILD \
+ | while read -r sum_type; do
+ printf '%s+=(' \
+ "${sum_type}"
+ "${sum_type%s}" "${tmp_dir}/"*".PKGBUILDpatch" \
+ | awk '{print $1}'
+ printf ')\n'
+ done
+ } | \
+ sponge -a PKGBUILD
if [ "${arch}" = 'i686' ]; then
# 32-bit is built in chroot /opt/arch32
diff --git a/report-installed-packages.PKGBUILDpatch b/report-installed-packages.PKGBUILDpatch
new file mode 100644
index 000000000..2357d625b
--- /dev/null
+++ b/report-installed-packages.PKGBUILDpatch
@@ -0,0 +1,6 @@
+# report installed packages at end of package() function - if the build process succeeded,
+# these packages should work
+
+if [ "${CARCH}" = "i686" ]; then
+ sudo report-installed-packages archlinux-reports@eckner.net buildmaster@archlinux32.org
+fi