On 2019/02/28 10:36:35, Peter Humphrey <pe...@prh.myzen.co.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.




Reply via email to