From 1b47369e3b43e4b8b6c6f095e31ce11faf886b8a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 20 Aug 2019 14:34:24 +0200 Subject: bin/return-assignment: save "any" packages as "any", not as the architecture they got built in ($arch part of staging-$arch-build) --- bin/return-assignment | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'bin/return-assignment') diff --git a/bin/return-assignment b/bin/return-assignment index 9bd652d..db7855b 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -102,9 +102,11 @@ if [ "$6" = 'ERROR' ]; then { printf 'SELECT DISTINCT' printf ' `build_assignments`.`id`,' - printf 'IF(`build_assignments`.`is_broken`,"true","false")' + printf 'IF(`build_assignments`.`is_broken`,"true","false"),' + printf '`ba_a`.`name`' printf ' FROM `build_slaves`' mysql_join_build_slaves_build_assignments + mysql_join_build_assignments_architectures '' 'ba_a' mysql_join_build_assignments_package_sources mysql_join_package_sources_upstream_repositories mysql_join_build_assignments_binary_packages @@ -138,8 +140,10 @@ if [ "$6" = 'ERROR' ]; then >&2 echo 'You do not build this package (anymore) - move on.' exit 2 fi + build_assignment_architecture="${infos##* }" + infos="${infos% ${build_assignment_architecture}}" was_broken_before="${infos##* }" - build_assignment_id="${infos%% *}" + build_assignment_id="${infos% ${was_broken_before}}" # save sent build logs saved_build_logs=$( @@ -147,7 +151,7 @@ if [ "$6" = 'ERROR' ]; then -C "${build_log_directory}/error" \ --wildcards \ --no-wildcards-match-slash \ - --transform="s|^|$1.$2.$3.$4.$5.|" \ + --transform="s|^|$1.$2.$3.$4.${build_assignment_architecture}.|" \ '*.build-log.gz' ) @@ -175,7 +179,7 @@ if [ "$6" = 'ERROR' ]; then printf '%s' "${identifier}" | \ base64 -d )\s*" \ - "${build_log_directory}/error/$1.$2.$3.$4.$5.${saved_build_log}"; then + "${build_log_directory}/error/$1.$2.$3.$4.${build_assignment_architecture}.${saved_build_log}"; then printf ' (from_base64("%s"),%s,from_base64("%s")),' \ "$( @@ -185,7 +189,7 @@ if [ "$6" = 'ERROR' ]; then )" \ "${reason_id}" \ "$( - printf '%s' "$1.$2.$3.$4.$5.${saved_build_log}" | \ + printf '%s' "$1.$2.$3.$4.${build_assignment_architecture}.${saved_build_log}" | \ base64 -w0 )" break @@ -240,7 +244,7 @@ if [ "$6" = 'ERROR' ]; then # note, that $build_time is only considered when $architecture or # $version are unavailable find "${build_log_directory}/error" -type f \ - -name "$1.$2.$3.$4.$5.*.build-log.gz" \ + -name "$1.$2.$3.$4.${build_assignment_architecture}.*.build-log.gz" \ -exec zgrep -qF "$( printf '%s\n' \ 'The following packages are broken because other packages they depend on are missing. These broken packages must be rebuilt before they can be used.' \ @@ -367,7 +371,7 @@ if [ "$6" = 'ERROR' ]; then printf ' ON `architecture_compatibilities`.`runs_on`=`architectures`.`id`' printf ' AND `architectures`.`name`=from_base64("%s")' \ "$( - printf '%s' "$5" | \ + printf '%s' "${build_assignment_architecture}" | \ base64 -w0 )" printf ' WHERE (' @@ -437,7 +441,7 @@ if [ "$6" = 'ERROR' ]; then # shellcheck disable=SC2119 { printf '%s/%s ' \ - "$5" \ + "${build_assignment_architecture}" \ "$1" if [ "${1%s}s" = "$1" ]; then printf 'are' @@ -457,7 +461,7 @@ if [ "$6" = 'ERROR' ]; then sed 's/,$//' fi printf ': https://archlinux32.org/buildmaster/build-log.php?a=%s&p=%s\n' \ - "$5" \ + "${build_assignment_architecture}" \ "$1" } | \ irc_say -- cgit v1.2.3-54-g00ecf