MOON
Server: Apache
System: Linux server2.shieldcogroup.com 3.10.0-1160.119.1.el7.tuxcare.els12.x86_64 #1 SMP Fri Nov 8 05:49:38 UTC 2024 x86_64
User: jacom (1029)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyc
�
�[/\c@@s�ddlmZmZddlmZddlZddlmZmZddl	Z
ddlZ
ddlZ
ddl
Z
ddlZddlZddlZddlZddlZddlZdZdZdZdZd	Zd
ZdZdZeeegZeeegZejd
�Zd�Z de!fd��YZ"de"fd��YZ#de#fd��YZ$de!fd��YZ%dS(i(tprint_functiontabsolute_import(tunicode_literalsN(t_tucdi
ii(i2i<iFiZidudnfc@st�fd��}|S(ub
    Wrapper to return a deprecated action constant
    while printing a deprecation warning.
    c@sEd|jj��f}tj|tdd�ttj��}|S(Nu1%s.%s is deprecated. Use dnf.callback.%s instead.t
stackleveli(t	__class__t__name__twarningstwarntDeprecationWarningtgetattrtdnftcallback(tselftmsgtvalue(tname(s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyt_func9s
(tproperty(RR((Rs4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyt_add_deprecated_action4stTransactionDisplaycB@s�eZd�Zed�Zed�Zed�ZeZed�Zed�Z	ed�Z
ed�Zed�Zed	�Z
ed
�Zed�Zd�Zd
�Zd�Zd�Zd�ZRS(cC@sdS(N((R((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyt__init__EsuPKG_CLEANUPu
PKG_DOWNGRADEu
PKG_REMOVEuPKG_INSTALLuPKG_OBSOLETEu
PKG_REINSTALLuPKG_UPGRADEu
PKG_VERIFYuTRANS_PREPARATIONu
PKG_SCRIPTLETu
TRANS_POSTcC@sdS(uReport ongoing progress on a transaction item. :api

        :param package: a package being processed
        :param action: the action being performed
        :param ti_done: number of processed bytes of the transaction
           item being processed
        :param ti_total: total number of bytes of the transaction item
           being processed
        :param ts_done: number of actions processed in the whole
           transaction
        :param ts_total: total number of actions in the whole
           transaction

        N((Rtpackagetactiontti_donetti_totaltts_donetts_total((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pytprogressVscC@sdS(u/msgs is the messages that were output (if any).N((Rtmsgs((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyt	scriptoutgscC@sdS(u:Report an error that occurred during the transaction. :apiN((Rtmessage((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyterrorkscC@sdS(u|package is the same as in progress() - a package object or simple
           string action is also the same as in progress()N((RRR((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pytfilelogoscC@s&|j|tjjdd||�dS(Nid(RRttransactiont
PKG_VERIFY(Rtpkgtcountttotal((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pytverify_tsi_packageus(Rt
__module__RRtPKG_CLEANUPt
PKG_DOWNGRADEt
PKG_REMOVEt	PKG_ERASEtPKG_INSTALLtPKG_OBSOLETEt
PKG_REINSTALLtPKG_UPGRADER$tTRANS_PREPARATIONt
PKG_SCRIPTLETt
TRANS_POSTRRR!R"R((((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyRCs$					tErrorTransactionDisplaycB@seZdZd�ZRS(u@An RPMTransaction display that prints errors to standard output.cC@s3tt|�j|�tjjd|tj�dS(Nuprint(tsuperR5R!Rtutilt_terminal_messengertsyststderr(RR ((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR!~s(RR)t__doc__R!(((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR5zstLoggingTransactionDisplaycB@s)eZdZd�Zd�Zd�ZRS(u@
    Base class for a RPMTransaction display callback class
    cC@s)tt|�j�tjd�|_dS(Nudnf.rpm(R6R<Rtloggingt	getLoggert
rpm_logger(R((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR�scC@s|jj|�dS(N(R?R!(RR ((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR!�scC@s=tjj|}d||f}|jjtjj|�dS(Nu%s: %s(RR#tFILE_ACTIONSR?tlogR=tSUBDEBUG(RRRt
action_strR((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR"�s(RR)R;RR!R"(((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR<�s		tRPMTransactioncB@s�eZedd�Zdd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cC@s�|st�g}n||_||_||_t|_d|_d|_d|_	d|_
t�|_d|_
t|_|j|jj�g|_d|_d|_dS(Ni(R5tdisplaystbasettesttFalset
trans_runningtNonetfdt
total_actionsttotal_installedtcomplete_actionstsettinstalled_pkg_namest
total_removedR"t_setupOutputLoggingtconftrpmverbosityt_te_listt	_te_indext
_tsi_cache(RRFRGRE((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR�s"												uinfocC@s�tj�}||_t|jd�|_|jjj|j�idd6dd6dd6dd	6d
d6j	||�}d|j
�}tt|�s�d
}ntj
tt|��tj|j�dS(Nuw+bucritucriticaluemergu	emergencyuerruerroruinfouinformationuwarninguwarnuRPMLOG_uRPMLOG_INFO(ttempfiletNamedTemporaryFilet	_readpipetopenRt
_writepipeRFt_tstsetScriptFdtgettupperthasattrtrpmtsetVerbosityRt
setLogFile(RRTtio_r((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyRR�s	
	cC@s?tjtj�tjtj�y|jj�WnnXdS(N(RbRct
RPMLOG_NOTICERdR9R:R\tclose(R((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyt_shutdownOutputLogging�scC@sRy:|jj|jj��|jj�}|s5dS|SWntk
rMnXdS(N(RZtseekttelltreadRJtIOError(Rtout((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyt
_scriptOutput�s
cC@sD|j�}x|jD]}|j|�qW|jjj|�dS(N(RnRERRFthistorytlog_scriptlet_output(RRtdisplay((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyt
_scriptout�scC@s|j�dS(N(Rh(R((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyt__del__�scC@s�t|d�r|}|gS|j|j}tjj|�}|jrjt|jd�|krj|jSng}xQ|jj	D]C}|j
tj	jkr�q}nt|�|kr}|j
|�q}q}W|r�||_|Std|��dS(u3Obtain the package related to the calling callback.upkgiu%TransactionItem not found for key: %sN(RaRURVRR7t	_te_nevraRWtstrRFR#RtlibdnftTransactionItemAction_REINSTALLtappendtRuntimeError(Rtcbkeyttsittette_nevratitems((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyt_extract_cbkey�s$	
	c
C@sPy�t|t�r!t|�}n|tjkr@|j|�n�|tjkrRn�|tjkrt|j||�n�|tj	kr�|j
||�na|tjkr�|j|�S|tj
kr�|j|�n&|tjkr�|j|||�n|tjkr|j|�n�|tjkr4|j|�n�|tjkrY|j|||�n�|tjkrx|j|�n|tjkr�|j|�n`|tjkr�|j|||�n;|tjkr�|j|�n|tjkr�|j �nWnQt!k
rKt"j#�\}}}t$j%|||�}	t&j'dj(|	��nXdS(Nu()t
isinstanceRuRRbtRPMCALLBACK_TRANS_STARTt_transStarttRPMCALLBACK_TRANS_STOPtRPMCALLBACK_TRANS_PROGRESSt_trans_progresstRPMCALLBACK_ELEM_PROGRESSt
_elemProgresstRPMCALLBACK_INST_OPEN_FILEt
_instOpenFiletRPMCALLBACK_INST_CLOSE_FILEt_instCloseFiletRPMCALLBACK_INST_PROGRESSt
_instProgresstRPMCALLBACK_UNINST_STARTt
_uninst_starttRPMCALLBACK_UNINST_STOPt_unInstStoptRPMCALLBACK_UNINST_PROGRESSt_uninst_progresstRPMCALLBACK_CPIO_ERRORt
_cpioErrortRPMCALLBACK_UNPACK_ERRORt_unpackErrortRPMCALLBACK_SCRIPT_ERRORt_scriptErrortRPMCALLBACK_SCRIPT_STARTt
_script_starttRPMCALLBACK_SCRIPT_STOPt_scriptStopt	ExceptionR9texc_infot	tracebacktformat_exceptiontloggertcriticaltjoin(
RtwhattamountR'tkeytclient_datatexc_typet	exc_valuet
exc_tracebacktexcept_list((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR
�sJ

cC@s8||_|jrdSt|_t|jj�|_dS(N(RLRGtTrueRItlistRFR]RU(RR'((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR� s
			cC@sDtjj}x1|jD]&}|jd||d|dd�qWdS(Nui(RR#R2RER(RR�R'RRq((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR�&scC@si||_|jd7_|jse|j|�}x2|jD]$}|j|dj|dj�q:WndS(Nii(RVRNRGRRER"R%R(RR�tindexttransaction_listRq((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR�+s		cC@s�d|_|j|�}|dj}|j�}yt|�|_Wn>tk
r�}xg|jD]}|j	d||f�q`Wn<X|j
r�|jd7_|jj
|j�n|jj�SdS(NiuError: Cannot open file %s: %si(RJtlastmsgRR%tlocalPkgR[RKRlRER!RIRMRPtaddRtfileno(RR�R�R%trpmlocteRq((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR�3s	
	c	C@s�|j|�}|jj�d|_|js8|jr<dSx6|D].}|jtjj	krCtjj
|_PqCqCWx'|jD]}|j|j
|j�qW|j�|j|jkr�tjj}x0|jD]"}|jd|dddd�q�WndS(N(RRKRgRJRGRItstateRvR#tTransactionItemState_UNKNOWNtTransactionItemState_DONERER"R%RRrRNRLRR4R(RR�R�R{RqR((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR�Cs 
	

cC@sc|j|�}|dj}|dj}x3|jD](}|j|||||j|j�q3WdS(Ni(RR%RRERRNRL(RR�R'R�R�R%RRq((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR�Ys


cC@s|jd7_dS(Ni(RQ(RR�((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR�`scC@sc|j|�}|dj}|dj}x3|jD](}|j|||||j|j�q3WdS(Ni(RR%RRERRNRL(RR�R'R�R�R%RRq((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR�cs


cC@s�|j|�}x6|D].}|jtjjkrtjj|_PqqWx'|jD]}|j|j|j	�qRW|j
rdS|j�dS(N(RR�RvR#R�R�RER"R%RRGRr(RR�R�R{Rq((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR�js
	cC@sE|j|�}d|dj}x|jD]}|j|�q*WdS(Nu'Error in cpio payload of rpm package %si(RR%RER!(RR�R�RRq((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR�yscC@sZ|j|�}|d}d|j}x|jD]}|j|�q0Wtjj|_dS(NiuError unpacking rpm package %s(RR%RER!RvR#tTransactionItemState_ERRORR�(RR�R�R{RRq((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR�s

c	C@sitjj|d�}|j|�}|djj}d||f}x|jD]}|j|�qNWdS(Nu	<unknown>iu'Error in %s scriptlet in rpm package %s(RbttagnamesR_RR%RRER!(	RR�R'R�tscriptlet_nameR�RRRq((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR��scC@s�tjj}|dkr0|jgkr0d}n|j|�}|dj}|jdkrs|jdkrs|jnd}|jdkr�|jdkr�|jnd}x-|j	D]"}|j
||dd||�q�WdS(NuNoneiiid(RR#R3RJRURR%RLRNRER(RR�RR%R�tcompleteR'Rq((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR��s	
'-cC@s|j�dS(N(Rr(R((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR��scC@s+x$|jD]}|j|||�q
WdS(N(RER((RR%R&R'Rq((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyR(�s((RR)RHRRRRhRnRrRsRR
R�R�R�R�R�R�R�R�R�R�R�R�R�R�R((((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyRD�s.							*												
		(&t
__future__RRRtlibdnf.transactionRvtdnf.i18nRRtdnf.callbackRtdnf.transactiontdnf.utilRbtosR=R9RXR�Rt	TS_UPDATEt
TS_INSTALLtTS_ERASEtTS_OBSOLETEDt
TS_OBSOLETINGtTS_AVAILABLEt
TS_UPDATEDt	TS_FAILEDtTS_INSTALL_STATEStTS_REMOVE_STATESR>R�RtobjectRR5R<RD(((s4/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.pyt<module>s:	7