관리-도구
편집 파일: reinstall.cpython-39.opt-1.pyc
a �����!c]����������������������@���sl���d�dl�mZ�d�dl�mZ�d�dlmZ�d�dlmZ�d�dlmZ�d�dl Z d�dlZe�d�Z G�dd ��d ej�ZdS�) �����)�absolute_import)�unicode_literals)�commands)�OptionParser)�_N�dnfc�������������������@���s8���e�Zd�ZdZdZed�Zedd���Zdd��Z dd ��Z d S�)�ReinstallCommandzSA class containing methods needed by the cli to execute the reinstall command. )� reinstallZreizreinstall a packagec�����������������C���s"���|�j�ddtd�tjtd�d��d�S�)N�packages�+zPackage to reinstallZPACKAGE)�nargs�help�action�metavar)�add_argumentr���r���ZParseSpecGroupFileCallback)�parser��r����>/usr/lib/python3.9/site-packages/dnf/cli/commands/reinstall.py� set_argparser(���s�����zReinstallCommand.set_argparserc�����������������C���sH���|�j�j}d|_d|_d|_d|_t�|�j|�j���|�j j sDt�|�j��dS�)a��Verify that conditions are met so that this command can run. These include that the program is being run by the root user, that there are enabled repositories with gpg keys, and that this command is called with appropriate arguments. TN)Zcli�demandsZsack_activationZavailable_reposZ resolvingZ root_userr���Z_checkGPGKey�base�opts� filenamesZ_checkEnabledRepo)�selfr���r���r���r���� configure.���s����zReinstallCommand.configurec�����������������C���s���d}|�j�j|�jjd|�j�jjd�D�]N}z|�j��|��W�n4�tjj yh���t �td�|�j�jj �|j���Y�q 0�d}q |�jjdd��|�jjD���D��] }z|�j��|��W��n�tjj�y�}�zT|jD�]$}t �td�|�jj �|j����q�q�t �td�|�j�jj �|���W�Y�d�}~q�d�}~0��tjj�y��}�z`|jD�]L}d}|�j�j�|�}|�rVtd �|�}td �}t �||�j�jj �|�|���q.W�Y�d�}~q�d�}~0��tjj �y����Y�q�0�d}q�|�s�tj�td���d�S�)NF)�strict�progresszNo match for argument: %sTc�����������������S���s���g�|�]}d�|��qS�)�@r���)�.0�xr���r���r���� <listcomp>L��������z(ReinstallCommand.run.<locals>.<listcomp>z(Package %s available, but not installed.��z (from %s)z%Installed package %s%s not available.z!No packages marked for reinstall.)r���Zadd_remote_rpmsr���r����outputr���Zpackage_reinstallr���� exceptionsZMarkingError�logger�infor���ZtermZbold�locationZ pkg_specsZ grp_specsr ���ZPackagesNotInstalledErrorr ����nameZPackagesNotAvailableError�historyZrepo�Error)r���Zdone�pkgZpkg_spec�errZxmsgZpkgrepo�msgr���r���r����run=���sL����� � � � �zReinstallCommand.runN)�__name__� __module__�__qualname__�__doc__�aliasesr���Zsummary�staticmethodr���r���r.���r���r���r���r���r���!���s��� r���)Z __future__r���r���Zdnf.clir���Zdnf.cli.option_parserr���Zdnf.i18nr���Zdnf.exceptionsr���ZloggingZ getLoggerr%���ZCommandr���r���r���r���r����<module>���s���