• Re: [gentoo-user] Migrate from rsync to git for emerge --sync?

    From Rich Freeman@21:1/5 to grant.b.edwards@gmail.com on Tue Oct 12 22:10:02 2021
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Edwards@21:1/5 to All on Tue Oct 12 22:10:02 2021
    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?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Edwards@21:1/5 to Rich Freeman on Tue Oct 12 23:20:01 2021
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Connell@21:1/5 to Grant Edwards on Wed Oct 13 03:10:01 2021
    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?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich Freeman@21:1/5 to matthewdconnell@gmail.com on Wed Oct 13 03:20:03 2021
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Edwards@21:1/5 to Rich Freeman on Wed Oct 13 03:30:02 2021
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Edwards@21:1/5 to Matt Connell on Wed Oct 13 03:30:02 2021
    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".






    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Connell@21:1/5 to Rich Freeman on Wed Oct 13 03:30:02 2021
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich Freeman@21:1/5 to grant.b.edwards@gmail.com on Wed Oct 13 03:40:01 2021
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Edwards@21:1/5 to Rich Freeman on Wed Oct 13 15:40:02 2021
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Neil Bothwick@21:1/5 to Grant Edwards on Wed Oct 13 20:10:01 2021
    On Wed, 13 Oct 2021 01:19:51 -0000 (UTC), Grant Edwards wrote:

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

    It did, but if all you had changed in repos.conf was the sync method, it
    would have come back after the next sync. I switched from rsync to git
    some time ago and it just worked.

    You made the classic mistake of changing two things at once and then not knowing which change caused the blow up!


    --
    Neil Bothwick

    Headline: "Explosion At Sperm Bank, Nurses Overcome"

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCAAdFiEE8k9T/rX16EJxEKG692eFu0QSMJgFAmFnICMACgkQ92eFu0QS MJjq4Q/+NA/l1s+1yc02GLQtSeFg1Bxq251PT8768YwhIP6/0Q1Q6ro7f4pIzGj3 R9/oTP1k6b79Sbi3iDGskzvKgH2LPhmXkcxvp/s8ShiVr6dhBJimwBzkm6W7E/Lq Pj7fj5JQFBUvOkp/PlCRKMy8tRMZBLSIr3zdS2l8LdwSxf4go41xmUQlOiheG41X wqGvBOhsboQOFWqwxZNHYXORPIAr491OZBZGW046K25ZJPZExZ6ZHLEJi8mi6LOT ocFUZzhhjIQpMzTYQ5KdzG+m8i4mYwLNe30zfGa627qTRt00ejkMPINLXaioy62F Q5dqUY6Ji8I/MhV4/TAtGuNKIps1YSVTdmlI5x9AOVP3VQeAqgdv6fYcr4I/BpE5 /B7r3BMQk3Y3gXLYMFABJsplJrRtoPmMVWsY16GNmMw28OUNoFoJyCr+dgQm//l0 Has0Tg15t7kI+ciTiF7mxCIVaDl2ZMZ8OAybqJTngkoApPULbXcvJp24+FZOPOeB yVMpwTEDPG/irBz6n8tta7KlMnQJ6+onwt6Ie79XWg8Q4qeYDEHEsncHjg37VTBy XeiJZc0hEpMIVU169vwcb/7+Q0/YanXdWEY7jbB45R1FOhzDTGvETtKkfJ1NOnaX +OSyIdz7P5qKuX0jj4ms5pNsi1/2CcyQYQcrFGhHmYYHEFJLmy4=
    =+qjJ
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Edwards@21:1/5 to Neil Bothwick on Wed Oct 13 20:40:01 2021
    On 2021-10-13, Neil Bothwick <neil@digimed.co.uk> wrote:

    You made the classic mistake of changing two things at once and then
    not knowing which change caused the blow up!

    Indeed. You'd think by now I'd have learned not to do that...

    --
    Grant

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Neil Bothwick@21:1/5 to Grant Edwards on Wed Oct 13 20:40:01 2021
    On Wed, 13 Oct 2021 18:26:04 -0000 (UTC), Grant Edwards wrote:

    You made the classic mistake of changing two things at once and then
    not knowing which change caused the blow up!

    Indeed. You'd think by now I'd have learned not to do that...

    Why should you be any different from the rest of us? ;-)


    --
    Neil Bothwick

    Walk softly and carry a fully charged phazer.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCAAdFiEE8k9T/rX16EJxEKG692eFu0QSMJgFAmFnJxYACgkQ92eFu0QS MJiDoxAAo5mt0z+N48evfdmBhe9KJ2NOPMnF051h98+4f6vl3/AsDou+Pu2FSmlZ 1W6nRj11TEzLY9sZXokjyCdfIptVA2k4HRa2hxG5mHYbdGrsX05bsZVwe/fXFv/K xackRk7HEV70Gzs102ujivPc0sy53/c2/63uw4jmmPSMkuM4j+1fQoyWym0e1zW7 DEyZ2k1uqH0UrasDNnOKWR/hiGxdLcYm5rriTiR55ja+bj/xiye8Vj6LyqP7yRDN 1tYdNLTbrLm8A3qESWwUOWx9275pyutjnQ/PqpoSPTlK45GP13gUSB1vysEIRJyF id5fKKUAR0ve25dgRmMn6x2DhpxiQ7HiF+MMj0yWDGY3vu5EPYLyuzQSj76H+ox3 fLwv8eVBb/ldgvV1u/Yp3az4Qqv9bGAJuf4fByD4bGoLkqw6H4BorgQLHkMMWdJj F/asGNWgXPoNg0GRYh/VDa1eu5a7zrNRkXUxEcJMxeKfFYwIeMYvILANDxriel/U +gHC82kGkk+orDkRiAKOU6IPUbAWt4+Zh1dOw8dvD+DRgB8p7URbas6XseZDxusA Sr2Mq+DIXd3Rd2M92uIpg3KhZZTfpkyr/jNnSQLHmP3GLgQcyRlibofOpGoCUmUG TC9AgAQxuN1AT0t0SmZksqnTb/FxZLsgsbhhJWuyRh9owo4utuc=
    =aRYb
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)