def _install_phase_download(self): koji_client = utils_koji.KojiClient(cmd=self.koji_cmd) for pkg_text in self.koji_pkgs: pkg = utils_koji.KojiPkgSpec(pkg_text) if pkg.is_valid(): koji_client.get_pkgs(pkg, dst_dir=self.test_srcdir) else: logging.error('Package specification (%s) is invalid: %s' % (pkg, pkg.describe_invalid())) for pkg_text in self.koji_scratch_pkgs: pkg = utils_koji.KojiScratchPkgSpec(pkg_text) koji_client.get_scratch_pkgs(pkg, dst_dir=self.test_srcdir)
def _get_rpm_file_names(self): all_rpm_file_names = [] koji_client = utils_koji.KojiClient(cmd=self.koji_cmd) for pkg_text in self.koji_pkgs: pkg = utils_koji.KojiPkgSpec(pkg_text) rpm_file_names = koji_client.get_pkg_rpm_file_names(pkg) all_rpm_file_names += rpm_file_names for scratch_pkg_text in self.koji_scratch_pkgs: pkg = utils_koji.KojiScratchPkgSpec(scratch_pkg_text) rpm_urls = koji_client.get_scratch_pkg_urls(pkg) file_names = map(os.path.basename, rpm_urls) all_rpm_file_names += file_names return all_rpm_file_names
def _get_rpm_names(self): all_rpm_names = [] koji_client = utils_koji.KojiClient(cmd=self.koji_cmd) for pkg_text in self.koji_pkgs: pkg = utils_koji.KojiPkgSpec(pkg_text) rpm_names = koji_client.get_pkg_rpm_names(pkg) all_rpm_names += rpm_names for scratch_pkg_text in self.koji_scratch_pkgs: pkg = utils_koji.KojiScratchPkgSpec(scratch_pkg_text) rpm_urls = koji_client.get_scratch_pkg_urls(pkg) file_names = map(os.path.basename, rpm_urls) for f in file_names: r = utils_koji.RPMFileNameInfo(f) all_rpm_names.append(r.get_nvr_info()['name']) return all_rpm_names