@@ -556,7 +556,7 @@ def ldd(
556
556
)
557
557
_excluded_libs : set [str ] = set ()
558
558
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 :
560
560
continue
561
561
if soname in _excluded_libs :
562
562
continue
@@ -565,13 +565,15 @@ def ldd(
565
565
_excluded_libs .add (soname )
566
566
continue
567
567
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
568
571
if realpath is not None and any (fnmatch (str (realpath ), e ) for e in exclude ):
569
572
log .info ("Excluding %s" , realpath )
570
573
_excluded_libs .add (soname )
571
574
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 )
575
577
dependency = ldd (realpath , root , prefix , ldpaths , fullpath , exclude , _all_libs )
576
578
_all_libs [soname ] = DynamicLibrary (
577
579
soname ,
0 commit comments