Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-06-05 10:01:12 +0200
committerErich Eckner <git@eckner.net>2018-06-05 10:01:12 +0200
commit548ddb5ec85ea7474a213ca065939fc2b8553f5e (patch)
tree498bc9e5e2cda45d30e5557ab3e878b6cf6ea54b
parent8118c8c71b9a0ede8980584bd69c98c4f4db4e8f (diff)
bin/get-assignment: build_assignments.id is retrieved from the db before - no need to base64_encode
-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