index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-01-23 11:20:19 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-01-23 11:20:19 +0100 |
commit | fa31b12beae5c7b6a157dd3c9c7b534975e3e3b2 (patch) | |
tree | 244c53250a5dda43c32c3385d48053b9ac7b3d7a /bin/bootstrap-mysql | |
parent | 80a82f28781f9d6723e39341a697c1be0e287a93 (diff) |
-rwxr-xr-x | bin/bootstrap-mysql | 26 |
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} |