Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-master-status-from-mysql
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-01-22 15:51:25 +0100
committerErich Eckner <git@eckner.net>2018-01-22 15:51:25 +0100
commit22fed81b1fbce3431d4c2349b0694d3bb7c6a36b (patch)
treefa040b5c044ccd68c1d41c242cdb9e0f7f196277 /bin/build-master-status-from-mysql
parentc3981b65615fd29d16e15860ee5872a996efb90e (diff)
bin/build-master-status-from-mysql: include build list in sanity check
Diffstat (limited to 'bin/build-master-status-from-mysql')
-rwxr-xr-xbin/build-master-status-from-mysql26
1 files changed, 25 insertions, 1 deletions
diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql
index 12278be..2ed9a24 100755
--- a/bin/build-master-status-from-mysql
+++ b/bin/build-master-status-from-mysql
@@ -32,7 +32,31 @@
' | \
sponge "${webserver_directory}/build-slaves.html"
-mysql_sanity_check | \
+{
+ mysql_sanity_check || true
+ {
+ # shellcheck disable=SC2016
+ {
+ printf 'SELECT `package_sources`.`pkgbase`,`package_sources`.`git_revision`,`package_sources`.`mod_git_revision`,`upstream_repositories`.`name`'
+ printf ' FROM `package_sources`'
+ printf ' JOIN `%s` ON `%s`.`%s`=`%s`.`id`' \
+ 'upstream_repositories' 'package_sources' 'upstream_package_repository' 'upstream_repositories' \
+ '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`="build-list"'
+ } | \
+ ${mysql_command} --batch | \
+ sed '
+ 1d
+ y/\t/ /
+ s/^/+ /
+ '
+ sed 's/^/- /' "${work_dir}/build-list"
+ } | \
+ sort -k2 -k1,1 | \
+ uniq -uf1
+} | \
sed '
s,^-.*$,<font color="#FF0000">\0</font>,
s,^+.*$,<font color="#00FF00">\0</font>,