From 8873150c610b1a5e7053cd1a462561b72cb6785e Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 1 Feb 2018 15:24:31 +0100 Subject: bin/build-master-status-from-mysql: check tesing packages, too --- bin/build-master-status-from-mysql | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'bin/build-master-status-from-mysql') diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql index 16353dd..8e828f7 100755 --- a/bin/build-master-status-from-mysql +++ b/bin/build-master-status-from-mysql @@ -110,6 +110,42 @@ find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \ sort -u > \ "${tmp_dir}/tested.file" +# shellcheck disable=SC2016 +{ + printf 'SELECT ' + printf '`binary_packages`.`%s`,' \ + 'pkgname' \ + 'epoch' \ + 'pkgver' \ + 'pkgrel' \ + 'sub_pkgrel' + printf '`architectures`.`name`' + printf ' FROM `binary_packages`' + printf ' JOIN `%s` ON `%s`.`id`=`%s`.`%s`' \ + 'repositories' 'repositories' 'binary_packages' 'repository' \ + 'architectures' 'architectures' 'binary_packages' 'architecture' \ + 'repository_stabilities' 'repository_stabilities' 'repositories' 'stability' + printf ' WHERE NOT `binary_packages`.`is_tested`' + printf ' AND NOT `binary_packages`.`has_issues`' + printf ' AND `repository_stabilities`.`name`="testing"' +} | \ + ${mysql_command} --batch | \ + sed ' + 1d + s/^\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)\s\(\S\+\)$/\1-\2:\3-\4.\5-\6.pkg.tar.xz/ + ' | \ + sort -u > \ + "${tmp_dir}/testing.mysql" +find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \ + -name '*.testing' \ + -exec cat '{}' \; | \ + sed ' + s/-\([^-.]\+\)\(-[^-]\+\)$/-\1.0-\2/ + s/-\([^-:]\+\)\(\(-[^-]\+\)\{2\}\)$/-0:\1\2/ + ' | \ + sort -u > \ + "${tmp_dir}/testing.file" + { mysql_sanity_check || true diff -u \ @@ -128,6 +164,10 @@ find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \ "${tmp_dir}/tested.file" \ "${tmp_dir}/tested.mysql" || \ true + diff -u \ + "${tmp_dir}/testing.file" \ + "${tmp_dir}/testing.mysql" || \ + true } | \ sed ' s,^-.*$,\0, -- cgit v1.2.3-54-g00ecf