[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Debian live-build: use sudo for maintenance cleanup

Holger Levsen (@holger) gitlab at salsa.debian.org
Mon Jun 13 12:31:19 BST 2022



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


Commits:
f53a53bf by Holger Levsen at 2022-06-13T13:30:58+02:00
reproducible Debian live-build: use sudo for maintenance cleanup

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

- - - - -


1 changed file:

- bin/reproducible_maintenance.sh


Changes:

=====================================
bin/reproducible_maintenance.sh
=====================================
@@ -1,7 +1,7 @@
 #!/bin/bash
 # vim: set noexpandtab:
 
-# Copyright 2014-2021 Holger Levsen <holger at layer-acht.org>
+# Copyright 2014-2022 Holger Levsen <holger at layer-acht.org>
 #         © 2015-2021 Mattia Rizzolo <mattia at debian.org>
 # released under the GPLv2
 
@@ -125,9 +125,9 @@ echo "$(date -u) - Deleting temp result directories for live-build, older than 1
 OLDSTUFF=$(find $REP_RESULTS -maxdepth 1 -type d -mtime +0 -name "live-build-*" -exec ls -lad {} \; 2>/dev/null|| true)
 if [ ! -z "$OLDSTUFF" ] ; then
 	echo
-	echo "Old temp directories found in $REP_RESULTS"
-	find $REP_RESULTS -maxdepth 1 -type d -mtime +0 -name "live-build-*" -exec rm -rv --one-file-system {} \; || true
-	echo "These old directories have been deleted."
+	echo "Old temp directories for live-build found in $REP_RESULTS"
+	find $REP_RESULTS -maxdepth 1 -type d -mtime +0 -name "live-build-*" -exec sudo rm -rv --one-file-system {} \; || true
+	echo "These old temp directories for live-build have been deleted."
 	echo
 	DIRTY=true
 fi
@@ -135,9 +135,9 @@ echo "$(date -u) - Deleting temp workspace directories for live-build, older tha
 OLDSTUFF=$(find /srv/workspace/live-build -maxdepth 1 -type d -mtime +0 -name "*.*" -exec ls -lad {} \; 2>/dev/null|| true)
 if [ ! -z "$OLDSTUFF" ] ; then
 	echo
-	echo "Old temp directories found in /srv/workspace/live-build"
-	find /srv/workspace/live-build -maxdepth 1 -type d -mtime +0 -name "*.*" -exec rm -rfv --one-file-system {} \; || true
-	echo "These old directories have been deleted."
+	echo "Old temp workspace directories for live-build found in /srv/workspace/live-build"
+	find /srv/workspace/live-build -maxdepth 1 -type d -mtime +0 -name "*.*" -exec sudo rm -rfv --one-file-system {} \; || true
+	echo "These old temp workspace directories have been deleted."
 	echo
 	DIRTY=true
 fi



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

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/f53a53bf2b5948e646f488332dcab26af0d0b873
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/20220613/5c94d81d/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list