From 3741a72e9659918ad1c546ff9d61ce74bef2b611 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 3 Jul 2019 10:04:58 +0200 Subject: bin/build-packages: clean up mess with verifysource.log: give it a proper name from the start --- bin/build-packages | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'bin/build-packages') diff --git a/bin/build-packages b/bin/build-packages index 4034782..479f5e6 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -494,13 +494,11 @@ while [ "${count}" -ne 0 ] && \ verifysource_trial=0 while [ ${verifysource_trial} -lt 5 ]; do verifysource_trial=$((verifysource_trial + 1)) - mv \ - "${tmp_dir}/verifysource.log" \ - "$( + log_file="${tmp_dir}/$( date -u --iso-8601=seconds | \ cut -d+ -f1 - ).build-log" 2>/dev/null || true - if CARCH="${arch}" makepkg --verifysource 2> "${tmp_dir}/verifysource.log"; then + ).build-log" + if CARCH="${arch}" makepkg --verifysource 2> "${log_file}"; then success=true break fi @@ -512,7 +510,7 @@ while [ "${count}" -ne 0 ] && \ s/^.* FAILED (unknown public key \([0-9A-F]\{16\}\)).*$/0x\1/ T p - ' "${tmp_dir}/verifysource.log" + ' "${log_file}" ) if [ -n "${missing_keys}" ]; then if gpg --recv-keys "${missing_keys}"; then @@ -524,7 +522,7 @@ while [ "${count}" -ne 0 ] && \ # download the repository key from github if [ ${verifysource_trial} -eq 2 ]; then - if grep -q ' FAILED (unknown public key \([0-9A-F]\{16\}\))' -- "${tmp_dir}/verifysource.log"; then + if grep -q ' FAILED (unknown public key \([0-9A-F]\{16\}\))' -- "${log_file}"; then # TODO: get the name of the key file from its finger print or # some other information inside the repository if makepkg --printsrcinfo | \ @@ -597,12 +595,6 @@ while [ "${count}" -ne 0 ] && \ verifysource_trial=$((verifysource_trial + 1)) fi done - mv \ - "${tmp_dir}/verifysource.log" \ - "$( - date -u --iso-8601=seconds | \ - cut -d+ -f1 - ).build-log" 2>/dev/null || true if ${success}; then echo 'building' > "${tmp_dir}/.ping-build-master" -- cgit v1.2.3-54-g00ecf