index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/return-assignment | 48 |
diff --git a/bin/return-assignment b/bin/return-assignment index a0cbbbb..47e28f0 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -142,25 +142,25 @@ if [ "$6" = 'ERROR' ]; then exit 2 fi build_assignment_architecture="${infos##* }" - infos="${infos% ${build_assignment_architecture}}" + infos="${infos% "${build_assignment_architecture}"}" pkgrel="${infos##* }" - infos="${infos% ${pkgrel}}" + infos="${infos% "${pkgrel}"}" epoch="${infos##* }" - infos="${infos% ${epoch}}" + infos="${infos% "${epoch}"}" pkgver="${infos##* }" - infos="${infos% ${pkgver}}" + infos="${infos% "${pkgver}"}" pkgver=$( printf '%s' "${pkgver}" \ | base64 -d ) upstream_flag_date="${infos##* }" - infos="${infos% ${upstream_flag_date}}" + infos="${infos% "${upstream_flag_date}"}" upstream_flag_date=$( printf '%s' "${upstream_flag_date}" \ | base64 -d ) was_broken_before="${infos##* }" - build_assignment_id="${infos% ${was_broken_before}}" + build_assignment_id="${infos% "${was_broken_before}"}" # save sent build logs saved_build_logs=$( @@ -498,13 +498,13 @@ if [ "$6" = 'ERROR' ]; then ' ) - # release lock on build-list - otherwise seed-build-list won't run + # release lock on build-list - otherwise schedule-for-rebuild won't run flock -u 9 rescheduled_packages=$( if [ -n "${haskell_rebuild_packages}" ]; then # shellcheck disable=SC2086 - "${base_dir}/bin/seed-build-list" ${haskell_rebuild_packages} | \ + "${base_dir}/bin/schedule-for-rebuild" ${haskell_rebuild_packages} | \ sed 's/ .*$//' fi ) @@ -747,7 +747,8 @@ signatures=$( if [ -z "$( printf '%s\n' "${signatures}" | \ cut -d' ' -f2 | \ - grep -x 'file\|TRUST_FULLY' | \ + grep -x 'file\|TRUST_\(FULLY\|ULTIMATE\)' | \ + sed 's@_ULTIMATE$@_FULLY@' | \ sort | \ uniq -c | \ awk '{print $1}' | \ @@ -759,6 +760,9 @@ if [ -z "$( irc_say "${operator}" printf '%s\n' "${signatures}" | \ irc_say "${operator}" 'copy' >&2 + find . -maxdepth 1 -regextype sed \ + -regex '.*\.pkg\.\('"${package_compression_suffix_regex}"'\)' \ + -exec cp {} {}.sig "${work_dir}/" \; exit 3 fi @@ -956,6 +960,32 @@ if [ -n "${errors}" ]; then exit 1 fi +some_architecture=$( + # shellcheck disable=SC2012 + ls \ + | sed ' + s/^.*-\([^-]\+\)\.pkg\.\('"${package_compression_suffix_regex}"'\)$/\1/ + t + d + ' \ + | sort -u \ + | sed ' + s/^any$/0 \0/ + t + s/^/1 \0/ + ' \ + | sort -k1n,1 \ + | tail -n1 \ + | cut -d' ' -f2 +) + +for build_log in *.build-log.gz; do + [ -f "${build_log}" ] || continue; + mv -n \ + "${build_log}" \ + "${build_log_directory}/success/$1.$2.$3.$4.${some_architecture}.${build_log##*/}" +done + join -1 2 -2 2 -o 1.1,1.2,2.1 "${tmp_dir}/package-ids" "${tmp_dir}/signing-keys" \ | sponge "${tmp_dir}/package-ids" |