While running "pkexec emerge --sync", synchronization of the main portage repository crashes while refreshing the portage verification keys. Reproducible: Always Steps to Reproduce: 1. Open gnome-terminal (assuming it will occur in any terminal app you use) 2. Execute "pkexec emerge --sync" 3. Alternatively execute "pkexec /bin/bash" or "pkexec su", followed by running "emerge --sync" in root shell. Results are the same. Actual Results: //*** Test run 1 deported1@TARDIS1968 ~ $ pkexec emerge --sync >>> Syncing repository 'gentoo' into '/var/db/repos/gentoo'... * Using keys from /usr/share/openpgp-keys/gentoo-release.asc * Refreshing keys via WKD ... [ !! ] * Refreshing keys from keyserver hkps://keys.gentoo.org ...Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/portage/util/_async/AsyncFunction.py", line 39, in _run result = self.target(*(self.args or []), **(self.kwargs or {})) File "/usr/lib/python3.8/site-packages/portage/sync/controller.py", line 169, in sync taskmaster.run_tasks(tasks, func, status, options=task_opts) File "/usr/lib/python3.8/site-packages/portage/sync/controller.py", line 68, in run_tasks result = getattr(inst, func)(**kwargs) File "/usr/lib/python3.8/site-packages/portage/sync/syncbase.py", line 316, in sync return self.update() File "/usr/lib/python3.8/site-packages/portage/sync/modules/rsync/rsync.py", line 151, in update self._refresh_keys(openpgp_env) File "/usr/lib/python3.8/site-packages/portage/sync/syncbase.py", line 290, in _refresh_keys func_coroutine = functools.partial(loop.run_in_executor, NameError: name 'functools' is not defined >>> Syncing repository 'sakaki-tools' into '/var/db/repos/sakaki-tools'... /usr/bin/git fetch origin Already up to date. === Sync completed for sakaki-tools Action: sync for repo: gentoo, returned code = 1 Action: sync for repo: sakaki-tools, returned code = 0 //*** Test run 2 deported1@TARDIS1968 ~ $ pkexec /bin/bash TARDIS1968 ~ # emerge --sync >>> Syncing repository 'gentoo' into '/var/db/repos/gentoo'... * Using keys from /usr/share/openpgp-keys/gentoo-release.asc * Refreshing keys via WKD ... [ !! ] * Refreshing keys from keyserver hkps://keys.gentoo.org ...Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/portage/util/_async/AsyncFunction.py", line 39, in _run result = self.target(*(self.args or []), **(self.kwargs or {})) File "/usr/lib/python3.8/site-packages/portage/sync/controller.py", line 169, in sync taskmaster.run_tasks(tasks, func, status, options=task_opts) File "/usr/lib/python3.8/site-packages/portage/sync/controller.py", line 68, in run_tasks result = getattr(inst, func)(**kwargs) File "/usr/lib/python3.8/site-packages/portage/sync/syncbase.py", line 316, in sync return self.update() File "/usr/lib/python3.8/site-packages/portage/sync/modules/rsync/rsync.py", line 151, in update self._refresh_keys(openpgp_env) File "/usr/lib/python3.8/site-packages/portage/sync/syncbase.py", line 290, in _refresh_keys func_coroutine = functools.partial(loop.run_in_executor, NameError: name 'functools' is not defined >>> Syncing repository 'sakaki-tools' into '/var/db/repos/sakaki-tools'... /usr/bin/git fetch origin Already up to date. === Sync completed for sakaki-tools Action: sync for repo: gentoo, returned code = 1 Action: sync for repo: sakaki-tools, returned code = 0 TARDIS1968 ~ # Expected Results: Expectation was for portage verification keys to refresh, followed by rsync synchronizing the main portage tree, and the contents of the tree being verified by the manifest. I've tried rebuilding dev-lang/python-3.8.4-r1, and app-portage/gemato-14.4. This crash still occurs. My only workaround was to either set sync-rsync-verify-metamanifest to "no" in /etc/portage/repos.conf/gentoo.conf, or downgrade to =sys-apps/portage-2.3.103 where portage tree verification still works. Did not experience this crash emerge-webrsync
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=d65e759fc26ea0301ba2020e0993d431e9354e7b commit d65e759fc26ea0301ba2020e0993d431e9354e7b Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-07-20 22:03:46 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-07-20 22:05:28 +0000 syncbase: Add back missing functools import Fixes: 788c0e8bb07b ("Remove from __future__ import unicode_literals") Bug: https://bugs.gentoo.org/733370 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/sync/syncbase.py | 1 + 1 file changed, 1 insertion(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b3d5b05598560ebf8503397932d8c784c393d7b commit 2b3d5b05598560ebf8503397932d8c784c393d7b Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-07-20 22:12:06 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-07-20 22:13:12 +0000 sys-apps/portage: 3.0.0-r1 revbump for bug 733370 Bug: https://bugs.gentoo.org/733180 Closes: https://bugs.gentoo.org/733370 Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Zac Medico <zmedico@gentoo.org> .../{portage-3.0.0.ebuild => portage-3.0.0-r1.ebuild} | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)