MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/proc/self/root/usr/lib/python2.4/site-packages/rpmUtils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/proc/self/root/usr/lib/python2.4/site-packages/rpmUtils/oldUtils.pyo
mò
ýÉODc@sdkZdkZdkZdkZdkZdklZlZd„Zd„Zdd„Z	d„Z
d„Zd„Zd	„Z
d
„Zd„Zdd
gZdeifd„ƒYZddd„Zdfd„ƒYZdefd„ƒYZdefd„ƒYZdfd„ƒYZdS(N(swrite32usFNAMEcCs|S(N(tmsg(R((t5/usr/lib/python2.4/site-packages/rpmUtils/oldUtils.pyt_scCsŠt|ƒ}d}|idjo
d}n1||iƒjp||iƒjo
d}n|o#tdt	dƒ||fƒ‚ndS(sŽcheck a header by opening it and comparing the results to the name and arch
       we believe it to be for. if it fails raise URLGrabError(-1)iiiÿÿÿÿs1Header cannot be opened or does not match %s, %s.N(
tHeader_Workt
headerfilethtfailthdrtNonetnametarchtURLGrabErrorR(RR	R
RR((Rtcheckheaders
&
#icCs¯tidƒti|tiƒ}yti|ƒWnti	j
o}d}nXd}ti|ƒtidƒ|o,|ptdtdƒ|ƒ‚q«dSn|SdS(sctake a package, check it out by trying to open it, return 1 if its good
       return 0 if it's nottmd5iitdefaultiÿÿÿÿsRPM %s fails md5 checkN(ttstsigCheckingtostopentpackagetO_RDONLYtfdnothdrFromFdnotrpmterrortetgoodtcloseturlgraberrorRR(RRRRR((RtcheckRpmMD5s


cCstidƒti|tiƒ}yti|ƒ}Wn„t	i
j
ou}t|ƒdjodSnt|ƒdjodSnt|ƒdjodSnt|ƒdjodSqön<Xt
|ƒ\}}|d	joti|ƒ~d
Sn~ti|ƒdS(
sÜ take a package, check it's sigs, return 0 if they are all fine, return 
    1 if the gpg key can't be found,  2 if the header is in someway damaged,
    3 if the key is not trusted, 4 if the pkg is not gpg or pgp signedRspublic key not availaiableispublic key not availablespublic key not trustediserror reading package headeriieiiN(RRRRRRRRRRRRtstrt
getSigInfotsiginfoR(RR RRRR((RtcheckSig4s,




cCsud}|i|ƒ}|djo"d}|idƒ\}}}nd}d}d}d}|||f}||fS(	sEchecks if a computerhand back signature information and an error codesŽ%|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|s(none)it,ietMD5RN(
tstringRtsprintfR Rtsplittsigtypetsigdatetsigidt	infotuple(RR R)R*R'R(RR$((RRPs
cCs\g}|ti}|djon5t|ƒtijo|i	|ƒn|i
|ƒ|S(N(t	provnamestheaderRtRPMTAG_PROVIDENAMEtprovidesRttypettypestListTypetextendtappend(R,R.R+((RtgetProvides`s


c

Cs½|\}}}|\}}}d„}||ƒ}||ƒ}||ƒ}||ƒ}||ƒ}||ƒ}ti|||f|||fƒ}	t
dd|||||||	fƒ|	S(NcCs7t|ƒtijo|djot|ƒ}n|S(N(R/targR0t
StringTypeRR(R5((RtrpmOutToStros#is%s, %s, %s vs %s, %s, %s = %s(te1tv1tr1te2tv2tr2R7RtlabelComparetrctlog(
t.0t.2R8R9R:R;R<R=R7R?((Rt
compareEVRks	$&cCs›|o|titiBtiB@o|d}n|ti@o|d}n|ti@o|d}n|ti@o|d}|d|}q—n|S(Nt t<t>t=s %s(tflagsRt
RPMSENSE_LESStRPMSENSE_GREATERtRPMSENSE_EQUALR	tversion(R	RLRH((Rt
formatRequire~s
cCsHytitiƒ}Wn+tij
o}tdtdƒƒnX|S(NisFCould not open RPM database for reading. Perhaps it is already in use?(	RtTransactionSettconftinstallroottdbRRterrorlogR(RRQ((Rt	openrpmdbŒs
tGzipFileRcBstZd„ZRS(NcCs³|iidƒ|iidƒ|id }d}|o
t}n|iit|ƒƒt|it	dƒƒ|iidƒ|iidƒ|o|ii|dƒndS(Ns‹siýÿÿÿissÿt(
tselftfileobjtwritetfilenametfnameRHtFNAMEtchrtwrite32utlong(RVRZRH((Rt_write_gzip_header˜s

(t__name__t
__module__R_(((RRT—strbi	cCst|||ƒS(N(RTRYtmodet
compresslevel(RYRcRd((Rt	_gzipOpen§st
RPM_Base_WorkcBsbtZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d	„Z
d
„ZRS(NcCs?|idjo$tdtdƒƒtidƒn|i|S(Nis-Got an empty Header, something has gone wrongi(RVRRRRRtsystexitttag(RVRi((Rt_getTag¬scCs&|idƒdjodSndSdS(Nt
sourcepackageii(RVRj(RV((RtisSource³scCs
|idƒS(NR	(RVRj(RV((RR	¹scCs
|idƒS(NR
(RVRj(RV((RR
¼scCs
|idƒS(Ntepoch(RVRj(RV((RRm¿scCs
|idƒS(NRL(RVRj(RV((RRLÂscCs
|idƒS(Ntrelease(RVRj(RV((RRnÅscCs:|idƒ}|idƒ}|idƒ}|||fS(NRmRLRn(RVRjRtvtr(RVRpRRo((RtevrÈscCs^|idƒ}|idƒ}|idƒ}|idƒ}|idƒ}|||||fS(NR	RmRLRnR
(RVRjtnRRoRpta(RVRsRRrRpRo((RtnevraÎsc
CsÈ|iƒ\}	}}}}|djo
d}n|iƒod||	|||f}nd||	||||f}|ot|dƒ}nt|dƒ}|i|iidƒƒ|iƒ|S(Nt0s%s/%s-%s-%s-%s.src.hdrs%s/%s-%s-%s-%s.%s.hdrtwi(RVRtR	RmtvertrelR
RRlt	headerdirtheaderfntcompressRet	headeroutRRXRtunloadR(
RVRyR{RwR|RzRmRxR
R	((RtwriteHeaderÖs



(R`RaRjRlR	R
RmRLRnRqRtR~(((RRfªs									RcBstZdZd„ZRS(s‡for operating on hdrs in and out of the rpmdb
       if the first arg is a string then it's a filename
       otherwise it's an rpm hdrcCsxt|ƒtijoOygti|dƒ}yti|i	ƒƒ}Wn5tij
o&}t
dtdƒ|ƒd}nXWn×tj
oi}t|dƒ}yti|i	ƒƒ}WqWtij
o&}t
dtdƒ|ƒd}qWXndtj
o&}t
dtdƒ|ƒd}n3tj
o&}t
dtdƒ|ƒd}nX|iƒn|}||_dS(NRpisDamaged Header %s(R/R,R0R6tgzipRtfdRt
headerLoadtreadRRRRRRRtIOErrort
ValueErrort	zlibErrorRRVR(RVR,RRR€((Rt__init__ís0
(R`Rat__doc__R†(((RRéstRPM_WorkcBstZd„ZRS(NcCsŽtitiƒti|tiƒ}yti	|ƒ|_Wn>tij
o/}tdtdƒ||fƒd|_nXti|ƒdS(NisError opening rpm %s - error %s(Rt
setVSFlagsRt_RPMVSF_NOSIGNATURESRRtrpmfnRR€RRVRRRRRRRR(RVR‹RR€((RR†
s(R`RaR†(((RRˆ	stRpm_Ts_WorkcBs>tZdZdd„Zd„Zeeed„Zd„ZRS(sïThis should operate on groups of headers/matches/etc in the rpmdb - ideally it will 
    operate with a list of the Base objects above, so I can refer to any one object there
    not sure the best way to do this yet, more thinking involvedt/cCs‡y/tio!tidjo
ti}q.nWntj
o	}nXti|ƒ|_dddddddd	d
ddg|_	dS(
NRt
addInstalltaddErasetruntchecktorderRtcloseDBtdbMatchtsetFlagsR‰t
setProbFilter(
RORPtdbPatht	NameErrorRRRNRVRtmethods(RVR—R((RR†s
cCs1||ijot|i|ƒSn
t|‚dS(N(t	attributeRVR™tgetattrRtAttributeError(RVRš((Rt__getattr__%scCs[g}|djo-|djo |djo|iiƒ}nî|djo|ii||ƒ}nÈ|djo)|iiƒ}|i	|t
i|ƒn’|djo)|iiƒ}|i	|t
i|ƒn\|djo)|iiƒ}|i	|t
i
|ƒn&|iiƒ}|i	|t
i|ƒx'|D]}t|ƒ}|i|ƒq4W|S(s(hands back a list of Header_Work objectstglobtregextstrcmpN(thwlisttmireRRitsearchRVRR”thdrlisttpatternRtRPMMIRE_GLOBt
RPMMIRE_REGEXtRPMMIRE_STRCMPtRPMMIRE_DEFAULTRRthdrobjR3(RVRiR£R¢RR¤R¡Rª((Rtmatch+s,'



cCs‚|djo|iititiBƒnS|djo|iitiƒn.|djo|iitiƒn
t	|‚dS(sApass type of check you want to occur, default is to have them offR
tnoneRN(
tsigRVRR‰RtRPMVSF_NOMD5tRPMVSF_NEEDPAYLOADRŠtRPMVSF_DEFAULTRœ(RVR­((RRJs


(R`RaR‡R†RRR«R(((RRŒs

	(RR0RRRgR]R[RRRR!RR4RCRMRSt__all__RTReRfRRˆRŒ(RCR!R4RRR]R±RRˆRR0RMRfRgReR[RRSRŒRRRRT((Rt?s*														? 

Anon7 - 2021