403 Forbidden


Disable Functions:
Path : /lib/python2.7/site-packages/yum/
File Upload :
Command :
Current File : //lib/python2.7/site-packages/yum/rpmtrans.pyc

�
�v_c@s�ddlZddlZddlZddlZddlZddlZddlZddlTddlm	Z	ddl
mZddlZddl
Z
ddd��YZddd��YZd	efd
��YZddd��YZd
dd��YZdS(i����N(t*(t_(tTransactionMembertNoOutputCallBackcBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCsdS(N((tself((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt__init__!scCsdS(s�
        @param package: A yum package object or simple string of a package name
        @param action: A yum.constant transaction set state or in the obscure 
                       rpm repackage case it could be the string 'repackaging'
        @param te_current: current number of bytes processed in the transaction
                           element being processed
        @param te_total: total number of bytes in the transaction element being
                         processed
        @param ts_current: number of processes completed in whole transaction
        @param ts_total: total number of processes in the transaction.
        N((Rtpackagetactiont
te_currenttte_totalt
ts_currenttts_total((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pytevent$scCsdS(sPpackage is the package.  msgs is the messages that were
        output (if any).N((RRtmsgs((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt	scriptout4scCsdS(stakes a simple error msg stringN((Rtmsg((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyterrorlog9scCsdS(svpackage is the same as in event() - a package object or simple string
           action is also the same as in event()N((RRR((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pytfilelog>s(t__name__t
__module__RRRRR(((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR s
				tRPMBaseCallbackcBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(s@
    Base class for a RPMTransaction display callback class
    cCs�itd�t6td�t6td�t6td�t6td�t6td�t6td�t6td�d6|_idt6d	t6d
t6d
t6dt6d
t6dt6|_	t
jd�|_dS(NtUpdatingtErasingt
Installingt	ObsoletedtCleanuptRepackagingtrepackagingtUpdatedtErasedt	Installeds"yum.filelogging.RPMInstallCallback(
Rt	TS_UPDATEtTS_ERASEt
TS_INSTALLtTS_TRUEINSTALLtTS_OBSOLETEDt
TS_OBSOLETINGt
TS_UPDATEDRt
fileactiontloggingt	getLoggertlogger(R((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyRHs 







cCs
t��dS(s�
        @param package: A yum package object or simple string of a package name
        @param action: A yum.constant transaction set state or in the obscure 
                       rpm repackage case it could be the string 'repackaging'
        @param te_current: Current number of bytes processed in the transaction
                           element being processed
        @param te_total: Total number of bytes in the transaction element being
                         processed
        @param ts_current: number of processes completed in whole transaction
        @param ts_total: total number of processes in the transaction.
        N(tNotImplementedError(RRRRR	R
R((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR[scCsdS(sPpackage is the package.  msgs is the messages that were
        output (if any).N((RRR
((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyRiscCstj|IJdS(N(tsyststderr(RR((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyRnscCsM||jkr)d|j||f}nd||f}|jj|�dS(Ns%s: %s(R&R)tinfo(RRRR((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyRrscCsdS(sC Callback for post transaction when we are in verifyTransaction(). N((Rtbasettxmbrtcount((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pytverify_txmbr{s(	RRt__doc__RRRRRR1(((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyRDs						tSimpleCliCallBackcBs,eZd�Zd�Zd�Zd�ZRS(cCs#tj|�d|_d|_dS(N(RRtNonetlastmsgtlastpackage(R((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�s
	cCsPd|j||||||f}||jkr:|GHn||_||_dS(Ns%s: %s %s/%s [%s/%s](RR5R6(RRRRR	R
RR((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�s	cCs|r
|GndS(N((RRR
((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�scCs%td�|t|j�|fGHdS(sC Callback for post transaction when we are in verifyTransaction(). sVerify: %u/%u: %sN(RtlenttsInfo(RR.R/R0((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR1�s(RRRRRR1(((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR3�s				t_WrapNoExceptionscBseZd�Zd�ZRS(cCs
||_dS(N(t_WrapNoExceptions__parent(Rtparent((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�scsPt|j|���fd�}�j|_�j|_|jj�j�|S(s� Wraps all access to the parent functions. This is so it'll eat all
            exceptions because rpm doesn't like exceptions in the callback. csFy�||�Wn.tk
rA}ydGdG|GHWqBqBXnXdS(NsError:sdisplay callback failed:(t	Exception(targstkwargste(tfunc(s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pytnewFunc�s(tgetattrR:RR2t__dict__tupdate(RtnameRA((R@s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt__getattr__�s
(RRRRF(((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR9�s	tRPMTransactioncBsFeZeed�Zd�Zd�Zdd�Zd�Zd�Z	d�Z
d�Zd	�Zed
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d �Z#d!�Z$d"�Z%RS(#cCs�t|�s||_n|�|_t|j�|_||_||_t|_d|_d|_	d|_
d|_t�|_
d|_tjd�|_t|_|j|jj�tjj|jjj�s�tj|jjj�ndS(Nis"yum.filelogging.RPMInstallCallback(tcallabletdisplayR9R.ttesttFalset
trans_runningR4tfdt
total_actionsttotal_installedtcomplete_actionstsettinstalled_pkg_namest
total_removedR'R(R)Rt_setupOutputLoggingtconftrpmverbositytostpathtexistst
persistdirtmakedirs(RR.RJRI((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�s$									cCsJtj}tj|tj�}||@r,dStj|tj||B�dS(s1 Set the Non-blocking flag for a filedescriptor. N(RWt
O_NONBLOCKtfcntltF_GETFLtF_SETFL(RRMtflagt
current_flags((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt_fdSetNonblock�s
	
cCsJtj}tj|tj�}||@r,dStj|tj||B�dS(s3 Set the close on exec. flag for a filedescriptor. N(R]t
FD_CLOEXECtF_GETFDtF_SETFD(RRMR`Ra((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt_fdSetCloseOnExec�s
	
R-cCs�tj�}||_t|jd�|_|jjj|j�idd6dd6dd6dd	6d
d6j	||�}d|j
�}tt|�s�d
}ntj
tt|��tj|j�dS(Nsw+btcrittcriticaltemergt	emergencyterrterrorR-tinformationtwarningtwarntRPMLOG_tRPMLOG_INFO(ttempfiletNamedTemporaryFilet	_readpipetopenREt
_writepipeR.ttstsetScriptFdtgettupperthasattrtrpmtsetVerbosityRBt
setLogFile(RRVtio_r((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyRT�s	
	cCs?tjtj�tjtj�y|jj�WnnXdS(N(R|R}t
RPMLOG_NOTICER~R+R,Rvtclose(R((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt_shutdownOutputLogging�scCs9y!|jj�}|sdS|SWntk
r4nXdS(N(RttreadR4tIOError(Rtout((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt
_scriptOutput�s
cCs9|j�}|jj||�|jjj||�dS(N(R�RIRR.thistorytlog_scriptlet_output(RtdataR
((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt
_scriptout�scCs|j�dS(N(R�(R((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt__del__scCsN|d}|dkrd}nt|�}|d|d||d|dfS(Ntepocht0REtarchtversiontrelease(R4tstr(RthdrttmpepochR�((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt	_dopkgtups

	cCst|t�r|j|fSt|t�r�|j|d�}|jjjd|�}t|�dksnt	�|dj|dfSt|t
�rd}|s�|dfSxQ|jjjd|�D]7}|j
tkr�q�n|dk	r�|dfS|}q�W||fSdSdS(NitpkgtupiRE(NN(t
isinstanceRREttupleR�R.R8t
getMembersR7tAssertionErrort
basestringR4t
matchNaevrtoutput_statetTS_REMOVE_STATES(RtcbkeyteraseR�ttxmbrstretR/((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt	_getTxmbrs&




cCs>|jjjdkr|S|jtjj|jjj�d�S(s+ Remove the installroot from the filename. t/t(R.RUtinstallroottreplaceRWRXtnormpath(Rtfilename((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt_fn_rm_installroot/scCs�|jr
tSt|d�r tSd|jjj|jf|_|j	|j�}yt
|d�|_Wn7tt
fk
r�}|jjd|�d|_tSX|j|jj��tS(sQ Open the transaction done file, must be started outside the
            chroot. t_ts_dones%s/transaction-done.%stwscould not open ts_done file: %sN(RJRKR{tTrueR.RURZt_ts_timet
ts_done_fnR�RuR�R�tOSErrorRIRR4Rftfileno(RR�R?((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pytts_done_open9s		cCs�|jdkrdSy!|jj|�|jj�WnFttfk
r|}|jjd|�d|_tj	|j
�nXdS(s/ Write some data to the transaction done file. Ns#could not write to ts_done file: %s(R�R4twritetflushR�R�RIRtmisctunlink_fR�(RRR?((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt
ts_done_writeOs	cCsV|j�sdSt|j�dkr)dS|jd\}}}}}}d||||f}	|tkr�|dkr�|jj||	�q�n|tkr�|dkr�|jj||	�q�nt|�tj	kr�|}
n	|j
}
||
krd||f}	|jj||	�nd||||||f}	|j|	�|jjd�dS(s?writes out the portions of the transaction which have completedNis&ts_done state is %s %s should be %s %sR�tinstalls%ts_done name in te is %s should be %ss%s %s:%s-%s-%s.%s
(
R�R7t
_te_tuplesR�RIRtTS_INSTALL_STATESttypettypestStringTypesRER�tpop(RRRttR?tntvtrtaRRE((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pytts_done^s*		
cCset|d�sg|_nx�|jjD]�}|j�}|j�}|j�}|j�}|j�}|dkrd}n|j
�dkr�d}n'|j
�dkr�d}n|j
�}|jj||||||f�q(Wtj
d�|_d|jjj|jf}||_|j|�}yMtjjtjj|��sjtjtjj|��nt|d	�}	Wn7ttfk
r�}|jjd
|�d|_dSXygxL|jD]A\}}}}}}d||||||f}
|	j|
�q�W|	j�|	j �WnCttfk
r`}|jjd
|�t!j"|�d|_nXdS(s&write out what our transaction will doR�R�iR�iR�s%Y-%m-%d.%H:%M.%Ss%s/transaction-all.%sR�scould not open ts_all file: %sNs%s %s:%s-%s-%s.%s
s"could not write to ts_all file: %s(#R{R�R.RwtNtAtVtRtER4tTypetappendttimetstrftimeR�RURZt	ts_all_fnR�RWRXRYtdirnameR[RuR�R�RIRR�R�R�R�R�R�(RtteR�R�R�R�R?R�ttsfntfoR((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pytts_all�sL			&		"

cCs�|tjkr%|j|||�nz|tjkrJ|j|||�nU|tjkro|j|||�n0|tjkr�|j|||�S|tj	kr�|j
|||�n�|tjkr�|j|||�n�|tj
kr|j|||�n�|tjkr%|j|||�nz|tjkrJ|j|||�nU|tjkro|j|||�n0|tjkr�|j|||�n|tjkr�|j|||�n�|tjkr�|j|||�n�|tjkr|j|||�n�ttd�r7|tjkr7|j|||�nhttd�rk|tj krk|j!|||�n4ttd�r�|tj"kr�|j#|||�ndS(NtRPMCALLBACK_SCRIPT_ERRORtRPMCALLBACK_SCRIPT_STARTtRPMCALLBACK_SCRIPT_STOP($R|tRPMCALLBACK_TRANS_STARTt_transStarttRPMCALLBACK_TRANS_PROGRESSt_transProgresstRPMCALLBACK_TRANS_STOPt
_transStoptRPMCALLBACK_INST_OPEN_FILEt
_instOpenFiletRPMCALLBACK_INST_CLOSE_FILEt_instCloseFiletRPMCALLBACK_INST_PROGRESSt
_instProgresstRPMCALLBACK_UNINST_STARTt_unInstStarttRPMCALLBACK_UNINST_PROGRESSt_unInstProgresstRPMCALLBACK_UNINST_STOPt_unInstStoptRPMCALLBACK_REPACKAGE_STARTt_rePackageStarttRPMCALLBACK_REPACKAGE_STOPt_rePackageStoptRPMCALLBACK_REPACKAGE_PROGRESSt_rePackageProgresstRPMCALLBACK_CPIO_ERRORt
_cpioErrortRPMCALLBACK_UNPACK_ERRORt_unpackErrorR{R�t_scriptErrorR�t_scriptStartR�t_scriptStop(Rtwhattbytesttotalthtuser((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pytcallback�sDcCs7||_|jrdSt|_|j�|j�dS(N(RNRJR�RLR�R�(RR�R�R�((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR��s			
cCsdS(N((RR�R�R�((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR��scCsdS(N((RR�R�R�((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR��scCs�d|_|j|�\}}|dk	r�|jj�}yt|�|_Wn-tk
r{}|jj	d||f�q�X|j
r�|jd7_|jd7_|j
j|�n|jj�Sn|jj	d�dS(NsError: Cannot open file %s: %sis"Error: No Header to INST_OPEN_FILE(R4R5R�tpotlocalPkgtfileRMR�RIRRLRORPRRtaddR�(RR�R�R�RER/trpmlocR?((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR��s		cCs�|j|�\}}|dk	r�|jj�d|_|jrDdS|jr�|jj|j|j	�|j
|j�|jjj
|j�}|jjj|�}|jjj||�|j|j|j	�q�ndS(N(R�R4RMR�RJRLRIRR�R�R�R.R�tpkg2pidttxmbr2statettrans_data_pid_endR�(RR�R�R�RER/tpidtstate((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�s
			cCs�|j|�\}}|dk	r�|dkrU|jj|d|||j|j�q�|j}|jj|j||||j|j�ndS(NR(R�R4RIRRPRNR�R�(RR�R�R�RER/R((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�s	cCsdS(N((RR�R�R�((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�scCsdS(N((RR�R�R�((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�"sc
Cs�|j|dt�\}}|jd7_|jd7_||jkr�|dk	rm|jj|jt	�n|jj|t	�t	}nt
}|jj||dd|j|j�|j
r�dS|dk	r�|j|j�t}|r|jjjdkrtjd�n|jjj|j�}|jjj|�}	|jjj||	�|r�|jjjdkr�tj|jjj�n|j|j|j�n|j|�|j||�dS(NR�iidR�t.(R�R�RSRPRRR4RIRR�R R%RRNRJR�RKR.RUR�RWtchrootR�RRRR�R�(
RR�R�R�RER/Rt
_do_chrootRR((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�%s4	
	
cCsdS(N((RR�R�R�((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�NscCsdS(N((RR�R�R�((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�QscCsdS(N((RR�R�R�((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�TscCsN|j|�\}}|dk	rJd|j}t|_|jj|�ndS(Ns'Error in cpio payload of rpm package %s(R�R4R�t	TS_FAILEDR�RIR(RR�R�R�RER/R((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�Ws

	cCsN|j|�\}}|dk	rJt|_d|j}|jj|�ndS(NsError unpacking rpm package %s(R�R4RR�R�RIR(RR�R�R�RER/R((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�`s
	
c	Cs�tjj|d�}|j|dt�\}}|dkrE|}n	|j}|rd||f}|dk	r�t|_q�nd||f}|j	j
|�|j|�dS(Ns	<unknown>R�s'Error in %s scriptlet in rpm package %ss0Non-fatal %s scriptlet failure in rpm package %s(R|ttagnamesRyR�R�R4R�RR�RIRR�(	RR�R�R�tscriptlet_nameRER/tpackage_nameR((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR�js		

cCsdS(N((RR�R�R�((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR��scCs,|j|�\}}|j|p$|�dS(N(R�R�(RR�R�R�RER/((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR��scCs3t|jd�sdS|jj|j||�dS(sC Callback for post transaction when we are in verifyTransaction(). R1N(R{RIR1R.(RR/R0((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyR1�s(&RRRKRRRbRfRTR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R1(((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyRG�sD									
	
			+	5	'						
			)						
			(((((R|RWR]R�R'R�R+t
yum.constantstyumRtyum.transactioninfoRR�RrRRR3R9RG(((s0/usr/lib/python2.7/site-packages/yum/rpmtrans.pyt<module>s 
$<

404 Not Found
[ LogOut ]