index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-10-08 08:57:43 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-10-08 08:57:43 +0200 |
commit | 7d1b1520e40a502f3dea06202bb0dcb7815e4fa0 (patch) | |
tree | 4911af248ec5693225fa4d85ef54a2c8b1123fd4 | |
parent | 3dfa86c30cda4b47d644a6ebe7bdb50838712cbb (diff) |
-rwxr-xr-x | bin/get-assignment | 44 |
diff --git a/bin/get-assignment b/bin/get-assignment index 804501b..926cc69 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -146,6 +146,50 @@ if [ -n "${currently_building}" ]; then hand_out_assignment "${currently_building}" fi +# shellcheck disable=SC2154 +if [ -s "${work_dir}/forced-package-builds.${slave}" ]; then + next_building=$( + sed -i ' + 1 { + w /dev/stdout + d + } + ' "${work_dir}/forced-package-builds.${slave}" + ) + if [ ! -s "${work_dir}/forced-package-builds.${slave}" ]; then + rm "${work_dir}/forced-package-builds.${slave}" + fi + if [ -n "${next_building}" ]; then + next_building=$( + # shellcheck disable=SC2016 + { + printf 'SELECT' + printf ' `build_assignments`.`id`' + printf ' FROM `build_assignments`' + mysql_join_build_assignments_binary_packages + mysql_join_binary_packages_binary_packages_in_repositories + printf ' AND `binary_packages_in_repositories`.`repository`=%s' \ + "${repository_ids__any_build_list}" + mysql_join_build_assignments_package_sources + mysql_join_build_assignments_architectures + printf ' WHERE `package_sources`.`pkgbase`=from_base64("%s")' \ + "$( + printf '%s' "${next_building#* }" | \ + base64 -w0 + )" + printf ' AND `architectures`.`name`=from_base64("%s")' \ + "$( + printf '%s' "${next_building%% *}" | \ + base64 -w0 + )" + printf ' LIMIT 1;\n' + } | \ + mysql_run_query + ) + hand_out_assignment "${next_building}" + fi +fi + # a package with [all dependencies met or which is part of a loop] # and which is currently not being built, ordered by: # 1: we requested it |