index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-02-01 14:26:10 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-01 14:26:10 +0100 |
commit | 95c2ffe83ed58a13272df53acc5023d547be0c6d (patch) | |
tree | c30ea115d01b877a11001d7fead9039a954f4bac /bin | |
parent | a03d072cc472de7d2707b97079335d17025bd475 (diff) |
-rwxr-xr-x | bin/get-assignment | 14 |
diff --git a/bin/get-assignment b/bin/get-assignment index 0c7915d..7e8d25f 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -69,8 +69,20 @@ hand_out_assignment() { printf ' `upstream_repositories`.`name` = from_base64("%s")' \ "$(printf '%s' "$4" | base64 -w0)" printf ')' - printf ' WHERE `build_slaves`.`name`=from_base64("%s");' \ + printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \ "$(printf '%s' "${slave}" | base64 -w0)" + + printf 'UPDATE `build_assignments`' + printf ' JOIN `package_sources` ON `build_assignments`.`package_source`=`package_sources`.`id`' + printf ' JOIN `upstream_repositories` ON `package_sources`.`upstream_package_repository`=`upstream_repositories`.`id`' + printf ' SET `build_assignments`.`priority`=0' + printf ' WHERE' + printf ' `package_sources`.`%s` = from_base64("%s") AND' \ + 'pkgbase' "$(printf '%s' "$1" | base64 -w0)" \ + 'git_revision' "$(printf '%s' "$2" | base64 -w0)" \ + 'mod_git_revision' "$(printf '%s' "$3" | base64 -w0)" + printf ' `upstream_repositories`.`name` = from_base64("%s");\n' \ + "$(printf '%s' "$4" | base64 -w0)" } | \ ${mysql_command} |