index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-05-31 10:18:06 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-05-31 10:18:06 +0200 |
commit | a7a1b30eb62c82b95e5cacf938aedc091bd4c1c3 (patch) | |
tree | 8172dbb9f5361740a71cd377d489aa5e63d1a21b /lib | |
parent | e10413d782fc778f4257675431583310ce1b6df1 (diff) |
-rwxr-xr-x | lib/mysql-functions | 44 |
diff --git a/lib/mysql-functions b/lib/mysql-functions index de3e46e..b637afc 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -708,6 +708,50 @@ mysql_sanity_check() { diff -u \ "${temp_dir}/master-mirror-listing" \ "${temp_dir}/mysql-packages" + + # shellcheck disable=SC2041 + ls_master_mirror 'pool' | \ + sed -n ' + s/\.pkg\.tar\.xz\(\.sig\)\?$// + T + s/-\([0-9]\+\)-\([^-]\+\)$/-\1.0-\2/ + s/-\([^-:]\+-[^-]\+-[^-]\+\)$/-0:\1/ + p + ' | \ + sort | \ + uniq -c | \ + grep '^\s*2\s' | \ + awk '{print $2}' > \ + "${temp_dir}/master-mirror-pool" + + { + printf 'SELECT ' + printf '`binary_packages`.`%s`,' \ + 'pkgname' \ + 'epoch' \ + 'pkgver' \ + 'pkgrel' \ + 'sub_pkgrel' + printf '`architectures`.`name`' + printf ' FROM `binary_packages`' + mysql_join_binary_packages_architectures + printf ' WHERE `binary_packages`.`sha512sum` IS NOT NULL' + } | \ + mysql_run_query | \ + sed ' + s,\t,-, + s,\t,:, + s,\t,-, + s,\t,., + s,\t,-, + ' | \ + sort > \ + "${temp_dir}/mysql-packages-pool" + +# TODO: activate that check + diff -u \ + "${temp_dir}/master-mirror-pool" \ + "${temp_dir}/mysql-packages-pool" >&2 ) } |