From 8ab6edc842b58f0d5ecc5a9d31ea6f653c053d97 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 13 Apr 2020 01:59:03 +0200 Subject: [PATCH] xbps-src/chroot.sh: copy xbps repo keys even with -N. To make @pullmoll happy --- common/xbps-src/shutils/chroot.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh index a82aaea8ac5..1298952fd40 100644 --- a/common/xbps-src/shutils/chroot.sh +++ b/common/xbps-src/shutils/chroot.sh @@ -285,15 +285,16 @@ chroot_sync_repodata() { fi fi - [ "$XBPS_SKIP_REMOTEREPOS" ] && return 0 # Copy xbps repository keys to the masterdir. mkdir -p $XBPS_MASTERDIR/var/db/xbps/keys cp -f $XBPS_COMMONDIR/repo-keys/*.plist $XBPS_MASTERDIR/var/db/xbps/keys # Make sure to sync index for remote repositories. - msg_normal "xbps-src: updating repositories for host ($XBPS_MACHINE)...\n" - $XBPS_INSTALL_CMD $XBPS_INSTALL_ARGS -S + if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then + msg_normal "xbps-src: updating repositories for host ($XBPS_MACHINE)...\n" + $XBPS_INSTALL_CMD $XBPS_INSTALL_ARGS -S + fi if [ -n "$XBPS_CROSS_BUILD" ]; then # Copy host keys to the target rootdir. @@ -301,9 +302,11 @@ chroot_sync_repodata() { cp $XBPS_MASTERDIR/var/db/xbps/keys/*.plist \ $XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys # 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_CMD $XBPS_INSTALL_ARGS -r $XBPS_MASTERDIR/$XBPS_CROSS_BASE -S + if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then + msg_normal "xbps-src: updating repositories for target ($XBPS_TARGET_MACHINE)...\n" + env -- XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE \ + $XBPS_INSTALL_CMD $XBPS_INSTALL_ARGS -r $XBPS_MASTERDIR/$XBPS_CROSS_BASE -S + fi fi return 0