Beispiel #1
0
 def _init_binaries(self):
     log.info('Searching binaries {0}'.format(self.root_path))
     find = Find(self._root_path)
     count = 0
     for path in iter(find):
         if path in self._root_path:   # skip symlinked binaries
             self._init_binary(path)
             count += 1
     log.info('Found {0} files'.format(count))
Beispiel #2
0
 def _make_shared_library(self, path):
     shlib = self._shared_library_factory(path)
     if shlib.path in self.root_path:
         self._internal_path[shlib.path] = shlib
     else:
         self._external_path[shlib.path] = shlib
     if shlib.filename in self._shlib_name:
         if self._shlib_name[shlib.filename] is not None:
             log.info('Duplicate library filename: {0} and {1}'.format(
                 shlib.path,
                 self._shlib_name[shlib.filename].path
             ))
         self._shlib_name[shlib.filename] = None
     else:
         self._shlib_name[shlib.filename] = shlib
Beispiel #3
0
 def _init_dependents(self):
     log.info('Searching executable dependencies')
     for exe in self._executable:
         exe._init_dependents(self, self._make_shared_library)
     log.info('Searching shared library dependencies')
     for shlib in self._internal_path.values():
         shlib._init_dependents(self, self._make_shared_library)
     num_internal = len(self._internal_path)
     for shlib in self._external_path.values():
         # Do not create new shared library objects from dependents
         shlib._init_dependents(self)
     assert num_internal == len(self._internal_path), 'external libraries cannot link internal ones'
     log.info('Found {0} external shared libraries'.format(len(self._external_path)))
Beispiel #4
0
 def _init_post(self):
     self._internal_shlib = frozenset(self._internal_path.values())
     self._external_shlib = frozenset(self._external_path.values())
     log.info('Found {0} shared libraries'.format(len(self._internal_shlib)))
     self._executable = frozenset(self._executable)
     log.info('Found {0} executables'.format(len(self._executable)))