• [gentoo-user] emerge fails with syntax error from stage3-amd64-openrc-2

    From Steven Lembark@21:1/5 to All on Sat Feb 22 07:20:01 2025
    Done this enough times before: Boot the minimal install, create a vm,
    create the baseline LV's, mount them along with the slaves (e.g.,
    dev), chroot to the new system, do the emerges.

    Checking the duck didn't get me anywhere; not sure if this is something well-known or not; if so any pointers to known workarounds would be appreciated.

    Thanks

    Using:

    install-amd64-minimal-20250216T164837Z.iso
    stage3-amd64-openrc-20250216T164837Z.tar.xz

    Mount the filesytems then:

    cd /mnt/gentoo;
    xzcat < stage3-amd64-openrc-20250216T164837Z.tar.xz | tar xf -;

    mount --bind for dev, sys, proc, run...
    chroot /mnt/gentoo /bin/bash --login;

    Simple sanity check: Does emerge run at all:

    # ls -l $( which emerge );
    lrwxrwxrwx 1 root root 31 Feb 16 17:23 /bin/emerge -> ../lib/python-exec/python-exec2

    whatever python-exec might be...

    # emerge --version;

    Traceback (most recent call last):
    File "/usr/lib/python-exec/python3.12/emerge", line 51, in <module>
    from _emerge.main import emerge_main
    File "/usr/lib/python3.12/site-packages/_emerge/main.py", line 25, in <module>
    from portage.sync import _SUBMODULE_PATH_MAP
    File "/usr/lib/python3.12/site-packages/portage/sync/__init__.py", line 24, in <module>
    module_controller = Modules(path=path, namepath="portage.sync.modules")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/site-packages/portage/module.py", line 101, in __init__
    self._modules = self._get_all_modules()
    ^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/site-packages/portage/module.py", line 134, in _get_all_modules
    new_module = Module(entry, self._namepath)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/site-packages/portage/module.py", line 33, in __init__
    self.initialized = self._initialize()
    ^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/site-packages/portage/module.py", line 43, in _initialize
    self._module = __import__(mod_name, [], [], ["not empty"])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/site-packages/portage/sync/modules/PaxHeaders/__init__.py", line 1
    20 atime=1726641191
    ^^^^^
    SyntaxError: invalid syntax


    --
    Steven Lembark
    Workhorse Computing
    lembark@wrkhors.com
    +1 888 359 3508

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