Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-08-20 14:34:24 +0200
committerErich Eckner <git@eckner.net>2019-08-20 14:34:24 +0200
commit1b47369e3b43e4b8b6c6f095e31ce11faf886b8a (patch)
treeb338c26b18a7a5ed8aed8792c1d7a3b9b0c9449e /bin
parent17b037e17bac61949fa1ef03fec743a3e8424dec (diff)
bin/return-assignment: save "any" packages as "any", not as the architecture they got built in ($arch part of staging-$arch-build)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/return-assignment22
1 files changed, 13 insertions, 9 deletions
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