Gentoo Archives: gentoo-user

From: Davyd McColl <davydm@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Emerge --sync source
Date: Thu, 28 Feb 2019 08:43:39
Message-Id: 0e3bf1fa-260f-48d2-ba17-800ba466b94a@getmailbird.com
In Reply to: [gentoo-user] Emerge --sync source by Peter Humphrey
On 2019/02/28 10:36:35, Peter Humphrey <peter@××××××××××××.uk> wrote:
Hello list,

I have a little server box on my LAN, which I use as a git server. I'm having
a bit of trouble with it pro tem so I decided to switch the git sync source on
this box.

I removed the entry pointing to the local server in repos.conf/gentoo.conf and
put in 'sync-uri = https://github.com/gentoo-mirror/gentoo.git'

Emerge --sync still insisted on going to the local server, which was not there
so it stopped.

I had to remove /usr/portage/.git before the repos.conf/gentoo.conf entry was
respected. And that meant stripping out the whole of /usr/portage and fetching
the whole lot again.
Well, that's pretty-much how git works -- that local repo was still pointing to the old remote. Updating your repos.conf won't change that as the old remote is stored in config in the .git folder. However, if you need to to this again, you could:
1) change repos.conf (in case you ever wipe out /usr/portage again -- the url there is only used for initial clone)
1) in /usr/portage, run `git remote set-url origin <new-url>` -- this informs git of the change, and your next fetch should work as expected.

I guess emerge could check this and set it for the user, but currently, it apparently doesn't.


Is this expected behaviour?

--
Regards,
Peter.

Replies

Subject Author
Re: [gentoo-user] Emerge --sync source Nils Freydank <nils.freydank@××××××.de>
Re: [gentoo-user] Emerge --sync source Peter Humphrey <peter@××××××××××××.uk>