summaryrefslogtreecommitdiff
path: root/bin/bootstrap-mysql
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-01-22 13:28:39 +0100
committerErich Eckner <git@eckner.net>2018-01-22 13:28:39 +0100
commit571c771968611c942162fe5b3132c76ed51af146 (patch)
tree2ce205357f37bc24f98723ac460c554676949c65 /bin/bootstrap-mysql
parent2134c5f3aaecc5c64caacf550ee413d5ad96b7cf (diff)
downloadbuilder-571c771968611c942162fe5b3132c76ed51af146.tar.xz
bin/bootstrap-mysql: initialize `fail_reasons`, too
Diffstat (limited to 'bin/bootstrap-mysql')
-rwxr-xr-xbin/bootstrap-mysql40
1 files changed, 39 insertions, 1 deletions
diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql
index 69bc015..1eb98a2 100755
--- a/bin/bootstrap-mysql
+++ b/bin/bootstrap-mysql
@@ -114,6 +114,7 @@ if [ ! "$1" = 'slim' ]; then
' UNIQUE directory' \
'fail_reasons SMALLINT' \
' name VARCHAR(32)' \
+ ' identifier VARCHAR(64)' \
' severity SMALLINT' \
' UNIQUE name' \
'failed_builds MEDIUMINT' \
@@ -121,7 +122,7 @@ if [ ! "$1" = 'slim' ]; then
' build_assignment BIGINT :build_assignments' \
' date DATETIME' \
' reason SMALLINT :fail_reasons' \
- ' log_file VARCHAR(128)'
+ ' log_file VARCHAR(512)'
)
{
@@ -232,6 +233,43 @@ fi
sed 's|,$||'
printf ';\n'
# shellcheck disable=SC2016
+ printf 'INSERT IGNORE INTO `fail_reasons` (`name`,`identifier`,`severity`) VALUES '
+ printf '(from_base64("%s"),"%s",%s),' \
+ "$(
+ printf '%s' '==> ERROR: A failure occurred in build()\.' | \
+ base64 -w0
+ )" 'build()' 0 \
+ "$(
+ printf '%s' '==> ERROR: Could not download sources\.' | \
+ base64 -w0
+ )" 'source' 1 \
+ "$(
+ printf '%s' '.*error: failed to commit transaction (invalid or corrupted package)' | \
+ base64 -w0
+ )" 'package-cache' 2 \
+ "$(
+ printf '%s' '==> ERROR: A failure occurred in prepare()\.' | \
+ base64 -w0
+ )" 'prepare()' 2 \
+ "$(
+ printf '%s' '==> ERROR: A failure occurred in package\(_\S\+\)\?()\.' | \
+ base64 -w0
+ )" 'package()' 3 \
+ "$(
+ printf '%s' '==> ERROR: A failure occurred in check()\.' | \
+ base64 -w0
+ )" 'check()' 4 \
+ "$(
+ printf '%s' '==> ERROR: '"'"'pacman'"'"' failed to install missing dependencies\.' | \
+ base64 -w0
+ )" 'dependencies' 1 \
+ "$(
+ printf '%s' '==> ERROR: Running makepkg as root is not allowed as it can cause permanent,.*' | \
+ base64 -w0
+ )" 'run-as-root' 1 | \
+ sed 's|,$||'
+ printf ';\n'
+ # shellcheck disable=SC2016
printf 'INSERT IGNORE INTO `git_repositories` (`name`,`url`,`directory`,`head`) VALUES'
{
for repo in ${repo_names}; do