Two pkg(8) repo configs pointing to same repo

Matthew Seaman matthew at FreeBSD.org
Tue Mar 27 13:23:11 UTC 2018


On 27/03/2018 13:56, Anthony Jenkins via freebsd-ports wrote:
> Is there a way to configure a pkg(8) repo such that it has multiple ways
> to refer to the same physical repository?  I'm picturing the "url:"
> parameter being either a string or a list of strings:
> 

That isn't possible with pkg(8) at the moment.  However, you don't need 
to change pkg(8) to achieve the effect you want.  You can have multiple 
repo.conf files enabled at the same time, so long as you make sure the 
tag is different between the two files.  pkg(8) will complain about 
being unable to contact one or other of the two, but I believe it should 
be capable of using just the server it can contact.

Failing that, you will need to take control of the DNS inside your home 
network, so you can make your server name resolve to whatever is correct 
depending on where you are.  Possibly you could just create an A record 
that resolves to the two different IPs, but I'm not sure how well pkg(8) 
handles that if one of the IPs is unreachable.

	Cheers,

	Matthew



More information about the freebsd-ports mailing list