1 |
On Thursday, 28 February 2019 08:43:13 GMT Davyd McColl wrote: |
2 |
> > On 2019/02/28 10:36:35, Peter Humphrey <peter@××××××××××××.uk> wrote: |
3 |
|
4 |
> > I have a little server box on my LAN, which I use as a git server. I'm |
5 |
> > having a bit of trouble with it pro tem so I decided to switch the git |
6 |
> > sync source on this box. |
7 |
> > |
8 |
> > I removed the entry pointing to the local server in repos.conf/gentoo.conf |
9 |
> > and 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 |
12 |
> > there so it stopped. |
13 |
> > |
14 |
> > I had to remove /usr/portage/.git before the repos.conf/gentoo.conf entry |
15 |
> > was respected. And that meant stripping out the whole of /usr/portage and |
16 |
> > fetching the whole lot again. |
17 |
|
18 |
> Well, that's pretty-much how git works -- that local repo was still pointing |
19 |
> to the old remote. Updating your repos.conf won't change that as the old |
20 |
> remote is stored in config in the .git folder. |
21 |
|
22 |
OK. It'd be helpful if the handbook said that, or somewhere else in the docs. |
23 |
Without that, the clear impression is that repos.conf is the place to specify |
24 |
the remote source. |
25 |
|
26 |
> However, if you need to to this again, you could: 1) change repos.conf (in |
27 |
> case you ever wipe out /usr/portage again -- the url there is only used for |
28 |
> initial clone) 1) in /usr/portage, run `git remote set-url origin <new-url>` |
29 |
> -- this informs git of the change, and your next fetch should work as |
30 |
> expected. |
31 |
|
32 |
Useful tip - thanks. |
33 |
|
34 |
> I guess emerge could check this and set it for the user, but currently, it |
35 |
> apparently doesn't. |
36 |
|
37 |
Good idea. I hope a suitable developer is listening... |
38 |
|
39 |
-- |
40 |
Regards, |
41 |
Peter. |