diff --git a/xbps-src/shutils/chroot.sh.in b/xbps-src/shutils/chroot.sh.in index 6e78def8d0..99fc82e117 100644 --- a/xbps-src/shutils/chroot.sh.in +++ b/xbps-src/shutils/chroot.sh.in @@ -314,7 +314,7 @@ xbps_chroot_handler() env IN_CHROOT=1 LANG=C \ ${chroot_cmd} $XBPS_MASTERDIR /bin/sh || rv=$? else - [ -n "$KEEP_WRKSRC" ] && arg="-C" + [ -n "$KEEP_WRKSRC" ] && arg="$arg -C" [ -n "$KEEP_AUTODEPS" ] && arg="$arg -K" [ -n "$DESTDIR_ONLY_INSTALL" ] && arg="$arg -D" diff --git a/xbps-src/shutils/common_funcs.sh b/xbps-src/shutils/common_funcs.sh index 3b6d40a2f4..d96c72cb67 100644 --- a/xbps-src/shutils/common_funcs.sh +++ b/xbps-src/shutils/common_funcs.sh @@ -30,7 +30,7 @@ run_func_error() { local lver func="$1" - remove_pkgdestdir_sighandler ${pkgname} + remove_pkgdestdir_sighandler ${pkgname} $KEEP_AUTODEPS if [ -n "${revision}" ]; then lver="${version}_${revision}" diff --git a/xbps-src/shutils/pkgtarget_funcs.sh.in b/xbps-src/shutils/pkgtarget_funcs.sh.in index ec86b2a471..0909c536fb 100644 --- a/xbps-src/shutils/pkgtarget_funcs.sh.in +++ b/xbps-src/shutils/pkgtarget_funcs.sh.in @@ -30,15 +30,6 @@ install_pkg() { local curpkgn="$1" fullpkg pkg cdestdir - # - # If we are being invoked through the chroot, re-read config file - # to get correct stuff. - # - if [ -n "$IN_CHROOT" ]; then - check_config_vars - set_defvars - fi - # Remove automatic package dependencies if set. autoremove_pkg_dependencies $KEEP_AUTODEPS