diff options
author | Erich Eckner <git@eckner.net> | 2017-12-01 13:40:53 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-12-01 13:40:53 +0100 |
commit | 5caf3facc5a1160418106a85ea1ffaf618ac6752 (patch) | |
tree | e9fbb96cd73636eb33580b15e183509c8a2378bf /bin/mysql-functions | |
parent | e6e484b359a2d0cfb759f0d7cfa2d028ac50b4d0 (diff) | |
download | builder-5caf3facc5a1160418106a85ea1ffaf618ac6752.tar.xz |
bin/mysql-functions: show_binary_package now with (less) html output
Diffstat (limited to 'bin/mysql-functions')
-rwxr-xr-x | bin/mysql-functions | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/bin/mysql-functions b/bin/mysql-functions index 8c84857..737a078 100755 --- a/bin/mysql-functions +++ b/bin/mysql-functions @@ -98,16 +98,32 @@ show_binary_package() { local joint ${mysql_command} "$( - printf 'SELECT * FROM `binary_packages`' - for joint in 'architectures:binary_packages:architecture' 'package_sources:binary_packages:package_source'; do - printf ' JOIN `%s` ON `%s`.`id` =' \ - "${joint%%:*}" "${joint%%:*}" - joint="${joint#*:}" - printf ' `%s`.`%s`' \ - "${joint%:*}" "${joint#*:}" - done - printf ' WHERE' { + printf 'SELECT' + printf ' `%s`.`%s`,' \ + 'repositories' 'name' \ + 'binary_packages' 'pkgname' \ + 'package_sources' 'pkgver' \ + 'package_sources' 'pkgrel' \ + 'binary_packages' 'sub_pkgrel' \ + 'architectures' 'name' \ + 'package_sources' 'pkgbase' \ + 'package_sources' 'git_revision' \ + 'package_sources' 'mod_git_revision' \ + 'upstream_repositories' 'name' + printf ' FROM `binary_packages`' + for joint in \ + 'architectures:binary_packages:architecture' \ + 'package_sources:binary_packages:package_source' \ + 'repositories:binary_packages:repository' \ + 'upstream_repositories:package_sources:upstream_package_repository'; do + printf ' JOIN `%s` ON `%s`.`id` =' \ + "${joint%%:*}" "${joint%%:*}" + joint="${joint#*:}" + printf ' `%s`.`%s`' \ + "${joint%:*}" "${joint#*:}" + done + printf ' WHERE' printf ' `%s`.`%s` = from_base64("%s") AND' \ 'binary_packages' 'pkgname' "${pkgname}" \ 'binary_packages' 'sub_pkgrel' "${sub_pkgrel}" \ @@ -116,7 +132,8 @@ show_binary_package() { printf ';' } | \ sed ' + s|, FROM| FROM|g s|AND;|;|g ' - )" + )" --html } |