From b9e8973df4657278873472b13a28de285f43e33a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 27 Jul 2017 08:40:27 +0200 Subject: bin/build-packages: remove bug which prevents tmpdirs from being deleted in some cases --- bin/build-packages | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bin/build-packages b/bin/build-packages index c0c5266..da96838 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -213,7 +213,7 @@ while [ ${count} -ne 0 ]; do rm -f *".pkg.tar.xz" *".pkg.tar.xz.sig" - >&2 printf 'building package "%s" ...' "${package}" + >&2 printf 'building package "%s" (straw: %s) ...' "${package}" "${straw}" # by piping the log, we don't see anything in the terminal, # but all ways to duplicate the logs seem pretty elaborate if "${build_command}" ${parameters} > \ @@ -277,17 +277,17 @@ while [ ${count} -ne 0 ]; do gzip "${log}" fi done - tar -cf 'build-logs.gz.tar' \ - *'.build-log.gz' || \ - continue # this might happen if we didn't create any logs - while ! 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}" 'ERROR' < \ - 'build-logs.gz.tar'; do - wait_some_time 15 - done + if tar -cf 'build-logs.gz.tar' \ + *'.build-log.gz'; then + while ! 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}" 'ERROR' < \ + 'build-logs.gz.tar'; do + wait_some_time 15 + done + fi if ${exit_after_failure}; then >&2 echo 'Build failed, exiting now' bail_out 0 -- cgit v1.2.3-70-g09d2