Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/mysql-functions
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mysql-functions')
-rwxr-xr-xlib/mysql-functions6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 4bd1164..5173bfb 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -57,7 +57,11 @@ mysql_run_query() {
< "${query_stdin}" \
> "${query_stdout}" \
2>> "${query_stderr}"; then
- mv "${query_stdin}" "${work_dir}/successful.${query_stdin##*/}"
+ if grep -qF 'DELETE `binary_packages' "${query_stdin}"; then
+ mv "${query_stdin}" "${work_dir}/successful.${query_stdin##*/}"
+ else
+ rm "${query_stdin}"
+ fi
rm "${query_stderr}"
fi
if ! [ -f "${query_stdin}" ]; then