• eldain@feddit.nl
    link
    fedilink
    arrow-up
    22
    ·
    edit-2
    2 days ago

    I once accidentally deleted python from my gentoo system (needed for emerge) and rescued it.

      • eldain@feddit.nl
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        2 hours ago

        I found out there were binary packages that were build together and manually downloaded and unpacked every package I needed for a minimum coherent build chain (no kernel but gcc, gnuutils etc) and used that to get emerge working again to build a new build chain with my own settings and used that to rebuild system to get rid of the foreign packages and be back. The gentoo wiki helped a lot.

        • FishFace@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          1 hour ago

          Nice! Sounds like a learning experience. Was it a fun challenge for you or annoying, in the end?

      • TwilightKiddy@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 day ago

        I suppose to rescue it you can grab a portable Python release and use that to emerge a proper one, another option would be booting into a live environment. And to cause this, --unmerge and --rage-clean are your friends. No idea how you’d do that “accidentally”, though.

        • eldain@feddit.nl
          link
          fedilink
          arrow-up
          1
          ·
          2 hours ago

          I remember I struggled with broken dynamic linking from bringing in binaries from the outside. I needed an entire build-chain from the same build and then build my way up with source packages (you have them around in gentoo) in my system until i reached portage. And then used emerge to recompile the buildchain twice so it was compatible with my system again.

    • vin@lemmynsfw.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 day ago

      Wow, I did that on CentOS and reinstalling the OS was the only sure shot way I could figure

      • eldain@feddit.nl
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        2 hours ago

        I sure hope there are ways to unpack RPMs by hand and copy the contents where they need to be. Would be very unlinuxy to make it a binary format and not a zipped container of some sort. But you might struggle depending on the amount of dependencies.