Installing from portage fails

Any hits how to make portage working again?

# emerge -au @my_set
/usr/lib/python3.7/site-packages/portage/package/ebuild/_config/ UserWarning: /etc/portage/package.keywords is deprecated, use /etc/portage/package.accept_keywords instead

These are the packages that would be merged, in order:

Calculating dependencies \Exception in callback AsynchronousTask.wait()
handle: <Handle AsynchronousTask.wait()>
Traceback (most recent call last):
  File "/usr/lib/python3.7/asyncio/", line 88, in _run, *self._args)
  File "/usr/lib/python3.7/site-packages/_emerge/", line 84, in wait
  File "/usr/lib/python3.7/site-packages/_emerge/", line 195, in _wait_hook
  File "/usr/lib/python3.7/site-packages/portage/util/_async/", line 80, in _task_exit
  File "/usr/lib/python3.7/site-packages/_emerge/", line 154, in _schedule
  File "/usr/lib/python3.7/site-packages/portage/util/_async/", line 66, in _schedule_tasks
  File "/usr/lib/python3.7/site-packages/_emerge/", line 30, in start
  File "/usr/lib/python3.7/site-packages/_emerge/", line 59, in _start
  File "/usr/lib/python3.7/site-packages/_emerge/", line 99, in _async_wait
  File "/usr/lib/python3.7/site-packages/_emerge/", line 147, in _unregister
AttributeError: 'NoneType' object has no attribute 'ebuild'
> /usr/lib/python3.7/site-packages/portage/util/_eventloop/>None
-> pdb.set_trace()

portage installed:

# equo query belongs $(which emerge)
╠  @@ Belong Search
╠      @@ Package: sys-apps/portage-2.3.89-r3 branch: 5, [__system__] 
╠          Installed:     version: 2.3.89-r3 ~ tag: NoTag ~ revision: 2
╠          Slot:          0
╠          Homepage: 
╠          Description:   Portage is the package management 
╠                         and distribution system for Gentoo 
╠          License:       GPL-2
╠   Keyword:  /usr/bin/emerge
╠   Found:    1 entry

Sorry to give the bad news, but won’t be possible anymore in Sabayon unless somebody forks it and develops it.

I thought Sabayon will be maintained until Mocaccino is production ready. @joost_op?

Ah, now I see

╠ [0] [Wed, 21 Jul 2021 20:09:17 +0000] Title: Entropy repositories deprecation/frozen.
╠ Content:

We have come to the point where we no longer can maintain the Sabayon repositories.
Current repos will be available to you until further notice.
But this kind of means that this is the end!
We would like to thank our community it has been a great ride!
The Sabayon team.
We are continuing our work here:

╠ Link:

So long and thanks for all the fish then!

Upstream Portage3 devs have apparently solved this issue and I’ve copied a 1-line change from them that allowed a build to succeed on my system.

:warning: Caveat: I’m no python developer, so it’s possible this change might cause other problems elsewhere. Try at your own risk.

In File “/usr/lib/python3.7/site-packages/_emerge/”, line 146, change the _unregister function to read:

    def _unregister(self):
            if self._files is not None:

If you’re a new to Python, be aware that white space matters. Keep the columns aligned as they are shown above.

You should adjust the file location according to which python interpreter is in use on your system. It should be the first version listed by an ‘eselect python list’ command.