diff --git a/common/xbps-src/shutils/pkgtarget.sh b/common/xbps-src/shutils/pkgtarget.sh index 86a5a424c70..620507f3dcf 100644 --- a/common/xbps-src/shutils/pkgtarget.sh +++ b/common/xbps-src/shutils/pkgtarget.sh @@ -27,6 +27,8 @@ check_pkg_arch() { remove_pkg_autodeps() { local rval= tmplogf= + [ -n "$XBPS_KEEP_ALL" ] && return 0 + cd $XBPS_MASTERDIR || return 1 msg_normal "${pkgver:-xbps-src}: removing autodeps, please wait...\n" tmplogf=$(mktemp) diff --git a/xbps-src b/xbps-src index 8c9ba2137bc..6e07411fd0e 100755 --- a/xbps-src +++ b/xbps-src @@ -616,6 +616,7 @@ case "$XBPS_TARGET" in if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then chroot_handler $XBPS_TARGET $XBPS_TARGET_PKG else + [ -z "$XBPS_TEMP_MASTERDIR" ] && remove_pkg_autodeps $XBPS_LIBEXECDIR/build.sh $XBPS_TARGET_PKG $XBPS_TARGET_PKG \ $XBPS_TARGET $XBPS_CROSS_BUILD || exit 1 fi