From b1bf479514f9b796169df90f6b8097b91600620a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 22 Jan 2018 20:14:36 +0100 Subject: bin/get-package-updates: mark packages as on deletion-list in mysql database --- bin/get-package-updates | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'bin') diff --git a/bin/get-package-updates b/bin/get-package-updates index 2d113f1..cea1ec1 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -90,6 +90,20 @@ delete_package() { echo "$1" >> \ "${work_dir}/deletion-list.new" sed -i "/^$(str_to_regex "${1}") /d" "${work_dir}/build-list.new" + # shellcheck disable=SC2016 + { + printf 'UPDATE `binary_packages`' + printf ' JOIN `%s` ON `%s`.`id`=`binary_packages`.`%s`' \ + 'repositories' 'repositories' 'repository' \ + 'build_assignments' 'build_assignments' 'build_assignment' + printf ' JOIN `%s` ON `%s`.`id`=`%s`.`%s`' \ + 'package_sources' 'package_sources' 'build_assignments' 'package_source' + printf ' WHERE `repositories`.`name`="build-list"' + printf ' AND `package_sources`.`pkgbase`=from_base64("%s")' \ + "$(printf '%s' "$1" | base64 -w0)" + printf ' SET `binary_packages`.`repository`=(SELECT `repositories`.`id` FROM `repositories` WHERE `repositories`.`name`="deletion-list");' + } | \ + ${mysql_command} } # create tmp_dir and trap -- cgit v1.2.3-70-g09d2