public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: gentoo-portage-dev@lists.gentoo.org
Subject: [gentoo-portage-dev] Re: How to have several gentoo repos on one machine?
Date: Thu, 22 Oct 2015 02:29:17 +0000 (UTC)	[thread overview]
Message-ID: <pan$d3cee$d2c9ae95$916030c7$c19082ee@cox.net> (raw)
In-Reply-To: 1445425682.5222.12.camel@transmode.se

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



  reply	other threads:[~2015-10-22  2:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 11:08 [gentoo-portage-dev] How to have several gentoo repos on one machine? Joakim Tjernlund
2015-10-22  2:29 ` Duncan [this message]
2015-10-22  6:48   ` [gentoo-portage-dev] " Joakim Tjernlund
2015-10-22 11:26     ` Duncan
2015-10-22 11:59       ` Joakim Tjernlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='pan$d3cee$d2c9ae95$916030c7$c19082ee@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox