commit:     8f77dc85a3d658d3b6c09f5886fa7b70f0dc5d1e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 22 17:45:55 2025 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Nov 27 05:16:23 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=8f77dc85

fs_template.py: Replace lazyimport with function local import

Bug: https://bugs.gentoo.org/951146
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/cache/fs_template.py | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/lib/portage/cache/fs_template.py b/lib/portage/cache/fs_template.py
index 738bb5417a..b0f0b0d4e6 100644
--- a/lib/portage/cache/fs_template.py
+++ b/lib/portage/cache/fs_template.py
@@ -6,15 +6,6 @@ import os as _os
 from portage.cache import template
 from portage import os
 
-from portage.proxy.lazyimport import lazyimport
-
-lazyimport(
-    globals(),
-    "portage.exception:PortageException",
-    "portage.util:apply_permissions,ensure_dirs",
-)
-del lazyimport
-
 
 class FsBased(template.database):
     """template wrapping fs needed options, and providing _ensure_access as a 
way to
@@ -37,6 +28,9 @@ class FsBased(template.database):
     def _ensure_access(self, path, mtime=-1):
         """returns true or false if it's able to ensure that path is properly 
chmod'd and chowned.
         if mtime is specified, attempts to ensure that's correct also"""
+        from portage.exception import PortageException
+        from portage.util import apply_permissions
+
         try:
             apply_permissions(path, gid=self._gid, mode=self._perms)
             if mtime != -1:
@@ -48,6 +42,8 @@ class FsBased(template.database):
 
     def _ensure_dirs(self, path=None):
         """with path!=None, ensure beyond self.location.  otherwise, ensure 
self.location"""
+        from portage.util import ensure_dirs, apply_permissions
+
         if path:
             path = os.path.dirname(path)
             base = self.location

Reply via email to