From d2e0ef2a558e27e07150f239d91e4c29ce822426 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 16 Feb 2018 11:14:03 +0100 Subject: bin/mysql-functions: mysql_join_*_* new --- bin/show-dependencies | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'bin/show-dependencies') diff --git a/bin/show-dependencies b/bin/show-dependencies index 0a7a1fd..bb1ae37 100755 --- a/bin/show-dependencies +++ b/bin/show-dependencies @@ -13,7 +13,7 @@ if [ $# -eq 0 ]; then { printf 'SELECT `package_sources`.`pkgbase`' printf ' FROM `package_sources`' - printf ' JOIN `build_assignments` ON `build_assignments`.`package_source`=`package_sources`.`id`' + mysql_join_package_sources_build_assignments printf ' WHERE `build_assignments`.`is_broken`' } | \ ${mysql_command} --raw --batch | \ @@ -28,9 +28,8 @@ if [ $# -eq 0 ]; then { printf 'SELECT DISTINCT `package_sources`.`pkgbase`,`binary_packages`.`pkgname`' printf ' FROM `binary_packages`' - printf ' JOIN `%s` ON `%s`.`id`=`%s`.`%s`' \ - 'build_assignments' 'build_assignments' 'binary_packages' 'build_assignment' \ - 'package_sources' 'package_sources' 'build_assignments' 'package_source' + mysql_join_binary_packages_build_assignments + mysql_join_build_assignments_package_sources printf ' ORDER BY `binary_packages`.`pkgname`' # Why can't mysql order in the same way "sort" does! } | \ -- cgit v1.2.3-70-g09d2