def _install_pkg_from_install_mgr(self, install_mgr, root_dir, pkg_id): install_process = install_mgr.new_installation_process() result_dir = install_process.execute() installed_paths = [] # this rely on the fact that install_paths is a generator (see doc) try: for installed_path in install_paths(result_dir, root_dir): installed_paths.append(installed_path) except Exception, e: logger.error('Error during installation of pkg %s in %s: %s' % (pkg_id, root_dir, e)) # preserve stack trace while removing installed files try: raise finally: self._remove_installed_paths(installed_paths, root_dir)
def _install(self): return sorted(util.install_paths(self._tmp_src_dir, self._tmp_dst_dir))