403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/1/cwd/usr/lib/python3.12/site-packages/dnf/cli/commands/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/1/cwd/usr/lib/python3.12/site-packages/dnf/cli/commands/__pycache__/__init__.cpython-312.pyc
�

�(fL~��p�dZddlmZddlmZddlmZddlmZddlZ	ddl
Z	ddlZ	ddlZ	ddl
Z
ddlZe
jd�Zed�d	zZed
�dzZed�Zd
�Zdd�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�Zy)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���|jjsy|j�s�|jj	�D]�}|js
|j
s�|jr�)tjdtjtjj���tjtd�|�tjj �yy)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)�conf�gpgcheck�_gpg_key_check�repos�iter_enabled�
repo_gpgcheck�gpgkey�logger�critical�gpg_msg�formatr�util�MAIN_PROG_UPPERr�cli�CliError)�baser�repos   �>/usr/lib/python3.12/site-packages/dnf/cli/commands/__init__.py�_checkGPGKeyr:s����9�9������� ��J�J�+�+�-�D��
�
��!3�!3�T�[�[�����'�.�.�c�h�h�>V�>V�.�*W�X�����":� ;�T�B��g�g�&�&�&�	.�!�c���|jj�ry|D]f}|jd�r!tjj|�rytjjj|�d}|dvs�fytd�jdj|jj��}tjj|��)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�_any_enabled�endswith�os�path�existsr�pycomp�urlparserr�joinr�reposdirrr)r�possible_local_files�lfile�scheme�msgs     r�_checkEnabledRepor1Ks����z�z��� ��%���>�>�&�!�b�g�g�n�n�U�&;�����$�$�-�-�e�4�Q�7���5�5��&��8�
9�
@�
@����T�Y�Y�M_�M_�A`�
a�C�

�'�'�
�
�3�
�rc�|�eZdZdZgZdZdZd�Zed��Z	ed��Z
ed��Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zy)�Commandz%Abstract base class for CLI commands.�Nc��||_y�N)r)�selfrs  r�__init__zCommand.__init__fs	����rc�.�|jjSr6)rr�r7s rrzCommand.basejs���x�x�}�}�rc� �|jdS)Nr)�aliasesr:s r�_basecmdzCommand._basecmdos���|�|�A��rc�B�|jjjSr6)rr�outputr:s rr?zCommand.outputss���x�x�}�}�#�#�#rc��y)z4Define command specific options and arguments. #:apiN�)r7�parsers  r�
set_argparserzCommand.set_argparserw���rc��y)z*Do any command-specific pre-configuration.NrAr:s r�
pre_configurezCommand.pre_configure{���	
rc��y)z&Do any command-specific configuration.NrAr:s r�	configurezCommand.configure�rGrc�~�t|tjj�rtt
fSt
d|z��)z.Get suggestions for resolving the given error.zerror not supported yet: %s)�
isinstancer�
exceptions�TransactionCheckError�_RPM_VERIFY�_RPM_REBUILDDB�NotImplementedError)r7�errors  r�get_error_outputzCommand.get_error_output�s2���e�S�^�^�A�A�B���0�0�!�"?�%�"G�H�Hrc��y)zExecute the command.NrAr:s r�runzCommand.run�rGrc��y)z$Finalize operation after resolvementNrAr:s r�run_resolvedzCommand.run_resolved�rDrc��y)z%Finalize operations post-transaction.NrAr:s r�run_transactionzCommand.run_transaction�rDr)�__name__�
__module__�__qualname__�__doc__r<�summary�optsr8�propertyrr=r?rCrFrIrRrTrVrXrArrr3r3_sy��/��G��G��D�����������$��$�
�
�

�
I�
�

�
rr3c	�Z�eZdZdZdZed�ZdZddddd	d
ddeh	Ze	d
��Z
d�Zd�Zy)�InfoCommandzRA class containing methods needed by the cli to execute the
    info command.
    )�info�ifz4display details about a package or group of packages�all�	available�	installed�extras�updates�upgrades�
autoremove�recent�	obsoletesc��|j�}|jdddddtd���|jddddtd	��
�|jddddtd
��
�|jddddtd��
�|jddddtd��
�|jddddtd��
�|jddddtd��
�|jddddtd��
�|jddtd�|j|jt
jtd���y) N�--all�_packages_action�store_constrd�show all packages (default)��dest�action�const�default�help�--availablere�show only available packages�rsrtrurw�--installedrf�show only installed packages�--extrasrg�show only extras packages�	--updatesri�show only upgrades packages�
--upgrades�--autoremoverj�show only autoremove packages�--recentrk�#show only recently changed packages�packages�*�PACKAGEzPackage name specification��nargs�metavar�choicesrvrtrw)�add_mutually_exclusive_group�add_argumentr�
pkgnarrows�DEFAULT_PKGNARROWr�PkgNarrowCallback)�clsrB�narrowss   rrCzInfoCommand.set_argparser�s����5�5�7�����W�+=�$1���"#�$A�"B�	�	D�	���]�1C�$1��"#�$B�"C�	�	E�	���]�1C�$1��"#�$B�"C�	�	E�	���Z�.@�$1��"#�$?�"@�	�	B�	���[�/A�$1��"#�$A�"B�	�	D�	���\�0B�$1��"#�$A�"B�	�	D�	���^�2D�$1��"#�$C�"D�	�	F�	���Z�.@�$1��"#�$I�"J�	�	L�	���J�c�1�Y�<�$'�N�N�C�<Q�<Q�#/�#A�#A�!"�#?�!@�	�	Brc�,�|jj}d|_|jjr%|jj|j_|jj
dk7rd|_|jjr[|jjr4|jjdd|jjz�nd|j_|jj
dk(rd|j_yy)NTrf�--obsoletes�--rlrhri)	r�demands�sack_activationr^ro�packages_action�available_reposrl�_option_conflict�r7r�s  rrIzInfoCommand.configure�s����(�(�"�"��"&����9�9�%�%�(,�	�	�(B�(B�D�I�I�%��9�9�$�$��3�&*�G�#��9�9����y�y�)�)����)�)�-���	�	�@Z�@Z�9Z�[�,7��	�	�)��9�9�$�$�	�1�(2�D�I�I�%�2rc���|jj|j�|jj	d|jj
|jj�S)Nrb�r� _populate_update_security_filterr^r�output_packagesr�r�r:s rrTzInfoCommand.run��J�����1�1�$�)�)�<��y�y�(�(�����1J�1J�)-���);�);�=�	=rN)
rYrZr[r\r<rr]r�r��classmethodrCrIrTrArrrara�s\����G��F�G�G����{�H�i����+�7H�J�J��B��B�>
3�=rrac�*�eZdZdZdZed�Zd�Zy)�ListCommandzRA class containing methods needed by the cli to execute the
    list command.
    )�list�lsz$list a package or groups of packagesc���|jj|j�|jj	d|jj
|jj�S)Nr�r�r:s rrTzListCommand.run�r�rN)rYrZr[r\r<rr]rTrArrr�r��s����G��6�7�G�=rr�c�@�eZdZdZdZed�Zed��Zd�Z	d�Z
y)�ProvidesCommandzVA class containing methods needed by the cli to execute the
    provides command.
    )�provides�whatprovides�prov�wpz*find what package provides the given valuec�R�|jddtd�td���y)N�
dependency�+�PROVIDEz#Provide specification to search for�r�r�rw�r�r�rBs rrCzProvidesCommand.set_argparser�s)�����L��Q�y�\�!"�#H�!I�	�	Krc��|jj}d|_d|_d|_|j
jxjdgz
c_y)NTF�	filelists)rr�r��fresh_metadatar�rr�optional_metadata_typesr�s  rrIzProvidesCommand.configure�sD���(�(�"�"��"&���!&���"&����	�	���.�.�;�-�?�.rc��tjtd��|jj	|j
j�S)NzSearching Packages: )r�debugrrr�r^r�r:s rrTzProvidesCommand.run�s3�����Q�-�.�/��y�y�!�!�$�)�)�"6�"6�7�7rN�rYrZr[r\r<rr]�staticmethodrCrIrTrArrr�r��s8���9�G��<�=�G��K��K�@�8rr�c�@�eZdZdZdZed�Zed��Zd�Z	d�Z
y)�CheckUpdateCommandzZA class containing methods needed by the cli to execute the
    check-update command.
    )�check-updatez
check-upgradez$check for available package upgradesc	�|�|jddddtd���|jddtd	��
�y)Nz--changelogs�
changelogsF�
store_truezshow changelogs before update)rsrvrtrwr�r�r�)r�r�r�r�s rrCz CheckUpdateCommand.set_argparsersC�����N��$)�,�!"�#B�!C�	�	E�	���J�c�1�Y�<��Hrc�x�|jj}d|_d|_d|_|j
jrd|_tjj|j
j�r*|jjxjdgz
c_
t|j�y)NTr�)rr�r�r��plugin_filtering_enabledr^r�rr�_is_file_pattern_presentr�rrr�r1r�s  rrIzCheckUpdateCommand.configures����(�(�"�"��"&���"&���+/��(��9�9���!%�G���8�8�,�,�T�Y�Y�-?�-?�@��I�I�N�N�2�2�{�m�C�2��$�)�)�$rc��|jj|jd��|jj	|jj
d|jj��}|rd|jj_|jjjr|jj�yy)N�gte)�cmp_typeT)�print_r��d)rr�r^r�
check_updatesr�r�r��success_exit_statusr�autocheck_running_kernel�_check_running_kernel�r7�founds  rrTzCheckUpdateCommand.runs������1�1�$�)�)�e�1�L��	�	�'�'��	�	�(:�(:�4�37�9�9�3G�3G�(�I���36�D�H�H���0��9�9�>�>�2�2��H�H�*�*�,�3rNr�rArrr�r��s7���0�G��6�7�G��I��I�	%�	-rr�c�T��eZdZdZGd�de�ZGd�de�ZGd�de�ZGd�d	e�ZGd
�de�Z	Gd�d
e�Z
Gd�de�ZGd�de�ZGd�de�Z
Gd�de�ZGd�de�Zeeeee	e
eee
eehZdZed�Z�fd�Zd�Zd�Zd�Z�xZS)�RepoPkgsCommandz2Implementation of the repository-packages command.c� �eZdZdZdZd�Zd�Zy)�%RepoPkgsCommand.CheckUpdateSubCommand�'Implementation of the info sub-command.)r�c�L�|jj}d|_d|_y�NT)rr�r�r�r�s  rrIz/RepoPkgsCommand.CheckUpdateSubCommand.configure+s!���h�h�&�&�G�&*�G�#�&*�G�#rc��|jj|jj|jd��}|rd|j
j_yy)�?Execute the command with respect to given arguments *cli_args*.T)r�r�N)rr�r^�	pkg_specs�reponamerr�r�r�s  r�run_on_repoz1RepoPkgsCommand.CheckUpdateSubCommand.run_on_repo0sK���I�I�+�+�D�I�I�,?�,?�,0�M�M�$�,�H�E��7:���� � �4�rN�rYrZr[r\r<rIr�rArr�CheckUpdateSubCommandr�&s��5�#��	+�
	;rr�c� �eZdZdZdZd�Zd�Zy)�RepoPkgsCommand.InfoSubCommandr�)rbc���|jj}d|_|jjr%|jj|j_|jj
dk7rd|_|jjr\|jjr4|jjdd|jjz�yd|j_yy)NTrfr�r�rl)	rr�r�r^�_pkg_specs_action�pkg_specs_actionr�rlr�r�s  rrIz(RepoPkgsCommand.InfoSubCommand.configure<s����h�h�&�&�G�&*�G�#��y�y�*�*�-1�Y�Y�-H�-H��	�	�*��y�y�)�)�[�8�*.��'��y�y�"�"��9�9�.�.��H�H�-�-�m�T�D�I�I�D_�D_�=_�`�1<�D�I�I�.�	#rc���|jj|j�|jj	d|jj
|jj|j�y)r�rbN�rr�r^rr�r�r�r�r:s rr�z*RepoPkgsCommand.InfoSubCommand.run_on_repoI�L���H�H�5�5�d�i�i�@��I�I�%�%�f�d�i�i�.H�.H�&*�i�i�&9�&9�4�=�=�
JrNr�rArr�InfoSubCommandr�7s��5���	=�	Jrr�c� �eZdZdZdZd�Zd�Zy)�!RepoPkgsCommand.InstallSubCommandz*Implementation of the install sub-command.)�installc�h�|jj}d|_d|_d|_d|_yr��rr�r�r��	resolving�	root_userr�s  rrIz+RepoPkgsCommand.InstallSubCommand.configureT�1���h�h�&�&�G�&*�G�#�&*�G�#� $�G�� $�G�rc��|jj|j�	t|j|j�d}|jj
s*	|jj
d|j�d}nD|jj
D]+}	|jj
||j�d}�-|s(tjj'td���y#tjj$r!tjtd��Y�hwxYw#tjj$ri}dj|j|jj j"j%|��}tj|�Yd}~��d}~wwxYw)NFr�T�No package available.z{}: {}zNo packages marked for install.)rr�r^rrr�r�r�rrL�MarkingErrorrrbrr�valuer?�term�bold�Error)r7�done�pkg_spec�er0s     rr�z-RepoPkgsCommand.InstallSubCommand.run_on_repo[sI���H�H�5�5�d�i�i�@�Q�����D�H�H�-��D��9�9�&�&� ��I�I�%�%�c�4�=�=�9� �D�!%�	�	� 3� 3�H�$��	�	�)�)�(�D�M�M�B�
 $��!4���n�n�*�*�1�-N�+O�P�P����~�~�2�2�<��K�K��"9� :�;�<���>�>�6�6�)�&�o�o�a�g�g�t�y�y�7G�7G�7L�7L�7Q�7Q�RZ�7[�\�����C�(�(��)�s+� &C8�#&D9�8;D6�5D6�9F?�AF:�:F?Nr�rArr�InstallSubCommandr�Os��8���	%�	Qrr�c��eZdZdZdZd�Zy)�RepoPkgsCommand.ListSubCommandz'Implementation of the list sub-command.)r�c���|jj|j�|jj	d|jj
|jj|j�y)r�r�Nr�r:s rr�z*RepoPkgsCommand.ListSubCommand.run_on_repo}r�rN)rYrZr[r\r<r�rArr�ListSubCommandr�xs��5���	Jrr�c� �eZdZdZdZd�Zd�Zy)� RepoPkgsCommand.MoveToSubCommandz*Implementation of the move-to sub-command.)zmove-toc�h�|jj}d|_d|_d|_d|_yr��rr�r�r�r�r�r�s  rrIz*RepoPkgsCommand.MoveToSubCommand.configure�r�rc	��t|j|j�d}|jjs+	|jjd|j��d}nE|jjD],}	|jj||j��d}�.|s(tjj+td
���y#tjj$r!tjtd��Y�htjj$r!tjtd��Y��tjj$rJd��wxYw#tjj$r%td�}tj||�Y��;tjj$r�}|jD]~}d	}|jj j#|�}|rtd
�|z}td�}tj||j$j&j)|�|���Yd}~���d}~wtjj$rJd��wxYw)r�Fr�)�new_reponameTzNo package installed.r��+Only the above marking errors are expected.�No match for argument: %sr4�
 (from %s)�%Installed package %s%s not available.N�Nothing to do.)rrrr^r��	reinstallr�rrL�PackagesNotInstalledErrorrrbr�PackagesNotAvailableErrorr�r��historyrr?r�r�r�)r7r�r�r0�err�pkg�xmsg�pkgrepos        rr�z,RepoPkgsCommand.MoveToSubCommand.run_on_repo�s�������D�H�H�-��D��9�9�&�&�	 ��I�I�'�'��$�-�-�'�H� �D�!%�	�	� 3� 3�H�$��	�	�+�+�H�4�=�=�+�Q�  $��%!4�(��n�n�*�*�1�-=�+>�?�?���=�~�~�?�?�<��K�K��"9� :�;��~�~�?�?�<��K�K��"9� :�;��~�~�2�2�P�O�"O�O�5�P���>�>�C�C�3�� ;�<�����C��2��>�>�C�C�O�#&�<�<�C�#%�D�&*�i�i�&7�&7�&<�&<�S�&A�G�&�'(����'@��"#�$K�"L�C�"�K�K��T�[�[�-=�-=�-B�-B�3�-G��N�
$0���>�>�6�6�M�M�L�M�u�M�s6�'C�>'E4�;E1�:E1�
$E1�4>J�5J�B
I$�$(JNr�rArr�MoveToSubCommandr�s��8���	%�)	@rrc� �eZdZdZdZd�Zd�Zy)�&RepoPkgsCommand.ReinstallOldSubCommandz0Implementation of the reinstall-old sub-command.)z
reinstall-oldc�h�|jj}d|_d|_d|_d|_yr�rr�s  rrIz0RepoPkgsCommand.ReinstallOldSubCommand.configure�r�rc	�J�t|j|j�d}|jjs5	|jjd|j|j�d}nO|jjD]6}	|jj||j|j�d}�8|s(tjj+td���y#tjj$r#td�}tj|�Y�jtjj$r!tjtd��Y��tjj$rJd��wxYw#tjj$r%td�}tj||�Y��Gtjj$r�}|jD]~}d}|jj j#|�}|rtd	�|z}td
�}tj||j$j&j)|�|���Yd}~���d}~wtjj$rJd��wxYw)
r�Fr�T�)No package installed from the repository.r�rrr4rrNr	)rrrr^r�r
r�rrLrrrrbrr�r�r
rr?r�r�r�)r7r�r0r�rrrrs        rr�z2RepoPkgsCommand.ReinstallOldSubCommand.run_on_repo�s
������D�H�H�-��D��9�9�&�&�
 ��I�I�'�'��T�]�]�D�M�M�J� �D�!%�	�	� 3� 3�H�$��	�	�+�+�H�d�m�m�,0�M�M�;�" $��'!4�*��n�n�*�*�1�-=�+>�?�?���A�~�~�?�?�%��G�H�C��K�K��$��~�~�?�?�<��K�K��"9� :�;��~�~�2�2�P�O�"O�O�5�P���>�>�C�C�3�� ;�<�����C��2��>�>�C�C�O�#&�<�<�C�#%�D�&*�i�i�&7�&7�&<�&<�S�&A�G�&�'(����'@��"#�$K�"L�C�"�K�K��T�[�[�-=�-=�-B�-B�3�-G��N�
$0���>�>�6�6�M�M�L�M�u�M�s6�1C(�1F
�(=F�':F�#$F�
>J"�J"�'B
I:�:(J"Nr�rArr�ReinstallOldSubCommandr�s��>�$��	%�+	@rrc�2��eZdZdZdZ�fd�Zd�Zd�Z�xZS)�#RepoPkgsCommand.ReinstallSubCommandz,Implementation of the reinstall sub-command.)r
c���ttj|�|�tj	|�tj|�f|_y)�Initialize the command.N)�superr��ReinstallSubCommandr8rr�wrapped_commands)r7r�	__class__s  �rr8z,RepoPkgsCommand.ReinstallSubCommand.__init__�s?����/�5�5�t�E�c�J�%4�%K�%K�C�%P�%4�%E�%E�c�%J�%L�D�!rc��d|jj_|jD]4}|j|_|j
|_|j
��6yr�)rr�r�rr^r�rI�r7�commands  rrIz-RepoPkgsCommand.ReinstallSubCommand.configure�sG��/3�D�H�H���,��0�0��#�y�y���#'�=�=�� ��!�!�#�1rc��t|j|j�|jD]}	|j	�yt
jjtd���#t
jj$rY�^wxYw)r�z!No packages marked for reinstall.N)	rrrrr�rrLr�rr"s  rr�z/RepoPkgsCommand.ReinstallSubCommand.run_on_reposu������D�H�H�-��0�0����'�'�)��
1��n�n�*�*�1�-P�+Q�R�R���~�~�+�+����s�A,�,B�B)	rYrZr[r\r<r8rIr��
__classcell__�r s@rrr�s���:� ��	L�	$�	Srrc�&�eZdZdZdZd�Zd�Zd�Zy)�,RepoPkgsCommand.RemoveOrDistroSyncSubCommandz8Implementation of the remove-or-distro-sync sub-command.)zremove-or-distro-syncc�h�|jj}d|_d|_d|_d|_yr�r�r�s  rrIz6RepoPkgsCommand.RemoveOrDistroSyncSubCommand.configurer�rc��|jjjj|�tj
j
|�}|j|jjj�}|jjj}|j�D�cgc]}|j|�|k(r|��}}|s tjjd|��|j�}|jjjj}	|D]�}
|j!|
j"|
j$��r0|jjj&j)|
��Z|jjj&j+|
|	����ycc}w)z;Synchronize a package with another repository or remove it.zno package matched)�name�arch)�
clean_depsN)rr�sack�disable_repor�subject�Subject�get_best_queryr
rfrrLrrer�clean_requirements_on_remove�filterr+r,�_goal�distupgrade�erase)r7r�r�r0�matchesr
rrfrer-�packages           r�_replacez5RepoPkgsCommand.RemoveOrDistroSyncSubCommand._replacesL���H�H�M�M���+�+�H�5��k�k�)�)�(�3�G��,�,�T�X�X�]�]�-?�-?�@�G��h�h�m�m�+�+�G�&�0�0�2�2�2���<�<��$��0��2�
�2���n�n�>�>�(�(�4�4��)�)�+�I������+�+�H�H�J�$���#�#����G�L�L�#�I��H�H�M�M�'�'�3�3�G�<��H�H�M�M�'�'�-�-�g�*�-�M�	%��2s�0F;c��t|j|j�d}|jjs 	|jd|j�d}n:|jjD]!}	|j||j�d}�#|s(tjjtd���y#tjj$r#td�}tj|�Y�jwxYw#tjj$r$td�}tj||�Y��wxYw)r�Fr�Trrr	N)rrrr^r�r:r�rrLrrrrbr��r7r�r0r�s    rr�z8RepoPkgsCommand.RemoveOrDistroSyncSubCommand.run_on_repo3s������D�H�H�-��D��9�9�&�&� ��M�M�#�t�}�}�5�
 �D�!%�	�	� 3� 3�H�$��
�
�h��
�
�>�
 $��!4���n�n�*�*�1�-=�+>�?�?���!�~�~�?�?�%��G�H�C��K�K��$�%���>�>�C�C�3�� ;�<�����C��2�3�s#�B>�3D�>=C>�=C>�>E�EN)rYrZr[r\r<rIr:r�rArr�RemoveOrDistroSyncSubCommandr(s��F�,��	%�	N�*	@rr=c� �eZdZdZdZd�Zd�Zy)�+RepoPkgsCommand.RemoveOrReinstallSubCommandz6Implementation of the remove-or-reinstall sub-command.)zremove-or-reinstallc�h�|jj}d|_d|_d|_d|_yr�rr�s  rrIz5RepoPkgsCommand.RemoveOrReinstallSubCommand.configureUr�rc�t�t|j|j�d}|jjs7	|jjd|j|jd��d}nQ|jjD]8}	|jj||j|jd��d}�:|s(tjjtd���y	#tjj$r#td�}tj|�Y�jtjj$rJd��wxYw#tjj$r%td�}tj||�Y��
tjj$rJd��wxYw)
r�Fr�T)�old_reponame�new_reponame_neq�	remove_narz)Only the above marking error is expected.rr	N)rrrr^r�r
r�rrLrrrrbr�r�r<s    rr�z7RepoPkgsCommand.RemoveOrReinstallSubCommand.run_on_repo\so������D�H�H�-��D��9�9�&�&�
 ��I�I�'�'��$�-�-�9=���26�(�8� �D�!%�	�	� 3� 3�H�
$��	�	�+�+�$�4�=�=�-1�]�]�d�,�L� $��!4���n�n�*�*�1�-=�+>�?�?���-�~�~�?�?�%��G�H�C��K�K��$��~�~�2�2�N�M�"M�M�5�N���>�>�C�C�3�� ;�<�����C��2��>�>�6�6�R�Q�&Q�Q�u�R�s#�3C,�
3E�,=E�+$E�>F7�$F7Nr�rArr�RemoveOrReinstallSubCommandr?Ps��D�*��	%�#	@rrEc� �eZdZdZdZd�Zd�Zy)� RepoPkgsCommand.RemoveSubCommandz)Implementation of the remove sub-command.)�removec�v�|jj}d|_d|_d|_d|_d|_y)NTF)rr�r��
allow_erasingr�r�r�r�s  rrIz*RepoPkgsCommand.RemoveSubCommand.configure�s9���h�h�&�&�G�&*�G�#�$(�G�!�&+�G�#� $�G�� $�G�rc�h�d}|jjs*	|jjd|j�d}nD|jjD]+}	|jj||j�d}�-|stjtd��yy#t
jj$r#td�}tj|�Y�awxYw#t
jj$r(}tjt|��Yd}~��d}~wwxYw)r�Fr�TrNzNo packages marked for removal.)
r^r�rrHr�rrLr�rrrb�str�warning)r7r�r0r�r�s     rr�z,RepoPkgsCommand.RemoveSubCommand.run_on_repo�s����D��9�9�&�&� ��I�I�$�$�S�$�-�-�8�
 �D�!%�	�	� 3� 3�H�$��	�	�(�(��4�=�=�A� $��
!4�����q�!B�C�D����~�~�2�2�%��G�H�C��K�K��$�%���>�>�6�6�,����C��F�+�+��,�s)�&B)�&C,�)=C)�(C)�,D1�	D,�,D1Nr�rArr�RemoveSubCommandrG�s��7���	%�	ErrNc� �eZdZdZdZd�Zd�Zy)�!RepoPkgsCommand.UpgradeSubCommandz*Implementation of the upgrade sub-command.)�upgradez
upgrade-toc�h�|jj}d|_d|_d|_d|_yr�rr�s  rrIz+RepoPkgsCommand.UpgradeSubCommand.configure�r�rc�$�t|j|j�d}|jjs(|jj|j�d}nD|jjD]+}	|jj||j�d}�-|s(tjjtd���y#tjj$r"tjtd�|�Y��wxYw)r�FTrzNo packages marked for upgrade.N)rrrr^r��upgrade_allr�rQrrLr�rrbrr�)r7r�r�s   rr�z-RepoPkgsCommand.UpgradeSubCommand.run_on_repo�s�������D�H�H�-��D��9�9�&�&��	�	�%�%�d�m�m�4���!%�	�	� 3� 3�H�$��	�	�)�)�(�D�M�M�B� $��
!4���n�n�*�*�1�-N�+O�P�P����>�>�6�6�N����A�&A�$B�H�M�N�s�;&C�<D�DNr�rArr�UpgradeSubCommandrP�s��8�+��	%�	QrrU)zrepository-packagesz	repo-pkgsz
repo-packageszrepository-pkgsz7run commands on top of all packages in given repositoryc�����tt|����fd�|jD�}d|_|D��cic]}|j
D]}||���c}}|_ycc}}w)rc3�.�K�|]}|�����y�wr6rA)�.0�subcmdrs  �r�	<genexpr>z+RepoPkgsCommand.__init__.<locals>.<genexpr>�s�����>��v�v�c�{��s�N)rr�r8�SUBCMDSrYr<�_subcmd_name2obj)r7r�subcmd_objsrY�aliasr s `   �rr8zRepoPkgsCommand.__init__�s[���
�o�t�-�c�2�>����>�����(3�!Q�(3�f�����E�6�M��E��!Q����!Qs�Ac��|j�}|jdddddtd���|jddddtd	��
�|jddddtd
��
�|jddddtd��
�|jddddtd��
�|jddddtd��
�|jddddtd��
�|jddddtd��
�|jddtjtd�td���|j
D�cgc]}|jd ��}}|j
D��cgc]}|jD]}|���}}}|jd!dd"|d#j|��$�d}|ddddd%ddh}|jd&d'td(�||tjtd)��*�ycc}wcc}}w)+Nrnr�rprdrqrrrxreryrzr{rfr|r}rgr~rrir�r�r�rjr�r�rkr�r���REPOIDz
Repository ID)r�rtr�rwrrY�
SUBCOMMANDz, )r�r�r�rwrlr�r�r�zPackage specificationr�)	r�r�rr�_RepoCallbackEnabler[r<r+r�)	r7rBr�rY�subcommand_choicesr^�subcommand_choices_allr�r�s	         rrCzRepoPkgsCommand.set_argparser�s_���5�5�7�����W�+>�$1���"#�$A�"B�	�	D�	���]�1D�$1��"#�$B�"C�	�	E�	���]�1D�$1��"#�$B�"C�	�	E�	���Z�.A�$1��"#�$?�"@�	�	B�	���[�/B�$1��"#�$A�"B�	�	D�	���\�0C�$1��"#�$A�"B�	�	D�	���^�2E�$1��"#�$C�"D�	�	F�	���Z�.A�$1��"#�$I�"J�	�	L�	����a��(H�(H��h�K�a��&8�	�	:�?C�l�l�K�l�F�f�n�n�Q�/�l��K�6:�l�l�!_�l�F�PV�P^�P^�u�%�P^�%�l��!_����H�A�|�$:����K]�A^�	�	`�!��'��k�"�H�k�8� �"�
�	���K�s�A�i�L�$.�8I�#/�#A�#A�!"�#:�!;�	�	=��L��!_s�G<�5Hc���	|j|jjd|_|j|j_|jjd|j_	|jj�y#tjj
tf$rC}|jjj�tjj
�d}~wwxYw)z8Verify whether the command can run with given arguments.rN)r\r^rYrrr�KeyError�	optparser�print_usager�rI)r7r�s  rrIzRepoPkgsCommand.configure	s���	#��/�/��	�	�0@�0@��0C�D�D�K� �9�9�����#�y�y�1�1�!�4��������������� � �(�+�	#��H�H���*�*�,��'�'�"�"�"��	#�s�+B�#C1�.>C,�,C1c�8�|jj�y)z>Execute the command with respect to given arguments *extcmds*.N)rYr�r:s rrTzRepoPkgsCommand.runs�������!r)rYrZr[r\r3r�r�r�r�rrrr=rErNrUr[r<rr]r8rCrIrTr%r&s@rr�r�#s����<�;��;�"J��J�0'Q�G�'Q�R	J��	J�5@�7�5@�n7@��7@�rS�g�S�><@�w�<@�|/@�g�/@�b&E�7�&E�P!Q�G�!Q�F%�n�6G��/�1G�"�$@�*�,<� �	"�G�@�G��I�J�G�Q�)=�V
 �"rr�c�:�eZdZdZdZed�Zed��Zd�Z	y)�HelpCommandzRA class containing methods needed by the cli to execute the
    help command.
    )rwzdisplay a helpful usage messagec��|jddtd�td�jtjj
����y)N�cmd�?�COMMANDz{prog} command to get help forr	r�)r�rrrrrr�s rrCzHelpCommand.set_argparser!sG�����E��a�	�l�!"�#C�!D�!K�!K�%(�X�X�%=�%=�"L�"?�	�	@rc��|jjr,|jj|jjvr%|jjj�y|jj|jj}|jjj||��yr6)r^rnr�cli_commandsrh�
print_helpr"s  rrTzHelpCommand.run'su���	�	�
�
��9�9�=�=����(=�(=�=��H�H���)�)�+��h�h�+�+�D�I�I�M�M�:�G��H�H���)�)�'�$�-�8rN)
rYrZr[r\r<rr]r�rCrTrArrrlrls2����G��1�2�G��@��@�
9rrl)rA)r\�
__future__rr�dnf.cli.option_parserr�dnf.i18nr�dnf.clir�dnf.exceptions�
dnf.pycomp�dnf.util�loggingr&�	getLoggerrrNrOrrr1�objectr3rar�r�r�r�rlrArr�<module>r~s���(�&�'�.�������	�	��	�	�5�	!���=�>�"�#���+�,�.?�@���G�H��'�" �(7
�f�7
�r==�'�==�~=�+�=�8�g�8�0#-��#-�Lt"�g�t"�l9�'�9r

Youez - 2016 - github.com/yon3zu
LinuXploit