index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-03-09 16:09:53 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-03-09 16:09:53 +0100 |
commit | 9ede9a11566506384d5ce13736a9153313a14535 (patch) | |
tree | b754134eeb351b7cac6365f878ee2f520da4a6ba | |
parent | 2acef10964ec3f7027981f45a072fd5e4aab3722 (diff) |
-rwxr-xr-x | bin/get-package-updates | 21 |
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 |