etc/conf: implement XBPS_MIRROR for remote repos

Setting this variable will make xbps-src use an alternative mirror for
remote repositories.

Using this variable one can change the remote repository for all
architectures in a single setting and without the need to modify
`etc/xbps.d/repos-remote*.conf`. This is much more convenient as it
allows changing remote repos without a dirty worktree.

To use just add a line like the following to `etc/conf`:

    XBPS_MIRROR=https://repo-us.voidlinux.org/current

We also disable 00-repository-main.conf for cross so we don't use the
remote repo from the xbps package.
This commit is contained in:
Gonzalo Tornaría
2021-12-05 20:14:14 -03:00
committed by Piotr
parent 65cff7c577
commit 7231f47b26
2 changed files with 26 additions and 12 deletions

View File

@@ -14,13 +14,18 @@
# rely on this to work properly.
#
# [OPTIONAL]
# Use an alternative mirror for remote repositories. This is more
# convenient than modifying etc/xbps.d/repos-remote*.conf.
#
#XBPS_MIRROR=https://repo-us.voidlinux.org/current
# [OPTIONAL]
# Enable optional arguments to xbps-install(1) for the host system.
# Currently used in the 'binary-bootstrap' and 'bootstrap-update' targets.
#
# NOTE: local repositories are handled automatically by xbps-src,
# but you can modify the default remote repositories at
# 'etc/xbps.d/repos-remote*.conf'
# and remote repositories can be changed by setting XBPS_MIRROR
#
#XBPS_INSTALL_ARGS=""