summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-30 10:10:12 +0200
committerErich Eckner <git@eckner.net>2018-05-30 10:10:12 +0200
commit68750f39f1745fc4251dfb2b9fb9c194ac29c70d (patch)
tree8be7dfd7938787023c6369a1aa52742eb9b7e538
parent0a362ccf515c3b0c374f768400569a48e36d2572 (diff)
downloadbuilder-68750f39f1745fc4251dfb2b9fb9c194ac29c70d.tar.xz
bin/sanity-check: get archs and repos from the database
-rwxr-xr-xbin/sanity-check24
1 files changed, 22 insertions, 2 deletions
diff --git a/bin/sanity-check b/bin/sanity-check
index bad927b..502ab63 100755
--- a/bin/sanity-check
+++ b/bin/sanity-check
@@ -44,8 +44,28 @@ eval set -- "$(
block_flag='-n'
silence=0
-repos="${standalone_package_repositories} ${stable_package_repositories} ${testing_package_repositories} ${staging_package_repositories}"
-archs='i686'
+# shellcheck disable=SC2016
+repos=$(
+ {
+ printf 'SELECT DISTINCT `repositories`.`name`'
+ printf ' FROM `repositories`'
+ printf ' WHERE `repositories`.`is_on_master_mirror`;\n'
+ } | \
+ mysql_run_query
+)
+# shellcheck disable=SC2016
+archs=$(
+ {
+ printf 'SELECT DISTINCT `architectures`.`name`'
+ printf ' FROM `architectures`'
+ printf ' WHERE EXISTS ('
+ printf 'SELECT 1 FROM `repositories`'
+ printf ' WHERE `repositories`.`architecture`=`architectures`.`id`'
+ printf ' AND `repositories`.`is_on_master_mirror`'
+ printf ');\n'
+ } | \
+ mysql_run_query
+)
while true
do