On Thursday, 28 February 2019 08:43:13 GMT Davyd McColl wrote:
> > On 2019/02/28 10:36:35, Peter Humphrey <pe...@prh.myzen.co.uk> wrote:

> > 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.

OK. It'd be helpful if the handbook said that, or somewhere else in the docs. 
Without that, the clear impression is that repos.conf is the place to specify 
the remote source.

> 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.

Useful tip - thanks.

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

Good idea. I hope a suitable developer is listening...

-- 
Regards,
Peter.




Reply via email to