Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/get-assignment
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-08 09:29:59 +0200
committerErich Eckner <git@eckner.net>2017-06-08 09:29:59 +0200
commit6a98dad57677f20a491d0dc4a09a88ed853959dd (patch)
treecba63c5af68f440ba9faa031bbaabe76acf763a0 /bin/get-assignment
parent8bc44560983956a18f5c5e4b896f291378a063d1 (diff)
bin/get-assignment: remove old state files on handing out new assignment
Diffstat (limited to 'bin/get-assignment')
-rwxr-xr-xbin/get-assignment7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index 42446bc..2f1c4f6 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -28,6 +28,13 @@ hand_out_assignment() {
return 0
fi
+ # we don't care anymore if an older version of this package was
+ # "locked" or "broken" (we keep only marker for older "done" packages)
+ ls "${work_dir}/package-states" | \
+ grep "^${1//./\\.}\(\.[^.]\+\)\{3\}\.\(locked\|broken\)\$" | \
+ sed "s|^|${work_dir}/package-states/|" | \
+ xargs -rn1 rm -f
+
echo "$1 $2 $3 $4"
echo "${slave}" > "${work_dir}/package-states/$1.$2.$3.$4.locked"