Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-03 10:14:14 +0200
committerErich Eckner <git@eckner.net>2017-07-03 10:14:14 +0200
commitfcfd7abfeb7dda72de365eb20038a9378301ccc5 (patch)
treee90d8e99e5ffac39218b27edf9ff3f1c0cd4a80b /bin
parentf374df980982f59185a3de2b9cef8164bf837593 (diff)
bin/seed-build-list: actually append new content to build-list (and get a lock for that)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/seed-build-list13
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/seed-build-list b/bin/seed-build-list
index b69eaef..a744380 100755
--- a/bin/seed-build-list
+++ b/bin/seed-build-list
@@ -224,6 +224,11 @@ done < \
awk '{print "append " $1 " " $2 " " $3 " " $4 " " $1}' > \
"${tmp_dir}/build-list.append"
+# Create a lock file for build list.
+
+exec 9> "${build_list_lock_file}"
+flock 9
+
# ignore packages already on the build list
awk '{print "old " $1 " " $2 " " $3 " " $4 " " $1}' "${work_dir}/build-list" > \
"${tmp_dir}/build-list.old"
@@ -232,5 +237,9 @@ cat "${tmp_dir}/build-list.append" "${tmp_dir}/build-list.old" | \
sort -k6,6 | \
uniq -uf5 | \
grep '^append ' | \
- awk '{print $2 " " $3 " " $4 " " $5}' > \
- "${work_dir}/build-list.new"
+ awk '{print $2 " " $3 " " $4 " " $5}' >> \
+ "${work_dir}/build-list"
+
+# Remove the lock file
+
+rm -f "${build_list_lock_file}"