xbps-src: do not sync xbps repos in chroot mode.

If XBPS_CHROOT_CMD == uchroot with overlayfs (-O), the temporary masterdir
will be removed completely after synchronizing remote repositories, and
later on, when the build starts the repos are unsynchronized.

So do the sync on the real masterdir before entering the chroot.
This commit is contained in:
Juan RP 2015-07-12 08:24:04 +02:00
parent 1bc02c0e17
commit 55863abdd2
1 changed files with 2 additions and 6 deletions

View File

@ -145,9 +145,7 @@ chroot_sync_repos() {
if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
# Make sure to sync index for remote repositories.
$XBPS_COMMONDIR/chroot-style/${XBPS_CHROOT_CMD:=uunshare}.sh \
$XBPS_MASTERDIR $XBPS_DISTDIR "$XBPS_HOSTDIR" \
"$XBPS_CHROOT_CMD_ARGS" xbps-install -S
xbps-install -r $XBPS_MASTERDIR -S
fi
if [ -n "$XBPS_CROSS_BUILD" ]; then
@ -158,9 +156,7 @@ chroot_sync_repos() {
# Make sure to sync index for remote repositories.
if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
env XBPS_TARGET_ARCH=$XBPS_TARGET_ARCH \
$XBPS_COMMONDIR/chroot-style/${XBPS_CHROOT_CMD:=uunshare}.sh \
$XBPS_MASTERDIR $XBPS_DISTDIR "$XBPS_HOSTDIR" "$XBPS_CHROOT_CMD_ARGS" \
xbps-install -r $XBPS_CROSS_BASE -S
xbps-install -r $XBPS_MASTERDIR/$XBPS_CROSS_BASE -S
fi
fi