Quick n dirty solution:

put all distfiles on a central server
FS mount that remote dir to /var/cache/distfiles on all hosts

Alan

On Mon, Sep 4, 2023 at 7:21 PM Neil Bothwick <neil@digimed.co.uk> wrote:
On Mon, 04 Sep 2023 14:04:53 +0100, Michael wrote:

> 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?

The reference to a host makes me think Walter wants one machne to hold
the distfiles for all on the network.

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

I use apt-cacher-ng for this and it does what you are looking for.


--
Neil Bothwick

The facts, although interesting, are usually irrelevant.


--
Alan McKinnon
alan dot mckinnon at gmail dot com