On 28/10/2015 00:51, Frank Steinmetzger wrote: > Hi guys’n’gals > > Before the introduction of repos.conf, we used several variables in > make.conf to tell portage where to find stuff, such as GENTOO_MIRRORS and > SYNC. My make.conf used to first define sensible defaults for those and then > has the line: > > source homenet.conf > > This file modifies those portage settings to reroute operations to within my > own network. Oftentimes either my PC or laptop is (far) ahead of the other > (tree sync, distfiles download). So to make them serve each other, which > reduces load on public servers and vastly speeds up distfiles download, this > homenet.conf file > - prepends a gentoo mirror > - sets the portage rsync server > - enables distcc on the laptop > > So with a single (un)commenting of the source command, I could switch > between “normal” mode and “homenet” mode. > > Since repos.conf came about, this doesn’t work anymore (the sync part, > anyway, for now). So nowadays, when I want to switch mode, I need to change > the source line and also need to change the sync-uri in repos.conf’s default > repository. That’s too much work. :-D > > How would you advise to achieve what I’m after? > Thanks-a-doodle and good night. >
There is one obvious method but portage doesn't seem to support it: make homenet the highest priority repo in repos.conf and enable/disable it as appropriate. A setting "enabled=true" in the file, or a --enable-repos option to emerge would work nicely, but those do not exist. Sounds like something a feature request might get action on :-) Meanwhile, you can "simulate" it: Put homenet.conf somewhere outside /etc/portage, and add or delete a symlink for it while needed. If the master file is in /path/to/homenet and you are at home: ln -sfn /path/to/homenet/homenet.conf /etc/portage/repos.conf/ emerge ... Disclainmer: completely untested, I only describe a bizarre idea that popped into mind -- Alan McKinnon [email protected]

