????
Your IP : 3.144.222.234
3
�ft`f�@sPdZddlmZddlmZddlmZddlmZddlmZddl m
Z
ddlmZdd l
mZdd
lmZddlZddlZddl ZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZejd�Zd
d�Zdd�Z eee
fdd�Z!dd�Z"dd�Z#dd�Z$d dd�Z%e&dk�rLe%ej'dd�dd�dS)!z4
Entrance point for the yum command line interface.
�)�print_function)�absolute_import)�unicode_literals)�Conf)�Cli)�OptionParser)�ucd)�show_lock_owner)�_N�dnfcCs&tjtjjddd�tjt|��dS)N�T)�exc_info�)�logger�logr�logging�SUBDEBUG�criticalr)�e�r�/usr/lib/python3.6/main.py�
ex_IOError2srcCs6tjtjjddd�|jdk r2tjtd�t|��dS)NrT)r
z Error: %sr) rrrrr�valuerr
r)rrrr�ex_Error8s
rcCs�y6tjj�tjjj|���}t||||�SQRXW�n�tjjk
rr}ztj |j
�t|j�dSd}~X�nLtjj
k
r�}ztj |j
�dSd}~X�ntjjk
r�}zdSd}~X�n�tjjk
�r�}zt|�Sd}~Xn�tjk
�r$}ztj td�t|��dSd}~Xn�tjjk
�r\}ztj td�t|��dSd}~Xnbtk
�r�}zt|�Sd}~Xn>tk
�r�}z tj djt|�jtd���dSd}~XnXdS)N��rz Error: %sz{}: {}zTerminated.)rZi18nZsetup_stdout�cliZBaseCli�_main�
exceptionsZProcessLockErrorrrrr �pid� LockError�
DepsolveError�Errorr�hawkey� Exceptionr
r�libdnf�error�IOErrorr�KeyboardInterrupt�format�type�__name__)�argsZ
conf_class� cli_classZoption_parser_class�baserrrr�main?s4
r.cCsb|jj�||�}y|jttt|��|��Wn(ttfk
rV}zt|�Sd}~XnXt ||�S)z2Run the dnf program from a command line interface.N)
Z_loggingZ _presetupZ configure�list�maprr&�OSErrorr�cli_run)r-r+r,Z
option_parserrrrrrr\s
rc,Cs�ytd�}WnFtk
rR}z*|jtjkrBtjtd��tjd�WYdd}~Xn
X|j �y|j
�Wn@tjj
k
r��Yn(ttfk
r�}zt|�Sd}~XnX|jj�r�yt||�}W�ntjjk
�r�}z�t|�d}|jj�r|jjdd��r|td�jd�7}|jjj�rN|�s<|td �jd
�7}n|td�jd
�7}|jjj�r�|jjjd�}|tjjk�r�|�s�|td
�jd�7}n|td�jd�7}|�r�tjdj|���WYdd}~XnX|�r�|S|jj �|jj!S)N�.z8No read/execute access in current directory, moving to /�/rT)Z availablez?try to add '{}' to command line to replace conflicting packagesz--allowerasingz.try to add '{}' to skip uninstallable packagesz
--skip-brokenz' or '{}' to skip uninstallable packages�bestz7try to add '{}' to use not only best candidate packagesz--nobestz0 or '{}' to use not only best candidate packagesz({}))"�openr&�errnoZEACCESrrr
�os�chdir�closeZrunrrrr1r�demands� resolvingr r�
allow_erasingZ_goalZproblem_conflictsr(r-Zconf�strictr5Z
_get_priorityZPRIO_MAINCONFIG�info�commandZrun_transactionZsuccess_exit_status)rr-�fr�ret�msgZpriorrrr2msT
r2cCs
|jdkr&|j|jj�tjtd��|jj�g}|jj dk rN|j
|jj �y|j|d�Wn�tj
jk
r�}ztjt|��dSd}~Xnvtjjk
r�}z$x|jj|�D]}tj|�q�WdSd}~Xn4tk
�r�}zt|�Sd}~XnXtjtd��dS)z9Perform the depsolve, download and RPM transaction stage.NzDependencies resolved.)Zdisplayrz Complete!r)ZtransactionZresolver;r=rr?r
r@Zrun_resolvedZtransaction_display�appendZdo_transactionrrZCliErrorr%rrZTransactionCheckErrorZget_error_outputrr&r)rr-Zdisplays�exc�errrCrrrrr<�s(
r<FcCst|�}|rtj|�|S)apCall one of the multiple main() functions based on environment variables.
:param args: command line arguments passed into yum
:param exit_code: if *exit_code* is True, this function will exit
python with its exit code when it has finished executing.
Otherwise, it will return its exit code.
:return: the exit code from dnf.yum execution
)r.�sys�exit)r+� exit_codeZerrcoderrr� user_main�s
rJ�__main__rT)rI)F)(�__doc__Z
__future__rrrZdnf.confrZdnf.cli.clirZdnf.cli.option_parserrZdnf.i18nrZ
dnf.cli.utilsr r
Zdnf.clirZdnf.exceptionsZdnf.loggingZdnf.utilr7r"Zlibdnf.errorr$rr8Zos.pathrGZ getLoggerrrrr.rr2r<rJr*�argvrrrr�<module>sB
5