Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-package-updates21
1 files changed, 2 insertions, 19 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index ffcb078..5285646 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -16,9 +16,6 @@
# TODO: keep database clean in case of abort
-# TODO: It seems, updating present build assignments in the database is broken
-# ... they seem to get deleted
-
# shellcheck disable=SC2016
usage() {
>&2 echo ''
@@ -136,22 +133,6 @@ delete_package() {
fi
}
-# create tmp_dir and trap
-clean_up() {
- rm -rf --one-file-system "${tmp_dir}"
- # shellcheck disable=SC2016
- {
- printf 'DELETE FROM `binary_packages`'
- printf ' WHERE `binary_packages`.`repository`=('
- printf 'SELECT `repositories`.`id` FROM `repositories`'
- printf ' WHERE `repositories`.`name`="to-be-decided"'
- printf ');\n'
- } | \
- mysql_run_query
-}
-tmp_dir=$(mktemp -d 'tmp.get-package-updates.XXXXXXXXXX' --tmpdir)
-trap 'clean_up' EXIT
-
# Update git repositories (official packages, community packages and the repository of package customizations).
for repo in ${repo_names}; do
@@ -202,6 +183,8 @@ if ! flock -s ${block_flag} 8; then
exit
fi
+trap mysql_cleanup EXIT
+
# shellcheck disable=SC2119
mysql_cleanup