Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-07-25 15:13:32 +0200
committerErich Eckner <git@eckner.net>2018-07-25 15:13:32 +0200
commit700df20c73efe5779a05617485c815ab686bd227 (patch)
treeda5893e57cf7edf78a70453d063672f4b31995fa
parentd8f6cd5f88228dfd8ddbe501e980cc66c88d5742 (diff)
bin/build-packages: send ABORT to buildmaster if something during the source checkout failed (e.g. a missing/unknown commit)
-rwxr-xr-xbin/build-packages22
1 files changed, 17 insertions, 5 deletions
diff --git a/bin/build-packages b/bin/build-packages
index edc9016..3fa8e62 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -260,10 +260,6 @@ while [ "${count}" -ne 0 ] && \
true
done
- git_repo=$(find_repository_with_commit "${git_revision}")
-
- find_pkgbuilds "${package}" "${repository}" "${git_repo}" "${git_revision}" "${mod_git_revision}"
-
# trigger update of mirror (if configured)
if [ -n "${mirror_update_command}" ]; then
${mirror_update_command}
@@ -291,7 +287,23 @@ while [ "${count}" -ne 0 ] && \
tmp_dir=$(mktemp -d "${work_dir}/tmp.build-packages.XXXXXX")
trap bail_out EXIT
- extract_source_directory "${git_repo}" "${git_revision}" "${mod_git_revision}" "${tmp_dir}" "${sub_pkgrel}"
+ if ! git_repo=$(find_repository_with_commit "${git_revision}") || \
+ [ -z "${git_repo}" ] || \
+ ! find_pkgbuilds "${package}" "${repository}" "${git_repo}" "${git_revision}" "${mod_git_revision}" || \
+ ! extract_source_directory "${git_repo}" "${git_revision}" "${mod_git_revision}" "${tmp_dir}" "${sub_pkgrel}"; then
+ # report local failure (probably a missing commit) to build-master
+ # shellcheck disable=SC2029
+ ssh \
+ -i "${master_build_server_identity}" \
+ -p "${master_build_server_port}" \
+ "${master_build_server_user}@${master_build_server}" \
+ 'return-assignment' 'ABORT'
+
+ recursively_umount_and_rm "${tmp_dir}"
+ flock -u 9 || true
+ trap - EXIT
+ continue
+ fi
cd "${tmp_dir}"
echo 'nothing' > "${tmp_dir}/.ping-build-master"