public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-portage-dev] Re: How to have several gentoo repos on one machine?
  @ 2015-10-22  2:29 99% ` Duncan
  0 siblings, 0 replies; 1+ results
From: Duncan @ 2015-10-22  2:29 UTC (permalink / raw
  To: gentoo-portage-dev

Joakim Tjernlund posted on Wed, 21 Oct 2015 11:08:02 +0000 as excerpted:

> I need to more than one gentoo repo in my computer.
> 
> So I add to repos.conf:
>  [tm-cusfpv3]
>  auto-sync = yes
>  sync-type = rsync
>  sync-uri = rsync://devsrv.transmode.se/tm-cusfpv3
>  location = /usr/local/portage/tm-cusfpv3
> 
> this did not work as "portageq repositories_configuration /" complains:
> !!! Section 'tm-cusfpv3' in repos.conf has name different from
> repository name 'gentoo' set inside repository
> 
> I figured the name in repos.conf would just override
> /usr/local/portage/tm-cusfpv3/profiles/repo_name ?

While it's not quite clear to me either why you'd need two identical 
gentoo repos (and if they're not identical, why is the non-gentoo-
official mirror still using the gentoo name?) or exactly what this config-
line does, the aliases= attribute, along with force=aliases, in 
repos.conf, may be what you're looking for.

See the portage (5) manpage, repos.conf section, attributes supported in 
sections of repositories subsection, under aliases and force.  
Unfortunately, the description for aliases is anything but clear, tho the 
usage (including comment) further down in the example subsection does 
help some.

If that doesn't help, then while the portage devs may have some other 
suggestions, the workaround that occurs to me is to use rsync's exclude/
filter options, so rsync ignores that file and doesn't sync it.  I do[1] 
that with a few custom files/dirs that I don't want synced, and rsync 
ignores them just as I told it to. =:^)

See the rsync (1) manpage, --exclude, --exclude-from, --include, --
include-from and --filter=RULE options, as well as the filter rules, 
include/exclude pattern rules, and anchoring include/exclude patterns 
sections.  However, be prepared to spend a bit of time studying, as these 
options are very powerful/flexible/configurable and thus take some time 
to figure out.

Once you have rsync ignoring the repo_name file, you can rename it as you 
like.

However, do be aware that (as the repos.conf force option docs mention) 
messing with this is very likely to invalidate the pre-generated metadata 
cache, and if you don't regenerate it (egencache), portage will take a 
*VERY* long time figuring stuff out, *MUCH* longer than usual, as it 
won't have the benefit of the metadata cache for that repo.

Which again has me asking why you need two separate gentoo repos.  Either 
they're identical and the one should suffice, or the unofficial one 
should be named something other than gentoo.  In fact, at least in 
theory, in addition to all the headaches not using a different name is 
forcing on users, that's potentially trademark violation if it's publicly 
available, different from the official gentoo mirror, and yet still 
calling itself gentoo.

---
[1] rsync exclude options: I actually use gentoo's git-based usersync repo 
on github, now, and thus don't rsync any repos all any more, here, and 
git of course has its git-ignore feature/files, which I use now.  But I 
used rsync's exclude as suggested above, for years.  Worked fine. =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman



^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-10-21 11:08     [gentoo-portage-dev] How to have several gentoo repos on one machine? Joakim Tjernlund
2015-10-22  2:29 99% ` [gentoo-portage-dev] " Duncan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox