Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-packages50
1 files changed, 31 insertions, 19 deletions
diff --git a/bin/build-packages b/bin/build-packages
index 2a87beb..1ed51d6 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -549,23 +549,36 @@ while [ "${count}" -ne 0 ] && \
find . -maxdepth 1 -type f \( -name '*.pkg.tar.xz' -o -name '*.pkg.tar.xz.sig' \) -exec \
rm {} \;
- echo 'building' > "${tmp_dir}/.ping-build-master"
- >&2 printf '%s: building package "%s" (revisions %s %s, repository %s, straw %s) for %s ...' \
- "$(date +'%Y-%m-%d %T')" \
- "${package}" \
- "${git_revision}" \
- "${mod_git_revision}" \
- "${repository}" \
- "${straw}" \
- "${arch}"
- # by piping the log, we don't see anything in the terminal,
- # but all ways to duplicate the logs seem pretty elaborate
- # shellcheck disable=SC2024,SC2086
- if "${build_command}" ${outerParameters} -- ${middleParameters} -- ${innerParameters} > \
- "$(
- date -u --iso-8601=seconds | \
- cut -d+ -f1
- ).build-log" 2>&1; then
+ success=true
+
+ echo 'checking-source' > "${tmp_dir}/.ping-build-master"
+ if ! CARCH="${arch}" makepkg --verifysource; then
+ success=false
+ fi
+
+ if ${success}; then
+ echo 'building' > "${tmp_dir}/.ping-build-master"
+ >&2 printf '%s: building package "%s" (revisions %s %s, repository %s, straw %s) for %s ...' \
+ "$(date +'%Y-%m-%d %T')" \
+ "${package}" \
+ "${git_revision}" \
+ "${mod_git_revision}" \
+ "${repository}" \
+ "${straw}" \
+ "${arch}"
+ # by piping the log, we don't see anything in the terminal,
+ # but all ways to duplicate the logs seem pretty elaborate
+ # shellcheck disable=SC2024,SC2086
+ if ! "${build_command}" ${outerParameters} -- ${middleParameters} -- ${innerParameters} > \
+ "$(
+ date -u --iso-8601=seconds | \
+ cut -d+ -f1
+ ).build-log" 2>&1; then
+ success=false
+ fi
+ fi
+
+ if ${success}; then
# build successful
>&2 printf ' ok.\n'
if [ "${build_command}" = 'makepkg' ]; then
@@ -654,7 +667,7 @@ while [ "${count}" -ne 0 ] && \
mkdir "${package_content_dir}/${pkgfile##*/}"
tar -C "${package_content_dir}/${pkgfile##*/}" -xJf "${pkgfile}" 2>/dev/null
# we rely on "${checksum}" not appearing in any objdump output
- : ${checksum?umm, checksum is unset - this will break below sed-fu}
+ : "${checksum?umm, checksum is unset - this will break below sed-fu}"
# TODO: symbols may be in object files _inside_archives_
# In that case, we're interested in the object file's name,
# not the archive's file name
@@ -866,7 +879,6 @@ while [ "${count}" -ne 0 ] && \
exit ${err}
esac
done
- success=true
break
fi
echo 'failure' > "${tmp_dir}/.ping-build-master"