def test_install_gpg_keys(self):
        pkghandler.install_gpg_keys()

        gpg_dir = os.path.realpath(
            os.path.join(os.path.dirname(__file__),
                         "../data/version-independent/gpg-keys/*"))
        gpg_keys = glob.glob(gpg_dir)

        self.assertNotEqual(len(gpg_keys), 0)
        for gpg_key in gpg_keys:
            self.assertIn('rpm --import %s' % os.path.join(gpg_dir, gpg_key),
                          utils.run_subprocess.cmds)
Esempio n. 2
0
def post_ponr_conversion():
    """Perform main steps for system conversion."""

    loggerinst.task("Convert: Import Red Hat GPG keys")
    pkghandler.install_gpg_keys()
    loggerinst.task("Convert: Prepare kernel")
    pkghandler.preserve_only_rhel_kernel()
    loggerinst.task("Convert: Replace packages")
    pkghandler.replace_non_red_hat_packages()
    loggerinst.task("Convert: List remaining non-Red Hat packages")
    pkghandler.list_non_red_hat_pkgs_left()
    return
Esempio n. 3
0
def post_ponr_conversion():
    """Perform main steps for system conversion."""

    loggerinst.task("Convert: Import Red Hat GPG keys")
    pkghandler.install_gpg_keys()
    loggerinst.task("Convert: Prepare kernel")
    pkghandler.preserve_only_rhel_kernel()
    loggerinst.task("Convert: Replace packages")
    pkghandler.replace_non_red_hat_packages()
    loggerinst.task("Convert: List remaining non-Red Hat packages")
    pkghandler.list_non_red_hat_pkgs_left()
    loggerinst.task("Convert: Configure the bootloader")
    grub.post_ponr_set_efi_configuration()
    loggerinst.task("Convert: Patch yum configuration file")
    redhatrelease.YumConf().patch()
    loggerinst.task("Convert: Lock releasever in RHEL repositories")
    subscription.lock_releasever_in_rhel_repositories()

    breadcrumbs.breadcrumbs.finish_success()

    return