index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-05-08 11:30:22 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-05-08 11:30:22 +0200 |
commit | 9bc50bd0b7bbda05b2c9da3130d722e2210fb26d (patch) | |
tree | 001170ccb4f778d9c27554fdb91d633aa637bfb0 /bin/return-assignment | |
parent | dd527963c3170975c2c6f87a64d665133dcc2f74 (diff) |
-rwxr-xr-x | bin/return-assignment | 30 |
diff --git a/bin/return-assignment b/bin/return-assignment index 1b5e991..28b01e7 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -576,6 +576,30 @@ trigger_mirror_refreshs } | \ mysql_run_query -for package in ${packages}; do - remove_old_package_versions 'i686' "${destination}" "${package}" -done +# shellcheck disable=SC2016 +{ + printf 'SELECT' + printf ' `binary_packages`.`id`' + printf ' FROM `binary_packages`' + mysql_join_binary_packages_architectures + mysql_join_binary_packages_repositories + printf ' WHERE ' + mysql_package_name_query + printf ' IN (' + # shellcheck disable=SC2086 + printf '%s\n' ${packages} | \ + base64_encode_each | \ + sed ' + s/^/from_base64("/ + s/$/"),/ + ' + printf '"") AND `repositories`.`name`=from_base64("%s");\n' \ + "$( + printf '%s' "${destination}" | \ + base64 -w0 + )" +} | \ + mysql_run_query | \ + while read -r package_id; do + remove_old_package_versions "${package_id}" + done |