Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-05-17 11:22:37 +0200
committerErich Eckner <git@eckner.net>2017-05-17 14:22:44 +0200
commit72a0182a63d504c21083cffbc4e53af8d48da506 (patch)
tree9500f9da6d53ed445b469e581007e3c56a43c7f3 /bin/build-packages
parentca36b4abdb65eddcc6facca5da2d6fc4b33348ab (diff)
bin/build-packages: handle failed uploads to the build master
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages21
1 files changed, 16 insertions, 5 deletions
diff --git a/bin/build-packages b/bin/build-packages
index b265118..70676d5 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -7,8 +7,6 @@
# TODOs:
# use different build commands for different repositories - do we need this actually?
# send logs of failed builds
-# handle failed uploads to the build master
-# be more user friendly: let preset a limit on the number of packages being built
. "${0%/*}/../conf/default.conf"
@@ -107,17 +105,30 @@ while [ ${count} -ne 0 ]; do
cd "${PKGBUILD%/*}"
success=false
for parameters in '' '-c'; do
- rm -f *.pkg.tar.xz
+ rm -f *.pkg.tar.xz{,.sig}
if staging-i486-build ${parameters}; then
# build successful
ls -1 *.pkg.tar.xz | \
xargs -rn1 gpg --detach-sign
- tar -c *.pkg.tar.xz{,.sig} | \
+ if ! tar -c *.pkg.tar.xz{,.sig} | \
ssh \
-i "${master_build_server_identity}" \
-p "${master_build_server_port}" \
"${master_build_server_user}@${master_build_server}" \
- 'return-assignment' "${package}" "${git_revision}" "${mod_git_revision}" "${repository}"
+ 'return-assignment' "${package}" "${git_revision}" "${mod_git_revision}" "${repository}"; then
+ case $? in
+ 1)
+ >&2 echo 'I was too slow, the package is outdated. I will continue ...'
+ ;;
+ 2)
+ >& echo "'return-assignment' reports a signature error."
+ exit 1
+ ;;
+ *)
+ >&2 echo "unknown return code $? from 'return-assignment'"
+ exit 1
+ esac
+ fi
success=true
break
fi