a
©!c? ã @ sV d dl mZ d dl mZ d dlmZ d dlmZ d dlZd dlZ G dd„ dej
ƒZdS )é )Úabsolute_import)Úunicode_literals)Ú_)ÚcommandsNc @ s8 e Zd ZdZdZedƒ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 C sœ | j ddddtdƒd | j ddddtd ƒd | j d
dddtdƒd | j d
dddtdƒd | j ddddtdƒd | j dddddddg gtjd d S )Nz--allÚcheck_typesÚ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 ÚargparseÚSUPPRESS)Úparser© r ú:/usr/lib/python3.9/site-packages/dnf/cli/commands/check.pyÚ
set_argparser$ s2 þþþþþÿþzCheckCommand.set_argparserc C sx d| j j_| jjr<| jjr0| jj| jj | j_n| jj| j_| jjsPdh| j_nt| jjƒ| j_| jj j dg7 _ d S )NTr
)
ZcliZdemandsZsack_activationÚoptsr r ÚsetÚbaseÚconfZdisable_excludes)Úselfr r r Ú configure; s
ÿ
zCheckCommand.configurec C sj t ƒ }| jj ¡ ¡ }| jj ddh¡rœd }|D ]f}t |jƒt t |j ƒt |j
ƒ ƒB D ]Ì}t|ƒ d¡rnqZt
|j|gdƒsZt|ƒ d¡rô|d u r¤tj | j¡}tj |¡}|j t|ƒd tj |¡}| jjj|_|j|dd | ¡ }|rôqZtdƒ} | | | jjj |¡| jjj |¡¡¡ qZ|jD ]j}
|j|
gt|
ƒ ¡ d d
}|D ]B}d} | | | jjj |¡| jjj |
¡| jjj |¡¡¡ qRq.q2| jj ddh¡r4| j !|¡}
| "¡ #|
¡ $¡ }| %¡ D ]\\}}| &¡ |d
d … D ]<}tdƒ | jjj |d ¡| jjj |¡¡} | | ¡ qòqÖ| jj ddh¡r¾|D ]p}|j'D ]b}|j|gt|ƒ ¡ d d
}t
|ƒrVtdƒ | jjj |d ¡| jjj |¡¡} | | ¡ qVqL| jj ddh¡r2|D ]Z}|j(D ]L}||j|gdvràtdƒ} | | | jjj |¡| jjj |¡¡¡ qàqÖt)|ƒD ]} t*| ƒ q:|rftj+ ,d t
|ƒ¡¡‚d S )Nr
r Zrpmlib)r ú(F)ZselectZoptionalz{} has missing requires of {}r )r Únamez"{} has installed conflict "{}": {}r é z{} is a duplicate with {}r z{} is obsoleted by {}r z%{} provides {} but it cannot be foundzCheck discovered {} problem(s))-r r ÚsackÚqueryZ installedr r ÚintersectionZregular_requiresZrequires_preZprereq_ignoreinstÚstrÚ
startswithÚlenÚfilterÚdnfZ
rpmdb_sackÚselectorZSelectorÚgoalZGoalr! Zprotect_running_kernelÚinstallÚrunr ÚaddÚformatÚoutputZtermZboldÚ conflictsÚsplitZ_get_installonly_queryZ
duplicatedÚ
differenceZ
_name_dictÚitemsÚsortZ obsoletesr ÚsortedÚprintÚ
exceptionsÚError)r" Z
output_setÚqr' ÚpkgZrequirer/ r0 ZsolvedÚmsgZconflictZ
conflictedZconflict_pkgZinstallonlyZdupsr% ZpkgsÚdupZobsoleter Zprovider r r r2 I s”
&þ
ÿýþ
ÿ
þ
þÿzCheckCommand.runN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úaliasesr ZsummaryÚstaticmethodr r# r2 r r r r r s
r )Z
__future__r r Zdnf.i18nr Zdnf.clir r Zdnf.exceptionsr. ZCommandr r r r r Ú