diff --git a/xbps-src b/xbps-src index ad96b932e8..4cedbeae0c 100755 --- a/xbps-src +++ b/xbps-src @@ -557,7 +557,12 @@ case "$XBPS_TARGET" in ;; clean) if [ -z "$XBPS_TARGET_PKG" ]; then - chroot_handler remove-autodeps + if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then + chroot_handler remove-autodeps + else + pkgver=xbps-src + remove_pkg_autodeps + fi msg_normal "xbps-src: cleaning up masterdir...\n" rm -rf $XBPS_MASTERDIR/builddir/* $XBPS_MASTERDIR/destdir/* else @@ -580,7 +585,7 @@ case "$XBPS_TARGET" in remove_pkg_autodeps fi ;; - fetch|extract|build|configure|install|install-destdir|pkg|build-pkg) + fetch|extract|build|configure|install|pkg) BEGIN_INSTALL=1 read_pkg if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then