[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Debian maintenance: really fixup cleanup of...

Holger Levsen (@holger) gitlab at salsa.debian.org
Fri Feb 24 12:21:15 GMT 2023



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
8e28dee9 by Holger Levsen at 2023-02-24T13:20:54+01:00
reproducible Debian maintenance: really fixup cleanup of /srv/reproducible-results/rbuild-debian/(r-b-build|temp).*

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_maintenance.sh


Changes:

=====================================
bin/reproducible_maintenance.sh
=====================================
@@ -46,16 +46,18 @@ fi
 #
 # delete old temp directories in $REP_RESULTS/rbuild-debian
 #
-echo "$(date -u) - Deleting temp directories in $REP_RESULTS/rbuild-debian, older than 3 days."
-OLDSTUFF=$(find $REP_RESULTS/rbuild-debian -maxdepth 1 -type d -mtime +2 -name 'tmp.*' -o -name 'r-b-build.*' -exec ls -lad {} \; 2>/dev/null|| true)
-if [ ! -z "$OLDSTUFF" ] ; then
-	echo
-	echo "Old temp directories found in $REP_RESULTS/rbuild-debian"
-	find $REP_RESULTS/rbuild-debian -maxdepth 1 -type d -mtime +2 -name 'tmp.*' -o -name 'r-b-build.*' -exec rm -rv --one-file-system {} \; || true
-	echo "These old directories have been deleted."
-	echo
-	DIRTY=true
-fi
+for PATTERN in 'tmp.*' 'r-b-build.*' ; do
+	echo "$(date -u) - Deleting temp directories with pattern \"$PATTERN\" in $REP_RESULTS/rbuild-debian, older than 3 days."
+	OLDSTUFF=$(find $REP_RESULTS/rbuild-debian -maxdepth 1 -type d -mtime +2 -name "$PATTERN" -exec ls -lad {} \; 2>/dev/null|| true)
+	if [ ! -z "$OLDSTUFF" ] ; then
+		echo
+		echo "Old temp directories with pattern \"$PATTERN\" found in $REP_RESULTS/rbuild-debian"
+		find $REP_RESULTS/rbuild-debian -maxdepth 1 -type d -mtime +2 -name "$PATTERN" -exec rm -rv --one-file-system {} \; || true
+		echo "These old directories have been deleted."
+		echo
+		DIRTY=true
+	fi
+done
 
 #
 # delete old temp directories in /tmp (probably only useful on osuosl171+172 & 167[for janitor])



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/8e28dee9b24cbcf79230938131ca60d52ff75d2d

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/8e28dee9b24cbcf79230938131ca60d52ff75d2d
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20230224/1952a7a0/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list