✏️ 编辑:__init__.cpython-39.opt-1.pyc
路径:
/usr/lib/python3.9/site-packages/dnf/cli/commands/__pycache__/__init__.cpython-39.opt-1.pyc
大小:24.2 KB · 修改:2026-05-20 19:48:39 · 权限:0644 · 只读(保存会失败)
← 返回目录
👁 查看
⬇ 下载
检测到二进制内容,直接保存可能损坏文件。请改用「上传替换」。
a �!c�} � @ s d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZ ddl Z ddlZ ddlZ ddl Z ddlZe �d�Zed�d Zed �d Zed�Zd d� Zd dd�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZdS )!z< Classes for subcommands of the yum command line interface. � )�print_function)�unicode_literals)�OptionParser)�_N�dnfz+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|jst�dt j tjj d�� t�td�|� tjj�qdS )z�Verify 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_check�reposZiter_enabledZ repo_gpgcheckZgpgkey�loggerZcritical�gpg_msg�formatr �util�MAIN_PROG_UPPERr �cli�CliError)�baser �repo� r �=/usr/lib/python3.9/site-packages/dnf/cli/commands/__init__.py�_checkGPGKey: s r r c C s| | j �� rdS |D ]@}|�d�r2tj�|�r2 dS tjj�|�d }|dv r dS qt d�� d�| jj ��}tj�|��dS )z�Verify 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 )�http�ftp�file�httpsz*There are no enabled repositories in "{}".z", ")r Z_any_enabled�endswith�os�path�existsr Zpycomp�urlparser r �joinr Zreposdirr r )r Zpossible_local_filesZlfile�scheme�msgr 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 �N�r ��selfr r r r �__init__f s zCommand.__init__c C s | j jS r&