Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-07-26 15:42:31 +0200
committerErich Eckner <git@eckner.net>2018-07-26 15:42:31 +0200
commit0feb62912c518b0e031146d4337580eb9bfd93a2 (patch)
treed98586def27724754cdfddfd98007008747aa8aa /bin
parentc7b9db34c9563a460e3f2eaa63978fdf3938cfeb (diff)
bin/return-assignment: use temp table instead of parsing package-ids
Diffstat (limited to 'bin')
-rwxr-xr-xbin/return-assignment16
1 files changed, 5 insertions, 11 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index b837cac..17a742b 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -681,17 +681,11 @@ trigger_mirror_refreshs
# TODO: do not remove toolchain build assignments if they need to be compiled a second time
# remove from build-list
- printf 'DELETE FROM `binary_packages_in_repositories`'
- printf ' WHERE `binary_packages_in_repositories`.`package` IN ('
- cut -d' ' -f1 < \
- "${tmp_dir}/package-ids" | \
- base64_encode_each | \
- sed '
- s/^/from_base64("/
- s/$/"),/
- $ s/,$//
- '
- printf ') AND `binary_packages_in_repositories`.`repository`=%s;\n' \
+ printf 'DELETE `binary_packages_in_repositories`'
+ printf ' FROM `binary_packages_in_repositories`'
+ printf ' JOIN `pkg_hashes`'
+ printf ' ON `pkg_hashes`.`pkgid`=`binary_packages_in_repositories`.`package`'
+ printf ' WHERE `binary_packages_in_repositories`.`repository`=%s;\n' \
"${repository_ids__any_build_list}"
printf 'COMMIT;\n'