diff options
author | Erich Eckner <git@eckner.net> | 2018-02-07 09:36:19 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-07 09:36:19 +0100 |
commit | eebf4ff1ff5f243645999857e021d7749c45090d (patch) | |
tree | 354f073b45f7ecd7734355de5119c16bd4f6b5b8 | |
parent | 4d289c1d38a240b6e7f5a2a3c805bbb82c459ae9 (diff) | |
download | builder-eebf4ff1ff5f243645999857e021d7749c45090d.tar.xz |
bin/build-master-status-from-mysql: get shared build-list lock
-rwxr-xr-x | bin/build-master-status-from-mysql | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql index 408ef1e..7a3d7e6 100755 --- a/bin/build-master-status-from-mysql +++ b/bin/build-master-status-from-mysql @@ -10,6 +10,10 @@ tmp_dir=$(mktemp -d 'tmp.build-master-status-from-mysql.XXXXXXXXXX' --tmpdir) trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT +# always block if locked +exec 9> "${build_list_lock_file}" +flock -s 9 + # shellcheck disable=SC2016 { printf 'SELECT DISTINCT `package_sources`.`pkgbase`,`package_sources`.`git_revision`,`package_sources`.`mod_git_revision`,`upstream_repositories`.`name`' |