From 8aeca7194277ab52126bb3358635743be2ed7e2d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 25 May 2018 13:40:36 +0200 Subject: lib/mysql-functions: make mysql_join_binary_packages_repositories and mysql_join_repositories_binary_packages obsolete --- bin/get-package-updates | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'bin/get-package-updates') diff --git a/bin/get-package-updates b/bin/get-package-updates index cfc0f74..d97266e 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -232,11 +232,12 @@ trigger_rebuild_on_any_file_sed_expression=$( printf '`upstream_repositories`.`name`,"-",' printf 'IF(`architectures`.`name`="any","any","x86_64"))' printf ' FROM `binary_packages`' + mysql_join_binary_packages_binary_packages_in_repositories mysql_join_binary_packages_build_assignments mysql_join_build_assignments_architectures mysql_join_build_assignments_package_sources mysql_join_package_sources_upstream_repositories - printf ' WHERE `binary_packages`.`repository`=%s;\n' \ + printf ' WHERE `binary_packages_in_repositories`.`repository`=%s;\n' \ "${repository_ids__any_build_list}" } | \ mysql_run_query | \ @@ -381,12 +382,13 @@ trigger_rebuild_on_any_file_sed_expression=$( printf ' FROM `binary_packages`' mysql_join_binary_packages_build_assignments mysql_join_build_assignments_package_sources + mysql_join_binary_packages_binary_packages_in_repositories printf ' WHERE `package_sources`.`pkgbase`=from_base64("%s")' \ "$( printf '%s' "${package}" | \ base64 -w0 )" - printf ' AND `binary_packages`.`repository` IN (%s,%s);\n' \ + printf ' AND `binary_packages_in_repositories`.`repository` IN (%s,%s);\n' \ "${repository_ids__any_build_list}" \ "${repository_ids__any_deletion_list}" # remove is-to-be-deleted marker from old binary packages @@ -595,14 +597,15 @@ echo 'Done - mark decisions as final.' done # move binary_packages from "to-be-decided" to "build-list" printf 'UPDATE `binary_packages`' - mysql_join_binary_packages_repositories '' 'from_repo' + mysql_join_binary_packages_binary_packages_in_repositories '' 'from_bir' printf ' LEFT' mysql_join_binary_packages_binary_packages_in_repositories printf ' SET `binary_packages`.`repository`=%s,' \ "${repository_ids__any_build_list}" printf '`binary_packages_in_repositories`.`repository`=%s' \ "${repository_ids__any_build_list}" - printf ' WHERE `from_repo`.`name`="to-be-decided";\n' + printf ' WHERE `from_bir`.`id`=%s;\n' \ + "${repository_ids__any_to_be_decided}" } | \ mysql_run_query -- cgit v1.2.3-70-g09d2