From eebf4ff1ff5f243645999857e021d7749c45090d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 7 Feb 2018 09:36:19 +0100 Subject: bin/build-master-status-from-mysql: get shared build-list lock --- bin/build-master-status-from-mysql | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bin/build-master-status-from-mysql') 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`' -- cgit v1.2.3-70-g09d2