commit: fb3debbd9455bc6288b2f420312beac836876fbd
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 23 21:27:15 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug 2 06:31:20 2023 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=fb3debbd
Fix the test_doebuild_fd_pipes.py test under CI
The tests call _disable_legacy_globals, but they never reset
portage.data._initialized_globals, meaning that the globals never get
set again.
This led to the test trying to chown with GID 0 as an unprivileged user.
This only failed under CI after switching to pytest, despite it working
with runTests.py, as well as locally. Running it on its own also worked
fine. I don't know how it worked before, maybe it was just the ordering
and some luck.
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>
lib/portage/__init__.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py
index 847a879cd..635eea31e 100644
--- a/lib/portage/__init__.py
+++ b/lib/portage/__init__.py
@@ -829,3 +829,4 @@ def _disable_legacy_globals():
global _legacy_global_var_names
for k in _legacy_global_var_names:
globals().pop(k, None)
+ portage.data._initialized_globals.clear()