1 |
On 28/10/2015 00:51, Frank Steinmetzger wrote: |
2 |
> Hi guys’n’gals |
3 |
> |
4 |
> Before the introduction of repos.conf, we used several variables in |
5 |
> make.conf to tell portage where to find stuff, such as GENTOO_MIRRORS and |
6 |
> SYNC. My make.conf used to first define sensible defaults for those and then |
7 |
> has the line: |
8 |
> |
9 |
> source homenet.conf |
10 |
> |
11 |
> This file modifies those portage settings to reroute operations to within my |
12 |
> own network. Oftentimes either my PC or laptop is (far) ahead of the other |
13 |
> (tree sync, distfiles download). So to make them serve each other, which |
14 |
> reduces load on public servers and vastly speeds up distfiles download, this |
15 |
> homenet.conf file |
16 |
> - prepends a gentoo mirror |
17 |
> - sets the portage rsync server |
18 |
> - enables distcc on the laptop |
19 |
> |
20 |
> So with a single (un)commenting of the source command, I could switch |
21 |
> between “normal” mode and “homenet” mode. |
22 |
> |
23 |
> Since repos.conf came about, this doesn’t work anymore (the sync part, |
24 |
> anyway, for now). So nowadays, when I want to switch mode, I need to change |
25 |
> the source line and also need to change the sync-uri in repos.conf’s default |
26 |
> repository. That’s too much work. :-D |
27 |
> |
28 |
> How would you advise to achieve what I’m after? |
29 |
> Thanks-a-doodle and good night. |
30 |
> |
31 |
|
32 |
|
33 |
There is one obvious method but portage doesn't seem to support it: |
34 |
|
35 |
make homenet the highest priority repo in repos.conf and enable/disable |
36 |
it as appropriate. A setting "enabled=true" in the file, or a |
37 |
--enable-repos option to emerge would work nicely, but those do not |
38 |
exist. Sounds like something a feature request might get action on :-) |
39 |
|
40 |
Meanwhile, you can "simulate" it: |
41 |
|
42 |
Put homenet.conf somewhere outside /etc/portage, and add or delete a |
43 |
symlink for it while needed. If the master file is in /path/to/homenet |
44 |
and you are at home: |
45 |
|
46 |
ln -sfn /path/to/homenet/homenet.conf /etc/portage/repos.conf/ |
47 |
emerge ... |
48 |
|
49 |
Disclainmer: completely untested, I only describe a bizarre idea that |
50 |
popped into mind |
51 |
|
52 |
-- |
53 |
Alan McKinnon |
54 |
alan.mckinnon@×××××.com |