a !c} @ s d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZ ddl Z ddlZ ddlZ ddl Z ddlZe dZedd Zed d ZedZd d Zd ddZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZdS )!z< Classes for subcommands of the yum command line interface. )print_function)unicode_literals)OptionParser)_Ndnfz+To diagnose the problem, try running: '%s'.zrpm -Va --nofiles --nodigestzDYou probably have corrupted RPMDB, running '%s' might fix the issue.zrpm --rebuilddba You have enabled checking of packages via GPG keys. This is a good thing. However, you do not have any GPG public keys installed. You need to download the keys for packages you wish to install and install them. You can do that by running the command: rpm --import public.gpg.key Alternatively you can specify the url to the key you would like to use for a repository in the 'gpgkey' option in a repository section and {prog} will install it for you. For more information contact your distribution or package provider.c C sj | j jsdS | sf| j D ]F}|js.|jr|jstdt j tjj d ttd| tjjqdS )zVerify that there are gpg keys for the enabled repositories in the rpm database. :param base: a :class:`dnf.Base` object. :raises: :class:`cli.CliError` Nz %s progzProblem repository: %s)confZgpgcheckZ_gpg_key_checkreposZiter_enabledZ repo_gpgcheckZgpgkeyloggerZcriticalgpg_msgformatr utilMAIN_PROG_UPPERr cliCliError)baser repo r =/usr/lib/python3.9/site-packages/dnf/cli/commands/__init__.py_checkGPGKey: s r r c C s| | j rdS |D ]@}|dr2tj|r2 dS tjj|d }|dv r dS qt d d| jj }tj|dS )zVerify that there is at least one enabled repo. :param base: a :class:`dnf.Base` object. :param possible_local_files: the list of strings that could be a local rpms :raises: :class:`cli.CliError`: Nz.rpmr )httpftpfilehttpsz*There are no enabled repositories in "{}".z", ")r Z_any_enabledendswithospathexistsr Zpycompurlparser r joinr Zreposdirr r )r Zpossible_local_filesZlfileschememsgr r r _checkEnabledRepoK s r# c @ s e Zd ZdZg ZdZdZdd Zedd Z edd Z ed d Zdd Zdd Z dd Zdd Zdd Zdd Zdd ZdS )Commandz%Abstract base class for CLI commands. Nc C s || _ d S Nr selfr r r r __init__f s zCommand.__init__c C s | j jS r&