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-06-08 09:29:59 +0200
committerErich Eckner <git@eckner.net>2017-06-08 09:29:59 +0200
commit6a98dad57677f20a491d0dc4a09a88ed853959dd (patch)
treecba63c5af68f440ba9faa031bbaabe76acf763a0 /bin
parent8bc44560983956a18f5c5e4b896f291378a063d1 (diff)
bin/get-assignment: remove old state files on handing out new assignment
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-assignment7
-rwxr-xr-xbin/return-assignment3
2 files changed, 9 insertions, 1 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"
diff --git a/bin/return-assignment b/bin/return-assignment
index 2169729..b217409 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -146,7 +146,8 @@ mv *.pkg.tar.xz{,.sig} "${master_mirror_directory}/i686/staging/"
done
)
-# remove old stage files
+# remove old stage files (these should be only "done" markers, but
+# actually we don't care what it is)
ls "${work_dir}/package-states" | \
grep "^${1//./\\.}\(\.[^.]\+\)\{4\}\$" | \
grep -v "^${1//./\\.}\.$2\.$3\.$4\.[^.]\+\$" | \