Re: [gentoo-user] Emerge --sync source

2019-02-28 Thread Rich Freeman
On Thu, Feb 28, 2019 at 10:41 AM Peter Humphrey  wrote:
>
> On Thursday, 28 February 2019 08:43:13 GMT Davyd McColl wrote:
>
> > 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.

If you're going to migrate it in-place you really should set it in
both places.  Otherwise you'll end up with a surprise if you remove
/usr/portage.

In general it is usually simplest to just remove /usr/portage anytime
you change the sync settings.  At least until portage gets smarter
about it.

-- 
Rich



Re: [gentoo-user] Emerge --sync source

2019-02-28 Thread Peter Humphrey
On Thursday, 28 February 2019 08:43:13 GMT Davyd McColl wrote:
> > On 2019/02/28 10:36:35, Peter Humphrey  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 `
> -- 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.






Re: [gentoo-user] Emerge --sync source

2019-02-28 Thread Nils Freydank
I filed a bug report https://bugs.gentoo.org/679040.

Yes, currently you need to update your git config manually everytime you 
change your git remote.





Re: [gentoo-user] Emerge --sync source

2019-02-28 Thread Davyd McColl
On 2019/02/28 10:36:35, Peter Humphrey  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 ` -- 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.






[gentoo-user] Emerge --sync source

2019-02-28 Thread Peter Humphrey
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.

Is this expected behaviour?

-- 
Regards,
Peter.