index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-06-28 15:17:09 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-06-28 15:17:09 +0200 |
commit | c0551a94fd73e5184e673404e01d255be21cf2f0 (patch) | |
tree | fba1ed87b557f153654439fac4703fd67d076628 /bin/return-assignment | |
parent | bab02966e03876106d6ca38e5fc8029a81bfb904 (diff) |
-rwxr-xr-x | bin/return-assignment | 18 |
diff --git a/bin/return-assignment b/bin/return-assignment index 7b8507e..017b9e9 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -321,6 +321,24 @@ if [ "$6" = 'ERROR' ]; then fi ) + # prioritize _this_ build assignment iff we rescheduled any broken dependencies + if [ -n "${rescheduled_packages}" ]; then + # shellcheck disable=SC2016 + { + printf 'UPDATE `build_assignments`' + printf ' SET `build_assignments`.`priority`=(' + printf 'SELECT MAX(`build_assignments`.`priority`)' + printf ' FROM `build_assignments`' + printf ')+1' + printf ' WHERE `build_assignments`.`id`=from_base64("%s");\n' \ + "$( + printf '%s' "${build_assignment_id}" | \ + base64 -w0 + )" + } | \ + mysql_run_query + fi + # shellcheck disable=SC2119 { printf '%s/%s ' \ |