summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-11-23 10:09:35 +0100
committerErich Eckner <git@eckner.net>2017-11-23 10:09:35 +0100
commit175ab2ae8bc8dd69e5cbf780fca42f4c893560ad (patch)
treee9eb0d020cc0d1fda347613607ebe79f1bd11862
parentd55aef4d57e264c28f1d42da9fb3bbb3718e8fef (diff)
downloadbuilder-175ab2ae8bc8dd69e5cbf780fca42f4c893560ad.tar.xz
bin/get-assignment: list each slave only once per .locked file
-rwxr-xr-xbin/get-assignment10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index 607f826..f755204 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -41,9 +41,13 @@ hand_out_assignment() {
"${work_dir}/build-list"
echo "$1 $2 $3 $4 ${sub_pkgrel}"
- # shellcheck disable=SC2154
- echo "${slave}" >> \
- "${work_dir}/package-states/$1.$2.$3.$4.locked"
+ {
+ # shellcheck disable=SC2154
+ echo "${slave}"
+ cat "${work_dir}/package-states/$1.$2.$3.$4.locked"
+ } | \
+ sort -u | \
+ sponge "${work_dir}/package-states/$1.$2.$3.$4.locked"
# lock every loop this package breaks
find "${work_dir}/build-list.loops" -maxdepth 1 -regextype grep \