def create_repo(dist): dist_output = self.paths.internal_repo(dist) rpm_dirs = [] project_roots = [ self.paths.build_dir(project_name) for project_name in projects_list ] rpm_dirs.extend( [ os.path.join(folder, dist) for folder in project_roots if os.path.exists(folder) ] ) rpm_dirs.extend( [ os.path.join(repos_path, name) for name in repo_names if name.endswith(dist) ], ) merge_repos.merge(dist_output, rpm_dirs)
def _create_rpm_repository(self, dists, repos_path, repo_names): for dist in dists: dist_output = self.paths.internal_repo(dist) rpm_dirs = [] if os.path.exists(self.paths.build_dir('vdsm')): rpm_dirs.append( os.path.join(self.paths.build_dir('vdsm'), dist) ) if os.path.exists(self.paths.build_dir('ovirt-engine')): rpm_dirs.append( os.path.join(self.paths.build_dir('ovirt-engine'), dist) ) rpm_dirs.extend( [ os.path.join(repos_path, name) for name in repo_names if name.endswith(dist) ], ) merge_repos.merge(dist_output, rpm_dirs)