Skip to content

Commit 87148d3

Browse files
committed
fix
1 parent 20a249a commit 87148d3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/auditwheel/lddtree.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ def ldd(
556556
)
557557
_excluded_libs: set[str] = set()
558558
for soname in sorted(needed):
559-
if soname in _all_libs:
559+
if soname in _all_libs and _all_libs[soname].realpath is not None:
560560
continue
561561
if soname in _excluded_libs:
562562
continue
@@ -565,13 +565,15 @@ def ldd(
565565
_excluded_libs.add(soname)
566566
continue
567567
realpath, fullpath = find_lib(platform, soname, all_ldpaths, root)
568+
if realpath is None:
569+
log.info("Could not locate %s, skipping.", soname)
570+
continue
568571
if realpath is not None and any(fnmatch(str(realpath), e) for e in exclude):
569572
log.info("Excluding %s", realpath)
570573
_excluded_libs.add(soname)
571574
continue
572-
_all_libs[soname] = DynamicLibrary(soname, fullpath, realpath)
573-
if realpath is None or fullpath is None:
574-
continue
575+
if soname not in _all_libs:
576+
_all_libs[soname] = DynamicLibrary(soname, fullpath, realpath)
575577
dependency = ldd(realpath, root, prefix, ldpaths, fullpath, exclude, _all_libs)
576578
_all_libs[soname] = DynamicLibrary(
577579
soname,

0 commit comments

Comments
 (0)