Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bootstrap-mysql26
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql
index 343e64e..2d56aad 100755
--- a/bin/bootstrap-mysql
+++ b/bin/bootstrap-mysql
@@ -458,6 +458,32 @@ tr ' ' '.' < \
mysql_generate_package_metadata "${state_file}"
done
+# shellcheck disable=SC2016
+find "${work_dir}/package-states" -name '*.blocked' -printf '%p %f\n' | \
+ sed '
+ s|\.\([^. ]\+\)\.\([^. ]\+\)\.\([^. ]\+\)\.blocked$| \1 \2 \3|
+ ' | \
+ while read -r state_file pkgbase git_revision mod_git_revision repository; do
+ printf 'UPDATE `build_assignments`'
+ printf ' JOIN `%s` ON `%s`.`id`=`%s`.`%s`' \
+ 'package_sources' 'package_sources' 'build_assignments' 'package_source' \
+ 'upstream_repositories' 'upstream_repositories' 'package_sources' 'upstream_package_repository'
+ printf ' SET `build_assignments`.`is_blocked`=from_base64("%s")' \
+ "$(
+ tr -d '\n' < \
+ "${state_file}" | \
+ base64 -w0
+ )"
+ printf ' WHERE'
+ printf ' `package_sources`.`%s`=from_base64("%s") AND' \
+ 'pkgbase' "$(printf '%s' "${pkgbase}" | base64 -w0)" \
+ 'git_revision' "$(printf '%s' "${git_revision}" | base64 -w0)" \
+ 'mod_git_revision' "$(printf '%s' "${mod_git_revision}" | base64 -w0)"
+ printf ' `upstream_repositories`.`name`=from_base64("%s");\n' \
+ "$(printf '%s' "${repository}" | base64 -w0)"
+ done | \
+ ${mysql_command}
+
grep '^\('"$(
# shellcheck disable=SC2086
printf '%s\\|' ${standalone_package_repositories} ${stable_package_repositories}