diff --git a/xbps-src/shutils/chroot.sh.in b/xbps-src/shutils/chroot.sh.in index 303beffd582..3ad1ba352ab 100644 --- a/xbps-src/shutils/chroot.sh.in +++ b/xbps-src/shutils/chroot.sh.in @@ -90,9 +90,11 @@ if [ -n "$XBPS_COMPRESS_LEVEL" ]; then fi echo "# End of configuration file." >> $XBPSSRC_CF -msg_normal "Cleaning up /tmp...\n" if [ -d $XBPS_MASTERDIR/tmp ]; then - rm -rf $XBPS_MASTERDIR/tmp/* + if [ ! -f $XBPS_MASTERDIR/.xbps_mount_bind_done ]; then + msg_normal "Cleaning up /tmp...\n" + rm -rf $XBPS_MASTERDIR/tmp/* + fi fi prepare_chroot()