141 def anaLib(lib, opt, cache, select = [], ignore = [], depth = 0):
142 """Get dependencies of shared library recursively"""
145 """Should this lib be processed?"""
146 for regexp
in select:
147 if regexp.match(path):
return True
148 if len(select)>0:
return False
150 for regexp
in ignore:
151 if regexp.match(path):
return False
154 if opt.maxdepth
and depth>=opt.maxdepth:
return
157 cachedlib = cache.myfiles.get(lib)
160 if depth<cachedlib.distance: cachedlib.distance=depth
163 shlib = SharedLib(depth, lib)
166 for l
in shlib.deplibs:
169 anaLib(l, opt, cache, select, ignore, depth+1)