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-13 21:54:26 +0200
committerErich Eckner <git@eckner.net>2023-07-13 21:54:26 +0200
commit70a9d1c9ad752e4bb32db0722d687dac136b3bc2 (patch)
tree5a3d218f0c43b5bef587fcfd20a2766f22b6beb1
parente527624aa0efd648f8bdacaaac62ec566ba6c8d8 (diff)
mysql_run_query, intent_something: add comments about the caller
* aid in finding which tool broke, if there are residual files on the buildmaster
-rwxr-xr-xlib/intentions-queue1
-rwxr-xr-xlib/mysql-functions5
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/intentions-queue b/lib/intentions-queue
index 802d1ca..61ec4f3 100755
--- a/lib/intentions-queue
+++ b/lib/intentions-queue
@@ -40,6 +40,7 @@ intent_something() {
# shellcheck disable=SC2016
printf '%s\n' \
'#!/bin/sh' \
+ '# called by '"${0}" \
'[ -n "${base_dir}" ] || . '"${base_dir}"'/lib/load-configuration'
cat
printf 'rm "%s"\n' "${intentions_directory}/intention.${next_number}"
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 0819089..5695b97 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -46,7 +46,10 @@ mysql_run_query() {
query_stdin=$(mktemp "${work_dir}/tmp.mysql-functions.${file_name_extra}query.$(date +'%Y-%m-%dT%T').XXXXXX.stdin")
query_stdout="${query_stdin%.stdin}.stdout"
query_stderr="${query_stdin%.stdin}.stderr"
- cat > "${query_stdin}"
+ {
+ printf -- '-- called by %s\n' "$0"
+ cat
+ } > "${query_stdin}"
for _ in $(seq 10); do
if [ -f "${query_stdout}" ]; then
wait_some_time 10 10