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.
This commit is contained in:
Jürgen Buchmüller 2020-01-08 16:51:57 +01:00
parent 788f50fe47
commit 1111601672

View file

@ -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*)