From 9bf179825f6e0826f3daaa68d6caed5b8c2ff57b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 2 Feb 2019 18:16:18 +0100 Subject: [PATCH] xbps-src: fix 'clean' and 'remove-autodeps' targets again. Broke them in f35aa4cc19 --- xbps-src | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/xbps-src b/xbps-src index a79de519a4..2b8e99e1ef 100755 --- a/xbps-src +++ b/xbps-src @@ -686,7 +686,11 @@ 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 + remove_pkg_autodeps + fi msg_normal "xbps-src: cleaning up masterdir...\n" chmod -R +wX $XBPS_MASTERDIR/builddir # Needed to remove Go Modules rm -rf $XBPS_MASTERDIR/builddir $XBPS_MASTERDIR/destdir @@ -709,7 +713,11 @@ case "$XBPS_TARGET" in consistency_check ;; remove-autodeps) - chroot_handler remove-autodeps + if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then + chroot_handler remove-autodeps + else + remove_pkg_autodeps + fi ;; fetch|extract|build|check|configure|install|pkg) if [ "$XBPS_TARGET" = "check" ]; then