kubler icon indicating copy to clipboard operation
kubler copied to clipboard

MIRROR fails with multiple elements

Open ctr49 opened this issue 2 years ago • 2 comments

kubler.conf describes MIRROR with

# Download location for stage3 and Portage files, use whitespace to set multiple servers
# You may visit https://www.gentoo.org/downloads/mirrors/ and pick a http or ftp url near your physical location
MIRROR='http://distfiles.gentoo.org/'

So multiple mirrors should be allowed.

However, the ARCH_URL construction in core.sh uses the entire string, failing if it contains multiple mirrors.

I think the solution is to treat MIRROR as a set and cast it into an array, using one (the first?) of the MIRROR elements for ARCH_URL (and any future usages of MIRROR).

Doing this, it would also be useful to force or strip a trailing slash in the mirror URL and build ARCH_URL accordingly (it currently breaks when there is no trailing slash).

ctr49 avatar Feb 13 '24 07:02 ctr49

Thanks for reporting! I added some extra handling that should resolve both issues.

edannenberg avatar Feb 13 '24 22:02 edannenberg