diff --git a/xbps-src b/xbps-src index cbe4c73b90d..e202e34b3d7 100755 --- a/xbps-src +++ b/xbps-src @@ -737,8 +737,9 @@ case "$XBPS_TARGET" in [ -d "$XBPS_BUILDDIR" ] && chmod -R +wX $XBPS_BUILDDIR rm -rf \ $XBPS_BUILDDIR \ - $XBPS_DESTDIR \ - $XBPS_MASTERDIR/tmp/* $XBPS_MASTERDIR/tmp/.* + $XBPS_DESTDIR + rm -rf $XBPS_MASTERDIR/tmp + mkdir -p $XBPS_MASTERDIR/tmp else read_pkg if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then