Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-12-01 13:40:53 +0100
committerErich Eckner <git@eckner.net>2017-12-01 13:40:53 +0100
commit5caf3facc5a1160418106a85ea1ffaf618ac6752 (patch)
treee9fbb96cd73636eb33580b15e183509c8a2378bf
parente6e484b359a2d0cfb759f0d7cfa2d028ac50b4d0 (diff)
bin/mysql-functions: show_binary_package now with (less) html output
-rwxr-xr-xbin/mysql-functions37
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
}