"Validate mirrors" function does not respect the external sources argument
After updating my fork to the latest commit I had a build failure when using the "external-sources" argument. The validate mirrors function crashed out because I didn't specify a mirror.
I'm not sure I quite understand. That is currently expected, you always need to specify a mirror.
Or is the case you are looking at,
a) use --external-sources
b) already have all distfiles in distfiles/
c) don't specify a mirror
and that should be expected to work? That would make a bit of sense to me, maybe we can get that to work.
What you’ve said is exactly my use case. I have all my distfiles in a tarball on my NAS. My bash script just downloads the file and extract the tarball into the distfiles directory. Then it kicks off the build with the —external-sources argument. I set it up that way before the whole mirror thing came about as part of my UEFI work around but I also find it useful for automation. I think you could make the argument that “-external-sources” is "Download sources externally from live-bootstrap" per the help. Why should I need to specify a mirror if I’m handling it externally?
Okay, you make some good points.
The help message needs to be improved. It should probably read something more like "Download sources before running the bootstrap", or something like that. The meaning is supposed to be, externally to the live-bootstrap environment. I understand your interpretation "the distfiles already exist because I downloaded them beforehand", but that's not what it's supposed to mean.
I think what might be best here is to do the mirror option validation at download time rather than at the beginning of the script. I'll make a PR with my idea shortly.