index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-01-17 15:24:40 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-01-17 15:24:40 +0100 |
commit | c9f55c95cb382e22c41a310c1005e3de43379ae9 (patch) | |
tree | 38210b816af5645dad7fad10b1de6a32fe89c76b /bin/return-assignment | |
parent | 294c66ccc56ee6200b288585833cae1d1bfc3ea8 (diff) |
-rwxr-xr-x | bin/return-assignment | 35 |
diff --git a/bin/return-assignment b/bin/return-assignment index e808702..24764d1 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -74,7 +74,10 @@ if [ "$6" = 'ERROR' ]; then # shellcheck disable=SC2016 infos=$( { - printf 'SELECT DISTINCT `build_assignments`.`id`,IF(`build_assignments`.`is_broken`,"true","false") FROM `build_slaves`' + printf 'SELECT DISTINCT' + printf ' `build_assignments`.`id`,' + printf 'IF(`build_assignments`.`is_broken`,"true","false")' + printf ' FROM `build_slaves`' mysql_join_build_slaves_build_assignments mysql_join_build_assignments_package_sources mysql_join_package_sources_upstream_repositories @@ -279,7 +282,8 @@ fi # shellcheck disable=SC2016 build_assignment_id=$( { - printf 'SELECT DISTINCT `build_assignments`.`id` FROM `build_slaves`' + printf 'SELECT DISTINCT `build_assignments`.`id`' + printf ' FROM `build_slaves`' mysql_join_build_slaves_build_assignments mysql_join_build_assignments_package_sources mysql_join_package_sources_upstream_repositories @@ -567,7 +571,8 @@ fi mysql_join_build_assignments_package_sources mysql_join_package_sources_upstream_repositories mysql_join_upstream_repositories_repository_moves - printf ' JOIN `repositories` as `t` ON `t`.`id`=`repository_moves`.`to_repository`' + printf ' JOIN `repositories` as `t`' + printf ' ON `t`.`id`=`repository_moves`.`to_repository`' mysql_join_repositories_architectures 't' 't_a' printf ' JOIN `architecture_compatibilities`' printf ' ON `architecture_compatibilities`.`built_for`=`binary_packages`.`architecture`' @@ -716,7 +721,8 @@ trigger_mirror_refreshs printf 'LOAD DATA LOCAL INFILE "%s" INTO TABLE `pkg_hashes`;\n' \ "${tmp_dir}/sha512sums" printf 'UPDATE `binary_packages`' - printf ' JOIN `pkg_hashes` ON `pkg_hashes`.`pkgid`=`binary_packages`.`id`' + printf ' JOIN `pkg_hashes`' + printf ' ON `pkg_hashes`.`pkgid`=`binary_packages`.`id`' printf ' SET `binary_packages`.`sha512sum`=`pkg_hashes`.`sha512sum`;\n' printf 'COMMIT;\n' @@ -734,15 +740,19 @@ trigger_mirror_refreshs "${tmp_dir}/so.${lib_link#*:}" "${lib_link%:*}" printf 'INSERT IGNORE INTO `install_targets` (`name`)' - printf ' SELECT DISTINCT `%s`.`lib` FROM `%s`;\n' \ - "${lib_link%:*}" "${lib_link%:*}" + printf ' SELECT DISTINCT `%s`.`lib`' \ + "${lib_link%:*}" + printf ' FROM `%s`;\n' \ + "${lib_link%:*}" printf 'COMMIT;\n' # TODO: possibly remove install_target_providers with less restrictive # versions than we have now printf 'INSERT IGNORE INTO `versions` (`epoch`,`version`)' - printf ' SELECT DISTINCT `%s`.`epoch`,`%s`.`version` FROM `%s`;\n' \ - "${lib_link%:*}" "${lib_link%:*}" "${lib_link%:*}" + printf ' SELECT DISTINCT `%s`.`epoch`,`%s`.`version`' \ + "${lib_link%:*}" "${lib_link%:*}" + printf ' FROM `%s`;\n' \ + "${lib_link%:*}" printf 'COMMIT;\n' if [ "${lib_link%:*}" = 'pl' ]; then @@ -933,14 +943,17 @@ trigger_mirror_refreshs # remove broken loops printf 'CREATE TEMPORARY TABLE `loops_to_delete` (`loop` MEDIUMINT);\n' printf 'INSERT IGNORE INTO `loops_to_delete`' - printf ' SELECT `build_dependency_loops`.`loop` FROM `build_dependency_loops`' + printf ' SELECT `build_dependency_loops`.`loop`' + printf ' FROM `build_dependency_loops`' mysql_join_build_dependency_loops_binary_packages mysql_join_binary_packages_binary_packages_in_repositories printf ' WHERE NOT `binary_packages_in_repositories`.`repository`=%s;\n' \ "${repository_ids__any_build_list}" printf 'COMMIT;\n' - printf 'DELETE FROM `build_dependency_loops` WHERE EXISTS (' - printf 'SELECT 1 FROM `loops_to_delete`' + printf 'DELETE FROM `build_dependency_loops`' + printf ' WHERE EXISTS (' + printf 'SELECT 1' + printf ' FROM `loops_to_delete`' printf ' WHERE `loops_to_delete`.`loop`=`build_dependency_loops`.`loop`' printf ');\n' printf 'DROP TEMPORARY TABLE `loops_to_delete`;\n' |