index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-02-01 14:51:49 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-01 14:51:49 +0100 |
commit | e46909f8589a0dadffafbe1f59997be3252afb5f (patch) | |
tree | e908a07b1dfe7f387a1b298f2e78d6ea0cb70bfd | |
parent | abf2c85b1d4b87a04dbb8d0d707f84308838861f (diff) |
-rwxr-xr-x | bin/prioritize-build-list | 15 |
diff --git a/bin/prioritize-build-list b/bin/prioritize-build-list index 021e5c2..d611e79 100755 --- a/bin/prioritize-build-list +++ b/bin/prioritize-build-list @@ -32,13 +32,20 @@ fi # shellcheck disable=SC2016 { printf 'UPDATE `build_assignments`' - printf ' JOIN `package_sources` ON `build_assignments`.`package_source`=`package_sources`.`id`' + printf ' JOIN `%s` ON `%s`.`%s`=`%s`.`id`' \ + 'package_sources' 'build_assignments' 'package_source' 'package_sources' \ + 'binary_packages' 'binary_packages' 'build_assignment' 'build_assignments' \ + 'repositories' 'binary_packages' 'repository' 'repositories' printf ' SET `build_assignments`.`priority`=(' - printf 'SELECT COALESCE(MAX(`others`.`priority`),0)+1' - printf ' FROM `build_assignments` AS `others`' + printf 'SELECT COALESCE(MAX(`all_priorities`.`priority`),0)+1' + printf ' FROM (' + printf 'SELECT `others`.`priority`' + printf ' FROM `build_assignments` AS `others`' + printf ') AS `all_priorities`' printf ')' - printf ' WHERE `package_sources`.`pkgbase` REGEXP from_base64("%s");\n' \ + printf ' WHERE `package_sources`.`pkgbase` REGEXP from_base64("%s")' \ "$(printf '%s' "$1" | base64 -w0)" + printf ' AND `repositories`.`name`="build-list";\n' } | \ ${mysql_command} |