* [gentoo-user] Migrate from rsync to git for emerge --sync?
@ 2021-10-12 20:02 Grant Edwards
2021-10-12 20:09 ` Rich Freeman
0 siblings, 1 reply; 13+ messages in thread
From: Grant Edwards @ 2021-10-12 20:02 UTC (permalink / raw
To: gentoo-user
How do you migrate from rsync to git for 'emerge --sync'?
I changed my /etc/porttage/repos.conf/gentoo.conf file as shown in
various places, but when I try to do a sync, git barfs:
# emerge --sync >>> Syncing repository 'gentoo' into '/usr/portage'...
/usr/bin/git clone --depth 1 https://github.com/gentoo-mirror/gentoo.git .
fatal: destination path '.' already exists and is not an empty directory.
!!! git clone error in /usr/portage
Despite what multiple blog and wiki pages claim, it seems it's not as
simple as editing you gentoo.conf file. Do I need to wipe the contents
of /usr/portage and start with an emptry directory there?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Migrate from rsync to git for emerge --sync?
2021-10-12 20:02 [gentoo-user] Migrate from rsync to git for emerge --sync? Grant Edwards
@ 2021-10-12 20:09 ` Rich Freeman
2021-10-12 21:14 ` [gentoo-user] " Grant Edwards
0 siblings, 1 reply; 13+ messages in thread
From: Rich Freeman @ 2021-10-12 20:09 UTC (permalink / raw
To: gentoo-user
On Tue, Oct 12, 2021 at 4:02 PM Grant Edwards <grant.b.edwards@gmail.com> wrote:
>
> Despite what multiple blog and wiki pages claim, it seems it's not as
> simple as editing you gentoo.conf file. Do I need to wipe the contents
> of /usr/portage and start with an emptry directory there?
I believe so. I'd just rename the directory and let it get
re-created. Then you can delete the old one when you are confident
you don't need it.
--
Rich
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: Migrate from rsync to git for emerge --sync?
2021-10-12 20:09 ` Rich Freeman
@ 2021-10-12 21:14 ` Grant Edwards
2021-10-13 1:01 ` Matt Connell
0 siblings, 1 reply; 13+ messages in thread
From: Grant Edwards @ 2021-10-12 21:14 UTC (permalink / raw
To: gentoo-user
On 2021-10-12, Rich Freeman <rich0@gentoo.org> wrote:
> On Tue, Oct 12, 2021 at 4:02 PM Grant Edwards <grant.b.edwards@gmail.com> wrote:
>>
>> Despite what multiple blog and wiki pages claim, it seems it's not as
>> simple as editing you gentoo.conf file. Do I need to wipe the contents
>> of /usr/portage and start with an emptry directory there?
>
> I believe so. I'd just rename the directory and let it get
> re-created. Then you can delete the old one when you are confident
> you don't need it.
Yep, I renamed the old one, switched the repo conf to the new /var/db
location, and let emrge --sync clone a new repo directory using
git.
The 'git clone' finished OK, but the sync still failed (with a very
obtuse Python exception and stack dump) when it got to the news
processing step. After a bit of googling I found a hint that failure
happens when there is no profile selected. I ran 'eselet profile set
N'. After that, the sync completed OK.
That seems like something that should be documented somewhere...
I'll see if I can find an appropriate spot in the Wiki.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Migrate from rsync to git for emerge --sync?
2021-10-12 21:14 ` [gentoo-user] " Grant Edwards
@ 2021-10-13 1:01 ` Matt Connell
2021-10-13 1:18 ` Rich Freeman
2021-10-13 1:19 ` Grant Edwards
0 siblings, 2 replies; 13+ messages in thread
From: Matt Connell @ 2021-10-13 1:01 UTC (permalink / raw
To: gentoo-user
On Tue, 2021-10-12 at 21:14 +0000, Grant Edwards wrote:
> no profile selected
I'm surprised you had gotten this far without a profile selected.
Maybe you had previously selected one that was deprecated at some point
and removed from the list?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Migrate from rsync to git for emerge --sync?
2021-10-13 1:01 ` Matt Connell
@ 2021-10-13 1:18 ` Rich Freeman
2021-10-13 1:22 ` Grant Edwards
2021-10-13 1:25 ` Matt Connell
2021-10-13 1:19 ` Grant Edwards
1 sibling, 2 replies; 13+ messages in thread
From: Rich Freeman @ 2021-10-13 1:18 UTC (permalink / raw
To: gentoo-user
On Tue, Oct 12, 2021 at 9:01 PM Matt Connell <matthewdconnell@gmail.com> wrote:
>
> On Tue, 2021-10-12 at 21:14 +0000, Grant Edwards wrote:
> > no profile selected
>
> I'm surprised you had gotten this far without a profile selected.
> Maybe you had previously selected one that was deprecated at some point
> and removed from the list?
>
Profile selection is implemented as a symlink from
/etc/portage/make.profile. If you move your repository, then you need
to re-select the profile since the symlink will be broken.
Probably doesn't need to be a symlink, or in the repo, which is I'm
guessing how funtoo does mix-ins though I haven't actually checked
(just create a custom profile with the appropriate parent entries).
The Gentoo standard though is a symlink.
--
Rich
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: Migrate from rsync to git for emerge --sync?
2021-10-13 1:18 ` Rich Freeman
@ 2021-10-13 1:22 ` Grant Edwards
2021-10-13 1:35 ` Rich Freeman
2021-10-13 1:25 ` Matt Connell
1 sibling, 1 reply; 13+ messages in thread
From: Grant Edwards @ 2021-10-13 1:22 UTC (permalink / raw
To: gentoo-user
On 2021-10-13, Rich Freeman <rich0@gentoo.org> wrote:
> On Tue, Oct 12, 2021 at 9:01 PM Matt Connell <matthewdconnell@gmail.com> wrote:
>>
>> On Tue, 2021-10-12 at 21:14 +0000, Grant Edwards wrote:
>> > no profile selected
>>
>> I'm surprised you had gotten this far without a profile selected.
>> Maybe you had previously selected one that was deprecated at some point
>> and removed from the list?
>>
>
> Profile selection is implemented as a symlink from
> /etc/portage/make.profile. If you move your repository, then you need
> to re-select the profile since the symlink will be broken.
Indeed. And the failure that produces is not at all graceful.
I spent a little time trying to figure out where in the Wiki or docs
that the rsync -> git migration steps should be documented, but I
didn't find anyplace that looked like the right home for that info.
> Probably doesn't need to be a symlink, or in the repo, which is I'm
> guessing how funtoo does mix-ins though I haven't actually checked
> (just create a custom profile with the appropriate parent entries).
> The Gentoo standard though is a symlink.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Migrate from rsync to git for emerge --sync?
2021-10-13 1:22 ` Grant Edwards
@ 2021-10-13 1:35 ` Rich Freeman
2021-10-13 13:30 ` Grant Edwards
0 siblings, 1 reply; 13+ messages in thread
From: Rich Freeman @ 2021-10-13 1:35 UTC (permalink / raw
To: gentoo-user
On Tue, Oct 12, 2021 at 9:22 PM Grant Edwards <grant.b.edwards@gmail.com> wrote:
>
> On 2021-10-13, Rich Freeman <rich0@gentoo.org> wrote:
> >
> > Profile selection is implemented as a symlink from
> > /etc/portage/make.profile. If you move your repository, then you need
> > to re-select the profile since the symlink will be broken.
>
> Indeed. And the failure that produces is not at all graceful.
>
> I spent a little time trying to figure out where in the Wiki or docs
> that the rsync -> git migration steps should be documented, but I
> didn't find anyplace that looked like the right home for that info.
>
Moving from rsync to git probably doesn't require re-selecting the
profile. However, if you move the path of the repository itself then
that would require re-selecting the profile regardless of whether the
method of syncing is changed.
I got the impression from your email that you moved the repository
when you switched. If you ONLY renamed the old one but kept the same
exact path, then after it pulled the new repo the profile should have
remained working as far as I am aware. If I'm understanding the
situation, then the correct place to put this in the wiki is in any
section pertaining to moving the repository (such as to /var/db or
whatever). It wouldn't hurt to make a note in any instructions for
switching to git to be aware of the requirement if the opportunity is
taken to move the repository at the same time. It is a pretty logical
time to do this.
The error messages may very well have been misleading though. Portage
is a bit infamous for misleading error messages.
--
Rich
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: Migrate from rsync to git for emerge --sync?
2021-10-13 1:35 ` Rich Freeman
@ 2021-10-13 13:30 ` Grant Edwards
0 siblings, 0 replies; 13+ messages in thread
From: Grant Edwards @ 2021-10-13 13:30 UTC (permalink / raw
To: gentoo-user
On 2021-10-13, Rich Freeman <rich0@gentoo.org> wrote:
> On Tue, Oct 12, 2021 at 9:22 PM Grant Edwards <grant.b.edwards@gmail.com> wrote:
>
>> On 2021-10-13, Rich Freeman <rich0@gentoo.org> wrote:
>> >
>> > Profile selection is implemented as a symlink from
>> > /etc/portage/make.profile. If you move your repository, then you need
>> > to re-select the profile since the symlink will be broken.
>>
>> Indeed. And the failure that produces is not at all graceful.
>>
>> I spent a little time trying to figure out where in the Wiki or docs
>> that the rsync -> git migration steps should be documented, but I
>> didn't find anyplace that looked like the right home for that info.
>>
>
> Moving from rsync to git probably doesn't require re-selecting the
> profile. However, if you move the path of the repository itself then
> that would require re-selecting the profile regardless of whether the
> method of syncing is changed.
>
> I got the impression from your email that you moved the repository
> when you switched.
Yes. I was in the old location /usr/portage, and I moved it to the new
/var/db location. That's what broke the profile selection.
> If you ONLY renamed the old one but kept the same exact path, then
> after it pulled the new repo the profile should have remained
> working as far as I am aware.
I think that's correct.
> If I'm understanding the situation, then the correct place to put
> this in the wiki is in any section pertaining to moving the
> repository (such as to /var/db or whatever). It wouldn't hurt to
> make a note in any instructions for switching to git to be aware of
> the requirement if the opportunity is taken to move the repository
> at the same time. It is a pretty logical time to do this.
That's certainly what I thought. :)
> The error messages may very well have been misleading though.
> Portage is a bit infamous for misleading error messages.
There wasn't an error message at all. Just a Python stack trace becaus
of an exception thrown because None doesn't have a startswith method.
--
Grant
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Migrate from rsync to git for emerge --sync?
2021-10-13 1:18 ` Rich Freeman
2021-10-13 1:22 ` Grant Edwards
@ 2021-10-13 1:25 ` Matt Connell
1 sibling, 0 replies; 13+ messages in thread
From: Matt Connell @ 2021-10-13 1:25 UTC (permalink / raw
To: gentoo-user
On Tue, 2021-10-12 at 21:18 -0400, Rich Freeman wrote:
> Profile selection is implemented as a symlink from
> /etc/portage/make.profile. If you move your repository, then you
> need
> to re-select the profile since the symlink will be broken.
Ah, that would be it. Thanks for explaining, I never knew how the
profile was actually handled. Good to know.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: Migrate from rsync to git for emerge --sync?
2021-10-13 1:01 ` Matt Connell
2021-10-13 1:18 ` Rich Freeman
@ 2021-10-13 1:19 ` Grant Edwards
2021-10-13 18:06 ` Neil Bothwick
1 sibling, 1 reply; 13+ messages in thread
From: Grant Edwards @ 2021-10-13 1:19 UTC (permalink / raw
To: gentoo-user
On 2021-10-13, Matt Connell <matthewdconnell@gmail.com> wrote:
> On Tue, 2021-10-12 at 21:14 +0000, Grant Edwards wrote:
>> no profile selected
>
> I'm surprised you had gotten this far without a profile selected.
I had a profile selected.
> Maybe you had previously selected one that was deprecated at some point
> and removed from the list?
I assume that 'mv /usr/portage /usr/portage-old' cause my profile
selecttion to "go away".
>
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-10-13 18:36 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-12 20:02 [gentoo-user] Migrate from rsync to git for emerge --sync? Grant Edwards
2021-10-12 20:09 ` Rich Freeman
2021-10-12 21:14 ` [gentoo-user] " Grant Edwards
2021-10-13 1:01 ` Matt Connell
2021-10-13 1:18 ` Rich Freeman
2021-10-13 1:22 ` Grant Edwards
2021-10-13 1:35 ` Rich Freeman
2021-10-13 13:30 ` Grant Edwards
2021-10-13 1:25 ` Matt Connell
2021-10-13 1:19 ` Grant Edwards
2021-10-13 18:06 ` Neil Bothwick
2021-10-13 18:26 ` Grant Edwards
2021-10-13 18:36 ` Neil Bothwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox