Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-15 10:30:11 +0200
committerErich Eckner <git@eckner.net>2018-05-15 10:30:11 +0200
commit1eb61f044cb3a58534257b046ed1020dc8573b5a (patch)
tree37ca90aee72975c53fba3e6e7022bc7be8c86ba1 /lib
parente39e8c4831f6016344de8448b193c16dad68ba8b (diff)
lib/mysql-functions: mysql_retrieve_repository_ids() new
Diffstat (limited to 'lib')
-rwxr-xr-xlib/mysql-functions18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 55e994e..ef70098 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -1049,3 +1049,21 @@ mysql_show_binary_packages_in_repositories_issues() {
} | \
mysql_run_query
}
+
+# mysql_retrieve_repository_ids
+# retrieve the ids of all known repositories into $repository_ids__$arch_$repo
+mysql_retrieve_repository_ids() {
+ eval "$(
+ {
+ printf 'SELECT CONCAT('
+ printf '"repository_ids__",'
+ printf '`architectures`.`name`,"_",'
+ printf '`repositories`.`name`,"=",'
+ printf '`repositories`.`id`'
+ printf ') FROM `repositories`'
+ mysql_join_repositories_architectures
+ } | \
+ mysql_run_query | \
+ tr -- '-' '_'
+ )"
+}