commit: ea2721570e1993b0f1ffc3a9b6b9d9aaa7ad22c9
Author: Mike Frysinger <vapier <AT> chromium <DOT> org>
AuthorDate: Fri Apr 16 03:23:43 2021 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Apr 16 03:23:43 2021 +0000
URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=ea272157
lddtree: apply functools cache to some repeated filesystem calls
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
lddtree.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lddtree.py b/lddtree.py
index e3dafda..7ec04fa 100755
--- a/lddtree.py
+++ b/lddtree.py
@@ -40,6 +40,7 @@ they need will be placed into /foo/lib/ only.
"""
import argparse
+import functools
import glob
import errno
import os
@@ -87,6 +88,7 @@ def normpath(path):
return os.path.normpath(path).replace('//', '/')
[email protected]_cache(maxsize=None)
def readlink(path, root, prefixed=False):
"""Like os.readlink(), but relative to a |root|
@@ -167,6 +169,7 @@ exec \
os.chmod(wrappath, 0o0755)
[email protected]_cache(maxsize=None)
def ParseLdPaths(str_ldpaths, root='', path=None):
"""Parse the colon-delimited list of paths and apply ldso rules to each