On Monday, 4 September 2023 11:12:51 BST Walter Dnes wrote:
>   I may be misunderstanding, but it seems to me that local mirrors are
> all-or-nothing.  In the interests of saving bandwidth, I'd like to have
> a client first check the host's /var/cache/distfiles directory for a
> source tarball file.  If not found, then fail over to another mirror as
> per GENTOO_MIRRORS in /etc/portage/make.conf.  This would require emerge
> doing the lookup and potential failover for each file.  Is this possible?

Unless I misunderstand what you're asking, isn't this what takes place anyway?

Emerge will look at /var/cache/distfiles and if the source tarball is missing, 
will try to fetch it from the list of GENTOO_MIRRORS you have configured.  For 
example, if you have:

GENTOO_MIRRORS="http://192.168.2.35/my_gentoo_distfiles/ https://
www.mirrorservice.org/sites/distfiles.gentoo.org/"

any host configured as above will first look at its own /var/cache/distfiles, 
then at the first configured mirror which happens to be in the same LAN, then 
whatever other external mirrors you have added.  You could of course export 
your local mirror's LAN ${DISTDIR} via NFS for your hosts to use.

PS. Is http_replicator still available/maintained?  I see the wiki mentions 
apt-cacher-ng for local distfiles cache.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to