From 9dc2f0416b3865298a86815d5d18b59a6a50d471 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 29 Jan 2018 08:50:36 +0100 Subject: bin/build-master-status-from-mysql: look at deletion-list, too --- bin/build-master-status-from-mysql | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql index b56efca..b1bbb98 100755 --- a/bin/build-master-status-from-mysql +++ b/bin/build-master-status-from-mysql @@ -29,6 +29,27 @@ trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT sort "${work_dir}/build-list" > \ "${tmp_dir}/build-list.file" + +# shellcheck disable=SC2016 +{ + printf 'SELECT DISTINCT `package_sources`.`pkgbase`' + printf ' FROM `package_sources`' + printf ' JOIN `%s` ON `%s`.`%s`=`%s`.`id`' \ + 'build_assignments' 'build_assignments' 'package_source' 'package_sources' \ + 'binary_packages' 'binary_packages' 'build_assignment' 'build_assignments' \ + 'repositories' 'binary_packages' 'repository' 'repositories' + printf ' WHERE `repositories`.`name`="deletion-list";\n' +} | \ + ${mysql_command} --batch | \ + sed ' + 1d + y/\t/ / + ' | \ + sort > \ + "${tmp_dir}/deletion-list.mysql" +sort "${work_dir}/deletion-list" > \ + "${tmp_dir}/deletion-list.file" + # shellcheck disable=SC2016 { printf 'SELECT `package_sources`.`pkgbase`' @@ -57,6 +78,10 @@ find "${work_dir}/build-list.loops" -regextype grep -mindepth 1 -maxdepth 1 \ "${tmp_dir}/build-list.file" \ "${tmp_dir}/build-list.mysql" || \ true + diff -u \ + "${tmp_dir}/deletion-list.file" \ + "${tmp_dir}/deletion-list.mysql" || \ + true diff -u \ "${tmp_dir}/loops.file" \ "${tmp_dir}/loops.mysql" || \ -- cgit v1.2.3-70-g09d2