I would like to use two sync sources in make.conf like this:
Code: Select all
SYNC="rsync://MYLOCASERVER/gentoo-portage rsync://PUBLICSERVER/gentoo-portage/" Why there is no support for redundant SYNC mirrors?
Regards,
Kfir

Code: Select all
SYNC="rsync://MYLOCASERVER/gentoo-portage rsync://PUBLICSERVER/gentoo-portage/" 
Code: Select all
#!/bin/bash
if ! SYNC="rsync://local_server_uri_or_ip" emerge --sync ; then
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" emerge --sync
fi
Ok thanks,John R. Graham wrote:It's true that Portage doesn't support fallback sync servers. I don't know why. However, if you're not averse to a little scripting, this is trivial to correct:- JohnCode: Select all
#!/bin/bash if ! SYNC="rsync://local_server_uri_or_ip" emerge --sync ; then SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" emerge --sync fi
Code: Select all
SYNC_SERVERS="rsync://HOME/gentoo-portage rsync://FIRST_INTERNET_SERVER/gentoo-portage/ rsync://SECOND_INTERNET_SERVER/gentoo-portage/"
for server in $SYNC_SERVERS
do
SYNC="$server" eix-sync -q && break
done


My solution is this - My home router is also an rsync server, and I use dnsmasq as my DNS forwarding to local clients.Timmer wrote:Is there a bug for this yet to vote for?
I have my desktop set up as a private rsync for my laptop, but then if I'm not home (on vacation, for example), i can't sync to my home server. It's got a different address in the outside world. This would be a useful feature.
Code: Select all
address=/rsync.gentoo.org/192.168.9.1
This solution is really neat, no rsync errors, no actual fall-back.someone19 wrote:
My solution is this - My home router is also an rsync server, and I use dnsmasq as my DNS forwarding to local clients.
The laptop make.conf is set to rsync.us.gentoo.org, and dnsmasq.conf has
When I'm home all the gentoo machines hit the local mirror for the tree, when I'm remote it hits the normal round-robbin list of servers.Code: Select all
address=/rsync.gentoo.org/192.168.9.1
Similar can be done with a re-direct depending on your home network setup.
Code: Select all
address=/us.gentoo.org/192.168.9.1Code: Select all
address=/rsync.us.gentoo.org/192.168.9.1