Summary: | 'ebuild.sh clean' fails ("ModuleNotFoundError: No module named 'portage.util.netlink'") during rebuilding of sys-apps/portage with changed PYTHON_TARGETS | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Arfrever Frehtes Taifersar Arahesis <arfrever.fta> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS, REGRESSION |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 706142, 711148 |
Description
Arfrever Frehtes Taifersar Arahesis
2020-04-20 08:32:25 UTC
> ${PORTAGE_TMPDIR}/portage/sys-apps/portage-* remains.
Also ${PORTAGE_TMPDIR}/._unmerge_/sys-apps/portage-* remains.
The portage.util.netlink import needs to be done in global scope (could be use lazyimport), for the same reason the that portage.proxy.lazyimport._preload_portage_submodules() function exists. We better not use lazyimport for this because if it fails then portage.proxy.lazyimport._preload_portage_submodules() will fail. I think importing the netlink module on non-Linux systems will fail. I'm guessing that AF_NETLINK is not defined on other systems. Is there a nicer way to deal with this? We can do something like this in global scope and later test if RtNetlink is None as needed: try: from portage.util.netlink import RtNetlink except Exception: if platform.system() == "Linux": raise RtNetlink = None The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=9738a404e876270cbdef2514f66915bce35d7435 commit 9738a404e876270cbdef2514f66915bce35d7435 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2020-04-20 20:47:00 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2020-04-20 21:14:25 +0000 Import portage.util.netlink.RtNetlink in global scope Bug: https://bugs.gentoo.org/718578 Signed-off-by: Mike Gilbert <floppym@gentoo.org> Reviewed-by: Zac Medico <zmedico@gentoo.org> lib/portage/process.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8dca612ca4c7e32e51bda62943a224b717decf33 commit 8dca612ca4c7e32e51bda62943a224b717decf33 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-04-21 03:45:58 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-04-21 04:33:42 +0000 sys-apps/portage: revbump to 2.3.99-r2 for bug 718578 #718578 ModuleNotFoundError for portage.util.netlink Bug: https://bugs.gentoo.org/711148 Closes: https://bugs.gentoo.org/718578 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Zac Medico <zmedico@gentoo.org> .../portage/{portage-2.3.99-r1.ebuild => portage-2.3.99-r2.ebuild} | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a81ec04a86a9b593d9dbafe30e96cd8453831798 commit a81ec04a86a9b593d9dbafe30e96cd8453831798 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-04-21 03:08:09 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-04-21 03:11:17 +0000 sys-apps/portage: stable revbump to 2.3.89-r3 for bug 718578 #718578 ModuleNotFoundError for portage.util.netlink Bug: https://bugs.gentoo.org/706142 Bug: https://bugs.gentoo.org/718578 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + .../portage/{portage-2.3.89-r2.ebuild => portage-2.3.89-r3.ebuild} | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) |