diff options
author | Erich Eckner <git@eckner.net> | 2020-02-13 14:18:37 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-02-13 14:18:37 +0100 |
commit | dfb3538e3048089b45cd7acf3203199bff9949eb (patch) | |
tree | 8e4d00ffea4393b20306f0564fd5cb3405ff865a | |
parent | 5a63f896f4fd5cb1c15facaea31da822594b8cd2 (diff) | |
download | builder-dfb3538e3048089b45cd7acf3203199bff9949eb.tar.xz |
lib/mysql-functions: mysql_retrieve_static_information(): cleanup
-rwxr-xr-x | lib/mysql-functions | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions index 835d717..3932f87 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -1428,8 +1428,11 @@ mysql_join_dependencies_install_target_providers_with_versions() { # - ids of architectures -> $architecture_ids__$arch # - ids of non-any architectures -> $non_any_architecture_ids # - ids of package repositories -> $repository_ids__$arch_$repo +# - names of upstream_repositories -> $upstream_repository_names # - names, paths and heads of git_repositories -# - ids of repository_stabilities +# - ids of repository_stabilities -> $repository_stability_ids__$stability +# - ids of compressions -> $compression_ids__$compression +# - $package_compression_suffix_regex mysql_retrieve_static_information() { eval "$( { @@ -1458,13 +1461,13 @@ mysql_retrieve_static_information() { printf ';\n' printf 'SELECT CONCAT(' printf '"upstream_repository_names=\\"",' - printf 'REPLACE(GROUP_CONCAT(`upstream_repositories`.`name`),","," "),' + printf 'GROUP_CONCAT(`upstream_repositories`.`name` SEPARATOR " "),' printf '"\\"")' printf ' FROM `upstream_repositories`' printf ' GROUP BY "1";\n' printf 'SELECT CONCAT(' printf '"repo_names=\\"",' - printf 'REPLACE(GROUP_CONCAT(`git_repositories`.`name`),","," "),' + printf 'GROUP_CONCAT(`git_repositories`.`name` SEPARATOR " "),' printf '"\\"")' printf ' FROM `git_repositories`' printf ' GROUP BY "1";\n' @@ -1488,7 +1491,12 @@ mysql_retrieve_static_information() { printf '),"=",' printf '`compressions`.`id`' printf '),"-","_")' - printf ' FROM `compressions`' + printf ' FROM `compressions`;\n' + printf 'SELECT CONCAT(' + printf '"package_compression_suffix_regex=\\"",' + printf 'GROUP_CONCAT(`compressions`.`suffix` SEPARATOR "\\\\|"),' + printf '"\\""' + printf ') FROM `compressions`;\n' } | \ mysql_run_query )" |