Пример #1
0
    def _expand_koji_pkgs_with_debuginfo(self):
        '''
        Include debuginfo RPMs on koji_pkgs

        @returns: None
        '''
        logging.debug("Koji package list to be updated with debuginfo pkgs")

        koji_pkgs_with_debug = []
        for pkg_text in self.koji_pkgs:
            pkg = virt_utils.KojiPkgSpec(pkg_text)
            debuginfo_pkg_name = '%s-debuginfo' % pkg.package
            # if no subpackages are set, then all packages will be installed
            # so there's no need to manually include debuginfo packages
            if pkg.subpackages:
                # make sure we do not include the debuginfo package if
                # already specified in the list of subpackages
                if not debuginfo_pkg_name in pkg.subpackages:
                    pkg.subpackages.append(debuginfo_pkg_name)

            pkg_with_debug_text = pkg.to_text()
            logging.debug("KojiPkgSpec with debuginfo package added: %s",
                          pkg_with_debug_text)
            koji_pkgs_with_debug.append(pkg_with_debug_text)

        # swap current koji_pkgs with on that includes debuginfo pkgs
        self.koji_pkgs = koji_pkgs_with_debug
Пример #2
0
 def _get_rpm_file_names(self):
     all_rpm_file_names = []
     koji_client = virt_utils.KojiClient(cmd=self.koji_cmd)
     for pkg_text in self.koji_pkgs:
         pkg = virt_utils.KojiPkgSpec(pkg_text)
         rpm_file_names = koji_client.get_pkg_rpm_file_names(pkg)
         all_rpm_file_names += rpm_file_names
     return all_rpm_file_names
Пример #3
0
 def _install_phase_download(self):
     koji_client = virt_utils.KojiClient(cmd=self.koji_cmd)
     for pkg_text in self.koji_pkgs:
         pkg = virt_utils.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()))