1 |
Joakim Tjernlund posted on Wed, 21 Oct 2015 11:08:02 +0000 as excerpted: |
2 |
|
3 |
> I need to more than one gentoo repo in my computer. |
4 |
> |
5 |
> So I add to repos.conf: |
6 |
> [tm-cusfpv3] |
7 |
> auto-sync = yes |
8 |
> sync-type = rsync |
9 |
> sync-uri = rsync://devsrv.transmode.se/tm-cusfpv3 |
10 |
> location = /usr/local/portage/tm-cusfpv3 |
11 |
> |
12 |
> this did not work as "portageq repositories_configuration /" complains: |
13 |
> !!! Section 'tm-cusfpv3' in repos.conf has name different from |
14 |
> repository name 'gentoo' set inside repository |
15 |
> |
16 |
> I figured the name in repos.conf would just override |
17 |
> /usr/local/portage/tm-cusfpv3/profiles/repo_name ? |
18 |
|
19 |
While it's not quite clear to me either why you'd need two identical |
20 |
gentoo repos (and if they're not identical, why is the non-gentoo- |
21 |
official mirror still using the gentoo name?) or exactly what this config- |
22 |
line does, the aliases= attribute, along with force=aliases, in |
23 |
repos.conf, may be what you're looking for. |
24 |
|
25 |
See the portage (5) manpage, repos.conf section, attributes supported in |
26 |
sections of repositories subsection, under aliases and force. |
27 |
Unfortunately, the description for aliases is anything but clear, tho the |
28 |
usage (including comment) further down in the example subsection does |
29 |
help some. |
30 |
|
31 |
If that doesn't help, then while the portage devs may have some other |
32 |
suggestions, the workaround that occurs to me is to use rsync's exclude/ |
33 |
filter options, so rsync ignores that file and doesn't sync it. I do[1] |
34 |
that with a few custom files/dirs that I don't want synced, and rsync |
35 |
ignores them just as I told it to. =:^) |
36 |
|
37 |
See the rsync (1) manpage, --exclude, --exclude-from, --include, -- |
38 |
include-from and --filter=RULE options, as well as the filter rules, |
39 |
include/exclude pattern rules, and anchoring include/exclude patterns |
40 |
sections. However, be prepared to spend a bit of time studying, as these |
41 |
options are very powerful/flexible/configurable and thus take some time |
42 |
to figure out. |
43 |
|
44 |
Once you have rsync ignoring the repo_name file, you can rename it as you |
45 |
like. |
46 |
|
47 |
However, do be aware that (as the repos.conf force option docs mention) |
48 |
messing with this is very likely to invalidate the pre-generated metadata |
49 |
cache, and if you don't regenerate it (egencache), portage will take a |
50 |
*VERY* long time figuring stuff out, *MUCH* longer than usual, as it |
51 |
won't have the benefit of the metadata cache for that repo. |
52 |
|
53 |
Which again has me asking why you need two separate gentoo repos. Either |
54 |
they're identical and the one should suffice, or the unofficial one |
55 |
should be named something other than gentoo. In fact, at least in |
56 |
theory, in addition to all the headaches not using a different name is |
57 |
forcing on users, that's potentially trademark violation if it's publicly |
58 |
available, different from the official gentoo mirror, and yet still |
59 |
calling itself gentoo. |
60 |
|
61 |
--- |
62 |
[1] rsync exclude options: I actually use gentoo's git-based usersync repo |
63 |
on github, now, and thus don't rsync any repos all any more, here, and |
64 |
git of course has its git-ignore feature/files, which I use now. But I |
65 |
used rsync's exclude as suggested above, for years. Worked fine. =:^) |
66 |
|
67 |
-- |
68 |
Duncan - List replies preferred. No HTML msgs. |
69 |
"Every nonfree program has a lord, a master -- |
70 |
and if you use the program, he is your master." Richard Stallman |