From 7662ef55ad990ae7f9a8823542c6d5e9f2e1e565 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 30 May 2017 14:50:14 +0200 Subject: bin/get-package-updates: create lock at later time; add comment --- bin/get-package-updates | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/bin/get-package-updates b/bin/get-package-updates index 9c3b266..d9a9322 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -18,17 +18,11 @@ delete_package() { sed -i "/^${1//./\\.} /d" "${work_dir}/build-list.new" } -# Create a lock file for build list. - -exec 9> "${build_list_lock_file}" -if ! flock -n 9; then - >&2 echo 'come back (shortly) later - I cannot lock build list.' - exit -fi - # Update git repositories (official packages, community packages and the repository of package customizations). for repo in "${repo_paths[@]}"; do + # TODO: + # this is somewhat redundant and slow -- improve it! git -C "${repo}" clean -df git -C "${repo}" reset --hard git -C "${repo}" checkout master @@ -51,6 +45,14 @@ for repo in "${!repo_paths[@]}"; do )" done +# Create a lock file for build list. + +exec 9> "${build_list_lock_file}" +if ! flock -n 9; then + >&2 echo 'come back (shortly) later - I cannot lock build list.' + exit +fi + echo 'Check modified packages from the last update, and put them to the build list.' # Check modified packages from the last update, and put them to the build list. -- cgit v1.2.3-54-g00ecf