diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh index 3fc144db2d0..c4297bcfa85 100644 --- a/common/xbps-src/shutils/chroot.sh +++ b/common/xbps-src/shutils/chroot.sh @@ -127,7 +127,7 @@ chroot_prepare() { cp -f $XBPS_SRCPKGDIR/base-files/files/hosts $XBPS_MASTERDIR/etc mkdir -p $XBPS_MASTERDIR/etc/xbps.d - echo "syslog=false" >> $XBPS_MASTERDIR/etc/xbps.d/xbps.conf + echo "syslog=false" >> $XBPS_MASTERDIR/etc/xbps.d/00-xbps-src.conf # Prepare default locale: en_US.UTF-8. if [ -s ${XBPS_MASTERDIR}/etc/default/libc-locales ]; then @@ -153,7 +153,7 @@ chroot_handler() { fi case "$action" in - fetch|extract|patch|configure|build|check|install|pkg|bootstrap-update|chroot) + fetch|extract|patch|configure|build|check|install|pkg|bootstrap-update|chroot|clean) chroot_prepare || return $? chroot_init || return $? ;; @@ -191,7 +191,13 @@ chroot_sync_repodata() { crossconfdir=$XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d [ -d $confdir ] && rm -rf $confdir + [ -d $crossconfdir ] && rm -rf $crossconfdir + if [ -d $XBPS_DISTDIR/etc/xbps.d/custom ]; then + mkdir -p $confdir $crossconfdir + cp -f $XBPS_DISTDIR/etc/xbps.d/custom/*.conf $confdir + cp -f $XBPS_DISTDIR/etc/xbps.d/custom/*.conf $crossconfdir + fi if [ "$CHROOT_READY" ]; then hostdir=/host else @@ -296,7 +302,7 @@ chroot_sync_repodata() { # Make sure to sync index for remote repositories. msg_normal "xbps-src: updating repositories for host ($XBPS_MACHINE)...\n" - xbps-install -r $XBPS_MASTERDIR -S + $XBPS_INSTALL_CMD $XBPS_INSTALL_ARGS -S if [ -n "$XBPS_CROSS_BUILD" ]; then # Copy host keys to the target rootdir. @@ -306,7 +312,7 @@ chroot_sync_repodata() { # Make sure to sync index for remote repositories. msg_normal "xbps-src: updating repositories for target ($XBPS_TARGET_MACHINE)...\n" env -- XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE \ - xbps-install -r $XBPS_MASTERDIR/$XBPS_CROSS_BASE -S + $XBPS_INSTALL_CMD $XBPS_INSTALL_ARGS -r $XBPS_MASTERDIR/$XBPS_CROSS_BASE -S fi return 0