summaryrefslogtreecommitdiff
path: root/lib/mysql-functions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-30 11:10:15 +0200
committerErich Eckner <git@eckner.net>2018-05-30 11:10:15 +0200
commite81196e242a3de0c3b9c4394c7aedbb84bdc87b6 (patch)
treeb5b864aea62545eecad9aced529c25b69159f4d1 /lib/mysql-functions
parent7b82381437c360687423a32beb7dcd6812b06ad9 (diff)
downloadbuilder-e81196e242a3de0c3b9c4394c7aedbb84bdc87b6.tar.xz
repo_names and repo_paths__* is read from the database on the buildmaster, now
Diffstat (limited to 'lib/mysql-functions')
-rwxr-xr-xlib/mysql-functions19
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 12de251..196e03b 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -1043,15 +1043,26 @@ mysql_show_binary_packages_in_repositories_issues() {
mysql_retrieve_static_information() {
eval "$(
{
- printf 'SELECT CONCAT('
+ printf 'SELECT REPLACE(CONCAT('
printf '"repository_ids__",'
printf '`architectures`.`name`,"_",'
printf '`repositories`.`name`,"=",'
printf '`repositories`.`id`'
- printf ') FROM `repositories`'
+ printf '),"-","_") FROM `repositories`'
mysql_join_repositories_architectures
+ printf ';\n'
+ printf 'SELECT CONCAT('
+ printf '"repo_names=\\"",'
+ printf 'REPLACE(GROUP_CONCAT(`git_repositories`.`name`),","," "),'
+ printf '"\\"")'
+ printf ' FROM `git_repositories`'
+ printf ' GROUP BY "1";\n'
+ printf 'SELECT CONCAT('
+ printf '"repo_paths__",'
+ printf '`git_repositories`.`name`,"=",'
+ printf '"\\"",`git_repositories`.`directory`,"\\"")'
+ printf ' FROM `git_repositories`;\n'
} | \
- mysql_run_query | \
- tr -- '-' '_'
+ mysql_run_query
)"
}