1 |
On Thu, 2015-10-22 at 02:29 +0000, Duncan wrote: |
2 |
> Joakim Tjernlund posted on Wed, 21 Oct 2015 11:08:02 +0000 as excerpted: |
3 |
> |
4 |
> > I need to more than one gentoo repo in my computer. |
5 |
> > |
6 |
> > So I add to repos.conf: |
7 |
> > [tm-cusfpv3] |
8 |
> > auto-sync = yes |
9 |
> > sync-type = rsync |
10 |
> > sync-uri = rsync://devsrv.transmode.se/tm-cusfpv3 |
11 |
> > location = /usr/local/portage/tm-cusfpv3 |
12 |
> > |
13 |
> > this did not work as "portageq repositories_configuration /" complains: |
14 |
> > !!! Section 'tm-cusfpv3' in repos.conf has name different from |
15 |
> > repository name 'gentoo' set inside repository |
16 |
> > |
17 |
> > I figured the name in repos.conf would just override |
18 |
> > /usr/local/portage/tm-cusfpv3/profiles/repo_name ? |
19 |
> |
20 |
> While it's not quite clear to me either why you'd need two identical |
21 |
> gentoo repos (and if they're not identical, why is the non-gentoo- |
22 |
> official mirror still using the gentoo name?) or exactly what this config- |
23 |
> line does, the aliases= attribute, along with force=aliases, in |
24 |
> repos.conf, may be what you're looking for. |
25 |
|
26 |
I use one for my host and the other for cross building our products root FS |
27 |
and they are not in sync. That rules out the aliases I guess? |
28 |
|
29 |
> |
30 |
> See the portage (5) manpage, repos.conf section, attributes supported in |
31 |
> sections of repositories subsection, under aliases and force. |
32 |
> Unfortunately, the description for aliases is anything but clear, tho the |
33 |
> usage (including comment) further down in the example subsection does |
34 |
> help some. |
35 |
> |
36 |
> If that doesn't help, then while the portage devs may have some other |
37 |
> suggestions, the workaround that occurs to me is to use rsync's exclude/ |
38 |
> filter options, so rsync ignores that file and doesn't sync it. I do[1] |
39 |
> that with a few custom files/dirs that I don't want synced, and rsync |
40 |
> ignores them just as I told it to. =:^) |
41 |
|
42 |
Right, I will test this but I consider it an workaround and it will only |
43 |
work with rsync. |
44 |
|
45 |
> |
46 |
> See the rsync (1) manpage, --exclude, --exclude-from, --include, -- |
47 |
> include-from and --filter=RULE options, as well as the filter rules, |
48 |
> include/exclude pattern rules, and anchoring include/exclude patterns |
49 |
> sections. However, be prepared to spend a bit of time studying, as these |
50 |
> options are very powerful/flexible/configurable and thus take some time |
51 |
> to figure out. |
52 |
> |
53 |
> Once you have rsync ignoring the repo_name file, you can rename it as you |
54 |
> like. |
55 |
|
56 |
I don't plan on renaming anything in the repo_name file, it should just |
57 |
be ignored and the name I have select in repos.conf should used. |
58 |
|
59 |
I don't see any value in repo_name file now that we have the new repos.conf, |
60 |
possibly it could be a fallback only for PORTDIR users. |
61 |
|
62 |
> |
63 |
> However, do be aware that (as the repos.conf force option docs mention) |
64 |
> messing with this is very likely to invalidate the pre-generated metadata |
65 |
> cache, and if you don't regenerate it (egencache), portage will take a |
66 |
> *VERY* long time figuring stuff out, *MUCH* longer than usual, as it |
67 |
> won't have the benefit of the metadata cache for that repo. |
68 |
|
69 |
OK, will have to look into that. Our main use will be binary pks only and |
70 |
even this is slow. emerge is usling a lot of time to figure out what to |
71 |
update even when using binary packets only(even when PKGDIR is empty or almost empty) |
72 |
|
73 |
> |
74 |
> Which again has me asking why you need two separate gentoo repos. Either |
75 |
> they're identical and the one should suffice, or the unofficial one |
76 |
> should be named something other than gentoo. In fact, at least in |
77 |
> theory, in addition to all the headaches not using a different name is |
78 |
> forcing on users, that's potentially trademark violation if it's publicly |
79 |
> available, different from the official gentoo mirror, and yet still |
80 |
> calling itself gentoo. |
81 |
> |
82 |
> --- |
83 |
> [1] rsync exclude options: I actually use gentoo's git-based usersync repo |
84 |
> on github, now, and thus don't rsync any repos all any more, here, and |
85 |
> git of course has its git-ignore feature/files, which I use now. But I |
86 |
> used rsync's exclude as suggested above, for years. Worked fine. =:^) |
87 |
|
88 |
Nice, I am heading the same was, using git all the way but I not there yet. |
89 |
One problem is that using git is disk space I think. Files are just |
90 |
ignored but still present in the repo so syncing to our embedded target |
91 |
will take a lot more space. |
92 |
Any thoughts on that? |
93 |
|
94 |
Jocke |