'Check if packages specification are valid and exist on koji/brew
Configuration item on file is: koji_pkgs'

def _check_koji_packages(self):

    all_packages_found = True
    if (self.command_line_options.koji_pkg is not None):
        logging.debug('Checking    koji    packages    specification')
        for pkg_spec_text in self.command_line_options.koji_pkg:
            pkg_spec = utils_koji.KojiPkgSpec(pkg_spec_text)
            if (not (pkg_spec.is_valid() and self.koji_client.is_pkg_valid(pkg_spec))):
                logging.error(('Koji    package    spec    is    not    valid,    skipping:    %s' % pkg_spec))
                all_packages_found = False
            else:
                rpms = self.koji_client.get_pkg_rpm_info(pkg_spec, self.command_line_options.koji_arch)
                for subpackage in pkg_spec.subpackages:
                    if (subpackage not in [rpm['name'] for rpm in rpms]):
                        logging.error(('Package    specified    but    not    found    in    koji:    %s' % subpackage))
                        all_packages_found = False
                rpms = ',    '.join((rpm['nvr'] for rpm in rpms))
                logging.debug('Koji    package    spec    is    valid')
                logging.debug(('Koji    packages    to    be    fetched    and    installed:    %s' % rpms))
    return all_packages_found
