Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2023-07-15 11:46:51 +0200
committerErich Eckner <git@eckner.net>2023-07-15 11:46:51 +0200
commitcead32cb5659dfaf71651532b6b6ec20209600da (patch)
tree9b617d94498d3e67394b9b0744c3362081a6ed62
parent13af83a6753d7d4423c1669e941f3fea53a58000 (diff)
db-update: make deletion of obsolete pool packages in the db fail the intention, if the db query fails
* the `sort -u` was unnecessary anyways * the `sort -u` swallowed the exit code of mysql_run_query * failing mysql_run_query should stop the execution flow, i.e. not remove the intention
-rwxr-xr-xbin/db-update6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/db-update b/bin/db-update
index 88c567d..4c6ae8e 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -683,12 +683,10 @@ mysql_query_update_replaced_bpir() {
# somewhat inaccurate
{
- printf '{\n'
- printf ' mysql_run_query'
- printf ' | sort -u'
+ printf 'mysql_run_query'
printf ' >> "%s/rm"\n' \
"${perma_tmp_dir}"
- printf '} <<END_OF_MYSQL_QUERY\n'
+ printf ' <<END_OF_MYSQL_QUERY\n'
printf 'CREATE TEMPORARY TABLE `replaced_bpir` (`id` BIGINT, UNIQUE KEY (`id`));\n'
printf 'CREATE TEMPORARY TABLE `moved_bpir` (`id` BIGINT, `new_repository` MEDIUMINT, UNIQUE KEY (`id`));\n'