Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 -- '-' '_'
+ )"
+}