summaryrefslogtreecommitdiff
path: root/bin/build-master-status-from-mysql
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-01-31 22:19:57 +0100
committerErich Eckner <git@eckner.net>2018-01-31 22:19:57 +0100
commit12f0a85eccf4803af088399843fe915a598f3f20 (patch)
tree79be37df0cb737611e3e6fc2373f9ce83bc84c9a /bin/build-master-status-from-mysql
parent9baf70d2df76a5386208daecc6ce8fec11c1d560 (diff)
downloadbuilder-12f0a85eccf4803af088399843fe915a598f3f20.tar.xz
bin/build-master-status-from-mysql: check tested packages
Diffstat (limited to 'bin/build-master-status-from-mysql')
-rwxr-xr-xbin/build-master-status-from-mysql40
1 files changed, 40 insertions, 0 deletions
diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql
index b1bbb98..44e07c1 100755
--- a/bin/build-master-status-from-mysql
+++ b/bin/build-master-status-from-mysql
@@ -72,6 +72,42 @@ find "${work_dir}/build-list.loops" -regextype grep -mindepth 1 -maxdepth 1 \
sort > \
"${tmp_dir}/loops.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 `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}/tested.mysql"
+find "${work_dir}/package-states" -mindepth 1 -maxdepth 1 \
+ -name '*.tested' \
+ -exec cat '{}' \; | \
+ sed '
+ s/-\([^-.]\+\)\(-[^-]\+\)$/-\1.0-\2/
+ s/-\([^-:]\+\)\(\(-[^-]\+\)\{2\}\)$/-0:\1\2/
+ ' | \
+ sort -u > \
+ "${tmp_dir}/tested.file"
+
{
mysql_sanity_check || true
diff -u \
@@ -86,6 +122,10 @@ find "${work_dir}/build-list.loops" -regextype grep -mindepth 1 -maxdepth 1 \
"${tmp_dir}/loops.file" \
"${tmp_dir}/loops.mysql" || \
true
+ diff -u \
+ "${tmp_dir}/tested.file" \
+ "${tmp_dir}/tested.mysql" || \
+ true
} | \
sed '
s,^-.*$,<font color="#FF0000">\0</font>,