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
1 On 2019/02/28 10:36:35, Peter Humphrey <peter@××××××××××××.uk> wrote:
2 Hello list,
3
4 I have a little server box on my LAN, which I use as a git server. I'm having
5 a bit of trouble with it pro tem so I decided to switch the git sync source on
6 this box.
7
8 I removed the entry pointing to the local server in repos.conf/gentoo.conf and
9 put in 'sync-uri = https://github.com/gentoo-mirror/gentoo.git'
10
11 Emerge --sync still insisted on going to the local server, which was not there
12 so it stopped.
13
14 I had to remove /usr/portage/.git before the repos.conf/gentoo.conf entry was
15 respected. And that meant stripping out the whole of /usr/portage and fetching
16 the whole lot again.
17 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:
18 1) change repos.conf (in case you ever wipe out /usr/portage again -- the url there is only used for initial clone)
19 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.
20
21 I guess emerge could check this and set it for the user, but currently, it apparently doesn't.
22
23
24 Is this expected behaviour?
25
26 --
27 Regards,
28 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>