AlkantarClanX12

Your IP : 18.188.140.232


Current Path : /proc/self/root/usr/lib/python3.6/site-packages/dnf/cli/commands/__pycache__/
Upload File :
Current File : //proc/self/root/usr/lib/python3.6/site-packages/dnf/cli/commands/__pycache__/check.cpython-36.pyc

3

�ft`?�@sVddlmZddlmZddlmZddlmZddlZddlZ	Gdd�dej
�ZdS)�)�absolute_import)�unicode_literals)�_)�commandsNc@s8eZdZdZdZed�Zedd��Zdd�Z	dd	�Z
d
S)�CheckCommandzSA class containing methods needed by the cli to execute the check
    command.
    �checkz#check for problems in the packagedbc	Cs�|jddddtd�d�|jddddtd	�d�|jd
dddtd�d�|jd
dddtd�d�|jddddtd�d�|jdddddddggtjd�dS)Nz--all�check_typesZappend_const�allzshow all problems; default)�dest�action�const�helpz--dependencies�dependencieszshow dependency problemsz--duplicates�
duplicateszshow duplicate problemsz--obsoleted�	obsoletedzshow obsoleted packagesz
--provides�provideszshow problems with provides�check_yum_types�*)�nargs�choicesr
)�add_argumentr�argparseZSUPPRESS)�parser�r�/usr/lib/python3.6/check.py�
set_argparser$s$zCheckCommand.set_argparsercCsxd|jj_|jjr<|jjr0|jj|jj|j_n|jj|j_|jjsPdh|j_nt|jj�|j_|jjj	dg7_	dS)NTr	)
ZcliZdemandsZsack_activation�optsrr�set�base�confZdisable_excludes)�selfrrr�	configure;s
zCheckCommand.configurec	Cs�t�}|jjj�j�}|jjjddh��r�d}�x||D�]r}x�t|j�tt|j	�t|j
��BD]�}t|�jd�rtq`t
|j|gd��s`t|�jd�r�|dkr�tjj|j�}tjj|�}|jt|�d�tjj|�}|jjj|_|j|dd�|j�}|r�q`td�}	|j|	j|jjjj|�|jjjj|���q`Wxx|jD]n}
|j|
gt|
�j �d	d
�}xJ|D]B}d}	|j|	j|jjjj|�|jjjj|
�|jjjj|����q^W�q8Wq6W|jjjddh��rN|jj!|�}
|j"�j#|
�j$�}xl|j%�D]`\}}|j&�xL|d
d�D]<}td�j|jjjj|d	�|jjjj|��}	|j|	��qW�q�W|jjjddh��r�x||D]t}xl|j'D]b}|j|gt|�j �d	d
�}t
|��rttd�j|jjjj|d	�|jjjj|��}	|j|	��qtW�qhW|jjjddh��r\xf|D]^}xV|j(D]L}||j|gd�k�rtd�}	|j|	j|jjjj|�|jjjj|����qW�q�Wxt)|�D]}	t*|	��qfW|�r�tj+j,djt
|����dS)Nr	rZrpmlib)r�(F)ZselectZoptionalz{} has missing requires of {}r)r�namez"{} has installed conflict "{}": {}r�z{} is a duplicate with {}rz{} is obsoleted by {}rz%{} provides {} but it cannot be foundzCheck discovered {} problem(s))-rr�sackZqueryZ	installedrr�intersectionZregular_requiresZrequires_preZprereq_ignoreinst�str�
startswith�len�filter�dnfZ
rpmdb_sack�selectorZSelector�goalZGoalrZprotect_running_kernelZinstall�runr�add�format�outputZtermZboldZ	conflicts�splitZ_get_installonly_queryZ
duplicated�
differenceZ
_name_dict�items�sortZ	obsoletesr�sorted�print�
exceptions�Error)r Z
output_set�qr%ZpkgZrequirer,r-Zsolved�msgZconflictZ
conflictedZconflict_pkgZinstallonlyZdupsr#Zpkgs�dupZobsoleterZproviderrrr.Is�(
$


 zCheckCommand.runN)r)�__name__�
__module__�__qualname__�__doc__�aliasesrZsummary�staticmethodrr!r.rrrrrsr)Z
__future__rrZdnf.i18nrZdnf.clirrZdnf.exceptionsr+ZCommandrrrrr�<module>s