index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-02-09 21:26:56 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-09 21:26:56 +0100 |
commit | b66e5381ea809a44773a52aeb76f11a04e359271 (patch) | |
tree | 4957db8263df8e61e19fa92061d67d47d17814bf /bin | |
parent | 5e3a4034972f57ddbc3738104541a81290298b09 (diff) |
-rwxr-xr-x | bin/build-master-status-from-mysql | 29 |
diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql index 16afb9f..d1ee9ff 100755 --- a/bin/build-master-status-from-mysql +++ b/bin/build-master-status-from-mysql @@ -38,6 +38,31 @@ fi sort "${work_dir}/build-list" > \ "${tmp_dir}/build-list.file" +# shellcheck disable=SC2016 +{ + printf 'SELECT ' + printf '`package_sources`.`%s`,' \ + 'pkgbase' 'git_revision' 'mod_git_revision' + printf '`upstream_repositories`.`name`' + printf ' FROM `build_slaves`' + printf ' JOIN `%s` ON `%s`.`id`=`%s`.`%s`' \ + 'build_assignments' 'build_assignments' 'build_slaves' 'currently_building' \ + 'package_sources' 'package_sources' 'build_assignments' 'package_source' \ + 'upstream_repositories' 'upstream_repositories' 'package_sources' 'upstream_package_repository' +} | \ + ${mysql_command} --raw --batch | \ + sed ' + 1d + y/\t/ / + ' | \ + sort > \ + "${tmp_dir}/locked.mysql" +find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 -name '*.locked' -printf '%f\n' | \ + sed ' + s/\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)\.[^.]\+$/ \1 \2 \3/ + ' | \ + sort > \ + "${tmp_dir}/locked.file" # shellcheck disable=SC2016 { @@ -193,6 +218,10 @@ find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \ "${tmp_dir}/build-dependencies.file" { + diff -u \ + "${tmp_dir}/locked.file" \ + "${tmp_dir}/locked.mysql" || \ + true mysql_sanity_check || true diff -u \ "${tmp_dir}/build-list.file" \ |