Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-09-19 07:00:45 +0200
committerErich Eckner <git@eckner.net>2018-09-19 07:01:08 +0200
commit14b8dce118345b519a8be78fabb073fe93b0ab25 (patch)
treee86d56afd87b30f50affc4a3967f9396a9bbaf0e /lib
parentd5e3e6b994deaf64eb8e4ffb9c5b3260aa9b5e93 (diff)
lib/mysql-functions: mysql_find_build_assignment_loops(): insert looped packages, 20 at a time
Diffstat (limited to 'lib')
-rwxr-xr-xlib/mysql-functions8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index aba6ce6..c605c8b 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -783,9 +783,13 @@ mysql_find_build_assignment_loops() {
>&2 printf 'ERROR: non-numeric id "%s"\n' "${id}"
continue
fi
- printf '(%s,%s),' "${loop}" "${id}"
+ printf '(%s,%s),\n' "${loop}" "${id}"
done | \
- sed 's/,$//'
+ sed '
+ 1~20 i INSERT INTO `build_dependency_loops` (`loop`,`build_assignment`) VALUES ''
+ 0~20 s/,$/;/
+ $ s/,$/;/
+ '
}
)
{