reynhout / chrx

Chromebook Unix
419 stars 56 forks source link

Mirror option is confusing, it only works for Gallium, for Ubuntu even valid mirrors revert to "primary" #121

Open espoelstra opened 3 years ago

espoelstra commented 3 years ago

I was actually hoping to use the -m switch to point to a local apt-cacher-ng instance to make reinstallations quicker. When testing my freshly set up apt-cacher-ng Docker container I tried supplying its IP as a mirror only to discover it was ignored.

Since it is possible that users might supply invalid hostnames, my thought would be to try to use curl or wget to try and HEAD the Releases/Packages file for the -d distribution and -r release the user requested, and then write the mirror information to /etc/apt/apt.conf.d/proxy or tweak the /etc/apt/sources.list file or move it to a backup location and put the mirror information into a sources.list.d/mirror.list file for apt to use for the duration of the installation.