From b308d7cfac256a32b6e2f10910a9827e08ace774 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 6 Jun 2014 16:29:50 +0200 Subject: [PATCH] xbps-src: fix previous correctly for local mode too. --- common/xbps-src/shutils/chroot.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh index d80909659a9..f8bf0eb42ac 100644 --- a/common/xbps-src/shutils/chroot.sh +++ b/common/xbps-src/shutils/chroot.sh @@ -136,16 +136,20 @@ chroot_sync_repos() { fi cp -a $XBPS_MASTERDIR/var/db/xbps/keys/*.plist \ $XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/var/db/xbps/keys - rm -rf $XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/etc/xbps/repo.d - mkdir -p $XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/etc/xbps/repo.d - cp ${XBPS_MASTERDIR}/etc/xbps/repo.d/*.conf \ - $XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/etc/xbps/repo.d env XBPS_TARGET_ARCH=$XBPS_TARGET_ARCH \ $CHROOT_CMD $XBPS_MASTERDIR /usr/sbin/xbps-install \ -r /usr/$XBPS_CROSS_TRIPLET -S fi fi + # Copy host repos to the cross root. + if [ -n "$XBPS_CROSS_BUILD" ]; then + rm -rf $XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/etc/xbps/repo.d + mkdir -p $XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/etc/xbps/repo.d + cp ${XBPS_MASTERDIR}/etc/xbps/repo.d/*.conf \ + $XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/etc/xbps/repo.d + fi + return 0 }