summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-05-30 14:50:14 +0200
committerErich Eckner <git@eckner.net>2017-05-30 14:50:34 +0200
commit7662ef55ad990ae7f9a8823542c6d5e9f2e1e565 (patch)
treec9c9fafb5c1aedd8678ca376cb40733a0f4d28c4 /bin
parenta6f9c18a1fb30370bdd86e87782485551be83f3d (diff)
downloadbuilder-7662ef55ad990ae7f9a8823542c6d5e9f2e1e565.tar.xz
bin/get-package-updates: create lock at later time; add comment
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-package-updates18
1 files 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.