summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-05-22 11:36:16 +0200
committerHolger Levsen <holger@layer-acht.org>2015-05-22 11:36:16 +0200
commit02e17c1bc393c20276875eefe027f1d31a6877e5 (patch)
tree2c1c8a8f549f6ddd0e1e146827661389ae5fabec /bin
parentac39c08b0ea56d5d820890506ff3658fead3a743 (diff)
downloadjenkins.debian.net-02e17c1bc393c20276875eefe027f1d31a6877e5.tar.xz
reproducible: remove lockfiles older than 2 days
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_maintenance.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 34aca03a..5a2a5ec3 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -153,6 +153,15 @@ if grep -q '|' $PACKAGES ; then
fi
rm $PACKAGES
+# remove lockfiles older than 2 days
+LOCKFILES=$(find /tmp/reproducible-lockfile-* -maxdepth 1 -type f -mtime +2 -exec ls -lad {} \; || true)
+if [ ! -z "$LOCKFILES" ] ; then
+ echo
+ echo "Removed old lockfiles:"
+ find /tmp/reproducible-lockfile-* -maxdepth 1 -type f -mtime +2 -exec rm -rv {} \;
+ echo
+fi
+
# find packages which have been removed from the archive
PACKAGES=$(mktemp)
QUERY="SELECT name, suite, architecture FROM removed_packages