summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-09 15:29:19 +0200
committerErich Eckner <git@eckner.net>2018-05-09 15:29:19 +0200
commit99ab64ce137a4c139a399bf4286e7dc6ddf5e824 (patch)
tree3b27c5045e0036a828a8536dc2a6b62b0f8d7cf6 /bin
parenta6f19a534ccd8e4d6aaa9a461119d3d0e4560b3e (diff)
downloadbuilder-99ab64ce137a4c139a399bf4286e7dc6ddf5e824.tar.xz
bin/get-package-updates: keep binary_packages_in_repositories up to date
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-package-updates11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index cf0e608..f20ee27 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -129,6 +129,17 @@ delete_package() {
printf ' WHERE `repositories`.`name` in ("build-list","to-be-decided")'
printf ' AND `package_sources`.`pkgbase`=from_base64("%s");\n' \
"$(printf '%s' "$1" | base64 -w0)"
+ printf 'COMMIT;\n'
+ printf 'UPDATE `binary_packages_in_repositories`'
+ mysql_join_binary_packages_in_repositories_binary_packages
+ mysql_join_binary_packages_repositories
+ mysql_join_binary_packages_build_assignments
+ mysql_join_build_assignments_package_sources
+ printf ' SET `binary_packages`.`repository`=(SELECT `repositories`.`id` FROM `repositories` WHERE `repositories`.`name`="deletion-list")'
+ printf ' WHERE `repositories`.`name` in ("build-list","to-be-decided")'
+ printf ' AND `package_sources`.`pkgbase`=from_base64("%s");\n' \
+ "$(printf '%s' "$1" | base64 -w0)"
+ printf 'COMMIT;\n'
# other packages are marked as `is_to_be_deleted`
printf 'UPDATE `binary_packages`'
mysql_join_binary_packages_repositories