xbps-src: fix previous correctly for local mode too.

This commit is contained in:
Juan RP 2014-06-06 16:29:50 +02:00
parent f90fe6abb8
commit b308d7cfac
1 changed files with 8 additions and 4 deletions

View File

@ -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
}