Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/cleanup19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/cleanup b/bin/cleanup
index f84d687..f95a2a9 100755
--- a/bin/cleanup
+++ b/bin/cleanup
@@ -16,6 +16,25 @@ if ! "${base_dir}/bin/sanity-check" -r; then
exit 1
fi
+# remove broken/locked markes of packages not on the buildlist anymore
+
+(
+ ls "${work_dir}/package-states" | \
+ grep '\.broken$\|\.locked$' | \
+ sed '
+ s|^\(.*\)\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)\.[^.]\+$|state \0 \1 \2 \3 \4|
+ '
+ awk '{
+ print "order " $1 "." $2 "." $3 "." $4 " " $1 " " $2 " " $3 " " $4
+ }' "${work_dir}/build-list"
+) | \
+ sort -k3 | \
+ uniq -uf2 | \
+ grep '^state ' | \
+ awk '{print $2}' | \
+ sed "s|^|${work_dir}/package-states/|" | \
+ xargs -rn1 rm
+
# remove logs where package is not broken/locked anymore
(