From 11116016721050b666e017240e62fdf808326ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Wed, 8 Jan 2020 16:51:57 +0100 Subject: [PATCH] common.sh: if $XBPS_SKIP_REMOTEREPOS rm *remote* There may be /etc/xbps.d/*remote* config files dangling from a previous run w/o XBPS_SKIP_REMOTEREPOS being set. Make sure to remove them in case $XBPS_SKIP_REMOTEREPOS is set for this run. --- common/xbps-src/shutils/chroot.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh index be366345bc7..3fc144db2d0 100644 --- a/common/xbps-src/shutils/chroot.sh +++ b/common/xbps-src/shutils/chroot.sh @@ -224,6 +224,7 @@ chroot_sync_repodata() { > $confdir/10-repository-local.conf if [ "$XBPS_SKIP_REMOTEREPOS" ]; then + rm -f $confdir/*remote* case "$XBPS_MACHINE" in x86_64) # x86_64/glibc @@ -265,7 +266,9 @@ chroot_sync_repodata() { # copy xbps.d files from host for local repos cp ${XBPS_MASTERDIR}/etc/xbps.d/*local*.conf \ $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d - if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then + if [ "$XBPS_SKIP_REMOTEREPOS" ]; then + rm -f $crossconfdir/*remote* + else # and then remote repos for target machine case "$XBPS_TARGET_MACHINE" in aarch64*)