Commit 99ca0c3d authored by Holger Levsen's avatar Holger Levsen
Browse files

properly delete old schroot overlays



Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent 657a2198
...@@ -410,10 +410,10 @@ if [ "$HOSTNAME" = "$MAINNODE" ] ; then ...@@ -410,10 +410,10 @@ if [ "$HOSTNAME" = "$MAINNODE" ] ; then
dir=/var/lib/schroot/$path/ dir=/var/lib/schroot/$path/
if [ "$path" = "session" ] ; then if [ "$path" = "session" ] ; then
FILETYPE=f FILETYPE=f
RM=rm RM_OPTIONS="-v"
else else
FILETYPE=d FILETYPE=d
RM=rmdir RM_OPTIONS="-rv --one-file-system"
fi fi
OLDSTUFF=$(find "$dir" -name "jenkins-reproducible-*-diffoscope-*" -mindepth 1 -maxdepth 1 -type $FILETYPE -mtime +1 -exec ls -lad {} \; || true) OLDSTUFF=$(find "$dir" -name "jenkins-reproducible-*-diffoscope-*" -mindepth 1 -maxdepth 1 -type $FILETYPE -mtime +1 -exec ls -lad {} \; || true)
if [ ! -z "$OLDSTUFF" ]; then if [ ! -z "$OLDSTUFF" ]; then
...@@ -422,7 +422,7 @@ if [ "$HOSTNAME" = "$MAINNODE" ] ; then ...@@ -422,7 +422,7 @@ if [ "$HOSTNAME" = "$MAINNODE" ] ; then
echo "$OLDSTUFF" | sed "s#$dir#./#g" echo "$OLDSTUFF" | sed "s#$dir#./#g"
echo echo
find "$dir" -name "jenkins-reproducible-*-diffoscope-*" -mindepth 1 -maxdepth 1 -type $FILETYPE -mtime +1 -exec sudo $RM -v {} \; || true find "$dir" -name "jenkins-reproducible-*-diffoscope-*" -mindepth 1 -maxdepth 1 -type $FILETYPE -mtime +1 -exec sudo rm $RM_OPTIONS {} \; || true
OLDSTUFF=$(find "$dir" -name "jenkins-reproducible-*-diffoscope-*" -mindepth 1 -maxdepth 1 -type $FILETYPE -mtime +1 -exec ls -lad {} \; || true) OLDSTUFF=$(find "$dir" -name "jenkins-reproducible-*-diffoscope-*" -mindepth 1 -maxdepth 1 -type $FILETYPE -mtime +1 -exec ls -lad {} \; || true)
if [ ! -z "$OLDSTUFF" ]; then if [ ! -z "$OLDSTUFF" ]; then
echo echo
......
...@@ -23,8 +23,8 @@ jenkins ALL= \ ...@@ -23,8 +23,8 @@ jenkins ALL= \
/bin/rm -rf --one-file-system /var/lib/sbuild/build/*, \ /bin/rm -rf --one-file-system /var/lib/sbuild/build/*, \
/bin/rm -rf --one-file-system /tmp/*, \ /bin/rm -rf --one-file-system /tmp/*, \
/bin/rm -rv --one-file-system /tmp/*, \ /bin/rm -rv --one-file-system /tmp/*, \
/bin/rm -rv --one-file-system /var/lib/schroot/*, \
/bin/rm -v /var/lib/schroot/*, \ /bin/rm -v /var/lib/schroot/*, \
/bin/rmdir -v /var/lib/schroot/*, \
/bin/mv /chroots/* /schroots/*, \ /bin/mv /chroots/* /schroots/*, \
/bin/mv /schroots/* /schroots/*, \ /bin/mv /schroots/* /schroots/*, \
/bin/umount -l /chroots/*, \ /bin/umount -l /chroots/*, \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment