From 87d91f05941cc4bee2c73ad82b2ac9ae7c65d085 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 9 Mar 2015 09:52:35 +0100 Subject: [PATCH] xbps-src: fix previous. --- common/xbps-src/shutils/chroot.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh index 367836efa8f..89b47122e4a 100644 --- a/common/xbps-src/shutils/chroot.sh +++ b/common/xbps-src/shutils/chroot.sh @@ -143,15 +143,17 @@ chroot_sync_repos() { rm -f $XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/etc/xbps.d/*-x86_64.conf fi - # Make sure to sync index for remote repositories. - if command -v xbps-uunshare &>/dev/null; then - xbps-uunshare $XBPS_MASTERDIR /usr/sbin/xbps-install -S - if [ $? -eq 99 ]; then - # userns not supported, fallback to uchroot + if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then + # Make sure to sync index for remote repositories. + if command -v xbps-uunshare &>/dev/null; then + xbps-uunshare $XBPS_MASTERDIR /usr/sbin/xbps-install -S + if [ $? -eq 99 ]; then + # userns not supported, fallback to uchroot + xbps-uchroot $XBPS_MASTERDIR /usr/sbin/xbps-install -S + fi + else xbps-uchroot $XBPS_MASTERDIR /usr/sbin/xbps-install -S fi - else - xbps-uchroot $XBPS_MASTERDIR /usr/sbin/xbps-install -S fi if [ -n "$XBPS_CROSS_BUILD" ]; then @@ -198,9 +200,7 @@ chroot_handler() { fetch|extract|build|configure|install|install-destdir|pkg|build-pkg|bootstrap-update|chroot) chroot_prepare || return $? chroot_init || return $? - if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then - chroot_sync_repos || return $? - fi + chroot_sync_repos || return $? ;; esac