[projects/pld-ftp-admin] clean-test.sh: remove the packages one by one

arekm arekm at pld-linux.org
Sat Nov 21 10:43:47 CET 2026


commit d0e5717db3c8a18d9f94af30a324549f7a2843e3
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Nov 21 02:07:13 2026 +0100

    clean-test.sh: remove the packages one by one
    
    One package still in the builder queue stopped the removal of all
    the others, in every run until its build finished.

 wwwbin/clean-test.sh | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/wwwbin/clean-test.sh b/wwwbin/clean-test.sh
index 005b37f..cc3575f 100755
--- a/wwwbin/clean-test.sh
+++ b/wwwbin/clean-test.sh
@@ -3,16 +3,14 @@
 LC_ALL=C; export LC_ALL
 cd /home/pld/admins/th/ftp/test/SRPMS/.metadata || exit 1
 
-# find . -name '*.info' -print
+# one by one: a package still building stops only its own removal
+remove() {
+	for pkg; do
+		echo "Removing $pkg"
+		~/pld-ftp-admin/bin/pfa-rmpkg test $pkg
+	done
+}
 
-NOT_BUILD=$(find . -name '*.info' -mtime +1 -printf '%P\0' | xargs -0 -r ~/pld-ftp-admin/bin/pfa-testmvpkg test ready | awk '/has only src.rpm built/ { print $2 }')
-if [ -n "$NOT_BUILD" ]; then
-	echo "Removing $NOT_BUILD"
-	~/pld-ftp-admin/bin/pfa-rmpkg test $NOT_BUILD
-fi
+remove $(find . -name '*.info' -mtime +1 -printf '%P\0' | xargs -0 -r ~/pld-ftp-admin/bin/pfa-testmvpkg test ready | awk '/has only src.rpm built/ { print $2 }')
 
-TOO_OLD=$(find . -name '*.info' -mtime +100 -printf '%P\n')
-if [ -n "$TOO_OLD" ]; then
-	echo "Removing $TOO_OLD"
-	~/pld-ftp-admin/bin/pfa-rmpkg test $TOO_OLD
-fi
+remove $(find . -name '*.info' -mtime +100 -printf '%P\n')
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/a049a512859eaede288d71649a2320e16c959476



More information about the pld-cvs-commit mailing list