Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/get-assignment
diff options
context:
space:
mode:
Diffstat (limited to 'bin/get-assignment')
-rwxr-xr-xbin/get-assignment16
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index c8fcbaf..af86ea1 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -34,10 +34,10 @@ hand_out_assignment() {
mysql_join_package_sources_build_assignments
mysql_join_build_assignments_binary_packages
mysql_join_binary_packages_binary_packages_in_repositories
- mysql_join_binary_packages_in_repositories_repositories
- printf ' WHERE `repositories`.`name`="build-list"'
- printf ' AND `build_assignments`.`id`=from_base64("%s")' \
- "$(printf '%s' "$1" | base64 -w0)"
+ printf ' WHERE `binary_packages_in_repositories`.`repository`=%s' \
+ "${repository_ids__any_build_list}"
+ printf ' AND `build_assignments`.`id`=%s' \
+ "$1"
printf ' LIMIT 1;\n'
} | \
mysql_run_query | \
@@ -46,16 +46,16 @@ hand_out_assignment() {
# shellcheck disable=SC2016
{
printf 'UPDATE `build_slaves`'
- printf ' SET `currently_building` = from_base64("%s")' \
- "$(printf '%s' "$1" | base64 -w0)"
+ printf ' SET `currently_building`=%s' \
+ "$1"
# shellcheck disable=SC2154
printf ' WHERE `build_slaves`.`id`=from_base64("%s");\n' \
"$(printf '%s' "${slave_id}" | base64 -w0)"
printf 'UPDATE `build_assignments`'
printf ' SET `build_assignments`.`priority`=0'
- printf ' WHERE `build_assignments`.`id`=from_base64("%s");\n' \
- "$(printf '%s' "${slave_id}" | base64 -w0)"
+ printf ' WHERE `build_assignments`.`id`=%s;\n' \
+ "$1"
} | \
mysql_run_query