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>2018-01-21 21:40:07 +0100
committerErich Eckner <git@eckner.net>2018-01-21 21:40:07 +0100
commit4697dbe5bb3d088a1007a3d39274a1522e832fc4 (patch)
treeacbff939a5c375995d1e87d08fbd408d6bdaf97a /bin
parentac158e4b3c459b615ecff930181d81f587d6a414 (diff)
bin/return-assignment: started to track package movement in database
Diffstat (limited to 'bin')
-rwxr-xr-xbin/return-assignment15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index ebaa73a..48c6914 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -368,6 +368,21 @@ if ! [ "${destination}" = 'build-support' ]; then
printf '%s\n' ${packages} > \
"${work_dir}/package-states/$1.$2.$3.$4.done"
fi
+# TODO: mark packages in correct repository in database
+${mysql_command} -e "$(
+ # shellcheck disable=SC2016
+ printf 'UPDATE `build_assignments`'
+ # shellcheck disable=SC2016
+ printf ' JOIN `build_slaves` ON `build_slaves`.`currently_building`=`build_assignments`.`id`'
+ # shellcheck disable=SC2016
+ printf ' SET `build_assignments`.`is_broken`=0, `build_slaves`.`currently_building`=NULL'
+ # shellcheck disable=SC2016
+ printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \
+ "$(
+ printf '%s' "${slave}" | \
+ base64 -w0
+ )"
+)"
rm -f \
"${work_dir}/package-states/$1.$2.$3.$4.locked" \
"${work_dir}/package-states/$1.$2.$3.$4.broken"