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/python2.6/site-packages/yum/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/yum/packageSack.pyo
7Jc	@sdZddklZddkZddkZddkZddkZddklZdfdYZ	de
fdYZd	efd
YZdefdYZ
d
ZdZde
fdYZdS(s;
Classes for manipulating and querying groups of packages.
i(tPackageSackErrorN(t
parsePackagestPackageSackVersioncBs5eZdZdZdZdZdZRS(cCs"d|_tidg|_dS(Nitsha1(t_numtmisct	Checksumst_chksum(tself((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt__init__s	cCsd|i|iifS(Ns%u:%s(RRt	hexdigest(R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt__str__!scCs|djotSt|tdtdfjot||jS|i|ijotS|ii|iijotStS(Ntu(tNonetFalsettypetstrRRtdigesttTrue(Rtother((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt__eq__$s
%cCs||jS(N((RR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt__ne__+scCsb|id7_|iit||dj	o,|ii|d|ii|dndS(Nii(RRtupdateRR
(Rtpkgtcsum((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR.s

(t__name__t
__module__R	RRRR(((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRs
				tPackageSackBasecBseZdZdZdZdZdZdZdZdZ	d$d$d$d$d$dZgd	Zd
Z
dZd$d$d$d$d$d$dZd$d%d
Zd$d&dZdZdZdZdZedZdZdZdZdZd$d$edZdZehdZd$d$edZd$d$edZ d$edZ!dZ"dZ#d Z$d!Z%d"Z&d$d#Z'RS('s8Base class that provides the interface for PackageSacks.cCs
h|_dS(N(tadded(R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR	8scCst|iS(N(tlentreturnPackages(R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt__len__;scCs5|i}t|do|iSt|SdS(Nt__iter__(RthasattrR titer(Rtret((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR >scCs|djodSt|i}t|i}t|t|jot|t|SxDtt|t|D]'\}}t||}|o|SqzWdS(Nii(R
tlistRRtziptsortedtcmp(RRts_reposto_reposts_repoto_repoR#((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt__cmp__Es
	cCs
tdS(N(tNotImplementedError(RtcompatArchs((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytsetCompatArchsSscCs
tdS(N(R-(Rtrepotmdtypetcallbackt	cacheOnly((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytpopulateVscCs#tidtdd|i|S(s5return a list of package objects by (n,a,e,v,r) tuples;packagesByTuple() will go away in a future version of Yum.
t
stackleveli(twarningstwarntDeprecationWarningtsearchPkgTuple(Rtpkgtup((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytpackagesByTupleYs	
cCs
tdS(s6return list of pkgobjects matching the nevra requestedN(R-(Rtnametepochtvertreltarch((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytsearchNevraascCs
tdS(N(R-(Rtnames((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytsearchNamesescCs7|id|id|id|id|id|iS(srreturn list of package objects matching the name, epoch, ver, rel,
           arch of the package object passed inR<R=R>R?R@(RAR<R=R>R?R@(Rtpo((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytsearchPOhs$cCs=|\}}}}}|id|d|d|d|d|S(s7return list of pkgobject matching the (n,a,e,v,r) tupleR<R@R=R>R?(RA(RR:tntatetvtr((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR9oscCsf|o1|i}|i}|i}|i}|i}nt|id|d|d|d|d|S(spreturn if there are any packages in the sack that match the given NAEVR 
           or the NAEVR of the given poR<R@R=R>R?(R<R@R=tversiontreleasetboolRA(RR<R@R=R>R?RD((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytcontainsts				
cCs
tdS(s5return dict { packages -> list of matching provides }N(R-(RR<tflagsRK((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytgetProvidesscCs
tdS(s5return dict { packages -> list of matching requires }N(R-(RR<RORK((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytgetRequiresscCs
tdS(s<return list of package requiring the name (any evr and flag)N(R-(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytsearchRequiresscCs
tdS(s<return list of package providing the name (any evr and flag)N(R-(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytsearchProvidesscCs
tdS(sCreturn list of package conflicting with the name (any evr and flag)N(R-(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytsearchConflictsscCs
tdS(s=return list of package obsoleting the name (any evr and flag)N(R-(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytsearchObsoletesscCs
tdS(sEreturns a dict of obsoletes dict[obsoleting pkgtuple] = [list of obs]N(R-(Rtnewest((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytreturnObsoletesscCs
tdS(s#return list of packages by filenameN(R-(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytsearchFilesscCs
tdS(s"add a pkgobject to the packageSackN(R-(Rtobj((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt
addPackagescCs
tdS(sbuilds the useful indexes for searching/querying the packageSack
           This should be called after all the necessary packages have been
           added/deletedN(R-(R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytbuildIndexesscCs
tdS(sdelete a pkgobjectN(R-(RRY((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt
delPackagescCs
tdS(sreturn list of all packagesN(R-(Rtrepoidtpatternstignore_case((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRscGs
tdS(s Add an "excluder" for all packages in the repo/sack. Can basically
            do anything based on nevra, changes lots of exclude decisions from
            "preload package; test; delPackage" into "load excluder".
            Excluderid is used so the caller doesn't have to track
            "have I loaded the excluder for this repo.", it's probably only
            useful when repoid is None ... if it turns out utterly worthless
            then it's still not a huge wart. N(R-(RR]t
excluderidtexcludertargs((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytaddPackageExcludersc
Cs`d}t}h}h}h}xt|iD]}|i}	|i||	xb|D]Z}
|i||
jo@|
|jot||
<h||
<n||
i||	q`q`W|oq7n|iii}|||i	|||	xC|D];}
|i||
jo!|||
|i	|||	qqWq7W|o||||gS||gS(s5 Return a simple version for all available packages. cSsq|i|h}|idt}|i|||dj	o)|i|t}|i||ndS(N(t
setdefaultR
RR(tareposR]trevRRtarevstrpsv((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt_up_revss
(
RR&RtreturnIdSumRR<R0trepoXMLtrevisionR](Rt	main_onlytgroupsRitmainRet	main_grpstarepos_grpsRRtgroupRf((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt
simpleVersions6		

)cCs
tdS(sreturn list of newest packages based on name, arch matching
           this means(in name.arch form): foo.i386 and foo.noarch are not
           compared to each other for highest version only foo.i386 and
           foo.i386 will be comparedN(R-(RtnaTupR^R_((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytreturnNewestByNameArchscCs
tdS(sreturn list of newest packages based on name matching
           this means(in name.arch form): foo.i386 and foo.noarch will
           be compared to each other for highest versionN(R-(RR<R^R_((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytreturnNewestByNamescCs
tdS(s,returns a list of pkg tuples (n, a, e, v, r)N(R-(RR^R_((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt
simplePkgListscCs
tdS(N(R-(R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt
printPackagesscCs
tdS(sDexclude incompatible arches. archlist is a list of compatible archesN(R-(Rtarchlist((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytexcludeArchsscCs
tdS(N(R-(Rtfieldstcriteria_reR2((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytsearchPackagesscCs
tdS(N(R-(Rtargt
query_type((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt	searchAllscCsg}g}t|}h}xN|D]F}ti|o&ti|}ti|||<q%|||<q%WxS|iD]E}|\}	}
}}}
t|	d|	|
fd|	||
|
fd|	|fd|	||
fd||	||
|
fd|	|||
|
ff}x|iD]\}}||jo<||jo+|i	|i
|d|i|qqxI|D]A}	|i|	o+|i	|i
|d|i|qxqxWqWq|Wti
|ti
|t|fS(s{take a list strings and match the packages in the sack against it
           this will match against:
           name
           name.arch
           name-ver-rel.arch
           name-ver
           name-ver-rel
           epoch:name-ver-rel.arch
           name-epoch:ver-rel.arch
           
           return [exact matches], [glob matches], [unmatch search terms]
           s%s.%ss%s-%s-%s.%ss%s-%ss%s-%s-%ss%s:%s-%s-%s.%ss%s-%s:%s-%s.%si(tsetRtre_globtfnmatcht	translatetretcompileRwtitemstappendR9tdiscardtmatchtuniqueR$(Rtpkgspecstmatchedt
exactmatcht	unmatchedtspecstptrestringR:RFRGRHRIRJRBttermtquery((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytmatchPackageNamessB





c	CsTd}h}g}x|id|D]~}|ipq(nxd|iD]Y}|i|pt||<nt||djoqIn||i|iqIWq(Wx|id|D]}d}xb||D]T}|i|o>t||djp|i||jo|d7}Pq*qqW|djo|i|qqW|S(sjreturns a list of package objects that are not required by
           any other package in this repositoryc	sshx|iD]}|Vq
Wx|iD]}|Vq#Wx|iD]}|Vq<Wx|iD]}|VqUWdS(s& Return all the provides, via. yield. N(tprovides_namestfilelisttdirlistt	ghostlist(RDtprov((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt_return_all_provides7s
	
	
	
R]ii(Rtrequires_namesthas_keyRRtaddR<R(	RR]RtreqtorphansRDRJtpreqR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytreturnLeafNodes3s4	


+


N(NNN(NNN((RRt__doc__R	RR R,R/R4R;R
RARCRER9RNRPRQRRRSRTRURRWRXRZR[R\RRcRsRuRvRwRxRzR}RRR(((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR6sJ																		
&					2tMetaSackcBspeZdZdZdZdZdZdZdZdZ	d!d!d!d!d!dZgd	Zd!d"d
Z
d!d#dZdZd
ZdZdZedZdZdZdZdZd!d!edZdZd!d!edZd!d!edZd!edZdZdZdZ dZ!dZ"dZ#d Z$RS($sqRepresents the aggregate of multiple package sacks, such that they can
       all be treated as one unified sack.cCs#ti|h|_d|_dS(N(RR	tsacksR
tcompatarchs(R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR	gs
	cCs:d}x-t|iiD]}|t|7}qW|S(Ni(R&RtvaluesR(RR#tsack((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRls
cCs<x5|iiD]$}t|do|iqqWdS(NtdropCachedData(RRR!R(RR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRrscCs!||i|<|i|idS(s1Adds a repository's packageSack to this MetaSack.N(RR/R(RR]R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pytaddSackws
cCs$|i|ii||||dS(N(RtidR4(RR0R1R2R3((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR4~scCs+x$|iiD]}|i|qWdS(N(RRR/(RR.R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR/scCs&tidtdd|id|S(s5return a list of package objects by (n,a,e,v,r) tuples;packagesByTuple() will go away in a future version of Yum.
R5iR;(R6R7R8t_computeAggregateListResult(RR:((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR;s	
cCs|id|||||S(s6return list of pkgobjects matching the nevra requestedRA(R(RR<R=R>R?R@((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRAscCs|id|S(NRC(R(RRB((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRCscCs|id|||S(s5return dict { packages -> list of matching provides }RP(t_computeAggregateDictResult(RR<RORK((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRPscCs|id|||S(s5return dict { packages -> list of matching requires }RQ(R(RR<RORK((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRQscCs|id|S(s<return list of package requiring the name (any evr and flag)RR(R(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRRscCs|id|S(s<return list of package providing the name (any evr and flag)RS(R(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRSscCs|id|S(sCreturn list of package conflicting with the name (any evr and flag)RT(R(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRTscCs|id|S(s=return list of package obsoleting the name (any evr and flag)RU(R(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRUscCs|p|idS|id}td|iD}g}x,|D]$}||jo|i|qMqMWx|D]
}||=q|W|S(sEreturns a dict of obsoletes dict[obsoleting pkgtuple] = [list of obs]RWcssx|]}|iVqWdS(N(R:(t.0R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pys	<genexpr>s	(RRRvR(RRVtobsdicttnewest_tupsttogotobstup((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRWs
cCs|id|S(s#return list of packages by filenameRX(R(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRXscCsdS(saAdd a pkgobject to the packageSack.  This is a meaningless operation
           for the MetaSack.N((RRY((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRZscCs(x!|iiD]}|iqWdS(sbuilds the useful indexes for searching/querying the packageSack
           This should be called after all the necessary packages have been
           added/deletedN(RRR[(RR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR[scCs|iii|dS(s2Delete a pkgobject if it exists in every sub-sack.N(R0RR\(RRY((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR\scCs;|p|idd||S|i|id|d|S(sReturns a list of packages. Note that the packages are
           always filtered to those matching the patterns/case. An optional
           repoid allows you to easily get data for a specific repo. RR^R_N(RR
RR(RR]R^R_((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRs
	cGsD|p |i}|dd|||S|i|id|||S(s Add an "excluder" for all packages in the repo/sack. Can basically
            do anything based on nevra, changes lots of exclude decisions from
            "preload package; test; delPackage" into "load excluder".
            Excluderid is used so the caller doesn't have to track
            "have I loaded the excluder for this repo.", it's probably only
            useful when repoid is None ... if it turns out utterly worthless
            then it's still not a huge wart. RcN(RR
RRc(RR]R`RaRbtcalr((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRcs
	cCsk|i}|d|||}t|}|o5|p|o'di|pg}td|n|S(sreturn list of newest packages based on name, arch matching
           this means(in name.arch form): foo.i386 and foo.noarch are not
           compared to each other for highest version only foo.i386 and
           foo.i386 will be comparedRus, sNo Package Matching %s(RtpackagesNewestByNameArchtjoinR(RRtR^R_Rtpkgstui_pats((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRus	cCsv|id|||}t|}|oF|p|o8|o
|}ndi|pg}td|n|S(sreturn list of newest packages based on name matching
           this means(in name.arch form): foo.i386 and foo.noarch will
           be compared to each other for highest versionRvs, sNo Package Matching %s(RtpackagesNewestByNameRR(RR<R^R_RR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRvs
cCs|id||S(s,returns a list of pkg tuples (n, a, e, v, r)Rw(R(RR^R_((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRw
s	cCs(x!|iiD]}|iqWdS(N(RRRx(RR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRxscCs+x$|iiD]}|i|qWdS(sDexclude incompatible arches. archlist is a list of compatible archesN(RRRz(RRyR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRzscCs|id|||S(NR}(R(RR{R|R2((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR}scCs|id||S(NR(R(RR~R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRsc	Cs#g}g}d}x|iiD]}t|doggg}}}y|i|\}}}Wntj
o
q"nX|i||i||djot|}q|it|}q"q"Wt	i
|}t	i
|}|djo
g}n
t|}|||fS(NR(R
RRR!RRtextendRtintersectionRRR$(	RRRRRRRHtmtu((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRs,




cGsg}xt|iiD]m}t||oWt||}yt||}Wntj
o
qnX|o|i|qqqW|S(N(R&RRR!tgetattrtapplyRR(Rt
methodNameRbtresultRtmethodt
sackResult((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR9scGsh}xt|iiD]m}t||oWt||}yt||}Wntj
o
qnX|o|i|qqqW|S(N(R&RRR!RRRR(RRRbRRRR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRHsN(NNN(NNN(%RRRR	RRRR4R/R;R
RARCRPRQRRRSRTRURRWRXRZR[R\RRcRuRvRwRxRzR}RRRR(((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRcsD															
	
						tPackageSackcBsUeZdZdZdZddZdZdZddddddZ	dd dZ
dd!d	Zd
ZdZ
dZd
ZedZdZdZdZdZdZdZdZdZdZddedZddedZddedZdedZdZdZ dZ!RS("s*represents sets (sacks) of Package ObjectscCs^h|_h|_h|_h|_h|_h|_h|_h|_d|_	d|_
dS(Ni(tnevrat	obsoletestrequirestprovidest	conflictst	filenamest
pkgsByRepotpkgsByIDR
RtindexesBuilt(R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR	Zs									cCs5d}x(|iD]}|t|i|7}qW|S(Ni(RR(RR#R0((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRjs

terrorcCsG|ip9|djo
tdqC|djo|iqCndS(scheck to see if the indexes are built, if not do what failure demands
           either error out or build the indexes, default is to error outRs$Indexes not yet built, cannot searchtbuildN(RRR[(Rtfailure((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt
_checkIndexesqs




cCsdS(s* Do nothing, mainly for the testing code. N((R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR{scCs
||_dS(N(R(RR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR/sc
CsQ|idd|ii|||||fo|i|||||fS|dj	o(|ii|ddddfg}n.g}x$|iiD]}|i|qWg}x|D]}	|o||	ijp\|o||	i	jpE|o||	i
jp.|o||	ijp|o||	ijoqn|i
|	qW|S(s6return list of pkgobjects matching the nevra requestedRRN(RRRR
tgetRt
itervaluesRR<R=R>R?R@R(
RR<R=R>R?R@Rt
pkgsbyRepoRRD((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRAs("
(cCs|iddh}xM|ii|gD]6}|id|||f}|o|||<q,q,W|ddjoF|ddf}x4|i|D]}|i|gi|qWn|S(s5return dict { packages -> list of matching provides }RRRit/N(NNN(RRRt
matchingPrcosR
RXRdR(RR<RORKRRDthitsthit((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRPs!cCsj|iddh}xM|ii|gD]6}|id|||f}|o|||<q,q,W|S(s5return dict { packages -> list of matching requires }RRR(RRRR(RR<RORKRRDR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRQscCs7|idd|ii|o|i|SgSdS(s<return list of package requiring the name (any evr and flag)RRN(RRR(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRRscCsp|iddg}|ddjo|i|i|n|ii|o|i|i|n|S(s<return list of package providing the name (any evr and flag)RRiR(RRRXRR(RR<t
returnList((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRSscCs7|idd|ii|o|i|SgSdS(sCreturn list of package conflicting with the name (any evr and flag)RRN(RRR(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRTscCs7|idd|ii|o|i|SgSdS(s=return list of package obsoleting the name (any evr and flag)RRN(RRR(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRUscCsh}xP|iD]B}t|idjoqn|i|igi|iqW|p|Std|iD}g}x,|D]$}||jo|i|qqWx|D]
}||=qW|S(sEreturns a dict of obsoletes dict[obsoleting pkgtuple] = [list of obs]icssx|]}|iVqWdS(N(R:(RR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pys	<genexpr>s	(	RRRRdR:RRRvR(RRVtobsRDRRR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRWs$
#
cCs7|idd|ii|o|i|SgSdS(sqreturn list of packages by filename
           FIXME - need to add regex match against keys in file list
        RRN(RRR(RR<((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRXscCs3|i|pg||<n||i|dS(N(RR(Rtdicttkeytdata((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt_addToDictAsListscCsf|i|pdSy||i|Wntj
onXt||djo||=ndS(Ni(Rtremovet
ValueErrorR(RRRR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt_delFromListOfDictscCsu|i}|i\}}}}}|ip||ijo|i|i||n|io|i|ndS(s"add a pkgobject to the packageSackN(R]R:RRRRt_addPackageToIndex(RRYR]R<R@R=R>R?((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRZ
s	
cCsP|ix6|iD]+}x"|i|D]}|i|q(WqWd|_dS(sbuilds the useful indexes for searching/querying the packageSack
           This should be called after all the necessary packages have been 
           added/deletediN(tclearIndexesRRR(RR]RY((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR[s

cCsLh|_h|_h|_h|_h|_h|_h|_d|_dS(Ni(RRRRRRRR(R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR%s							cCsx?|idD].\}}\}}}|i|i||qWx?|idD].\}}\}}}|i|i||qRWx?|idD].\}}\}}}|i|i||qWx?|idD].\}}\}}}|i|i||qWxD|iD]6}x-|i|D]}|i|i||q+WqW|i|i	|i
||i\}	}
}}}
|i|i|	|||
|
f||i|i|	ddddf|dS(NRRRR(t
returnPrcoRRRRRtreturnFileTypestreturnFileEntriesRRRR:RR
(RRYRFtflRHRIRJtftypetfileR<R@R=R>R?((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR1s*
%cCsx?|idD].\}}\}}}|i|i||qWx?|idD].\}}\}}}|i|i||qRWx?|idD].\}}\}}}|i|i||qWx?|idD].\}}\}}}|i|i||qWxD|iD]6}x-|i|D]}|i|i||q+WqW|i|i	|i
||i\}	}
}}}
|i|i|	|||
|
f||i|i|	ddddf|dS(NRRRR(RRRRRRRRRRRR:RR
(RRYRFRRHRIRJRRR<R@R=R>R?((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt_delPackageFromIndexDs*
%cCs8|i|i|i||io|i|ndS(sdelete a pkgobjectN(RRR]RR(RRY((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR\Us
c	Csg}|djo,xP|iD]}|i|i|qWn(y|i|}Wntj
onX|o/t|||dd}|d|d}n|S(s2return list of all packages, takes optional repoidRsrepo-pkgkeyiiN(R
RRtKeyErrorR(RR]R^R_RR0((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR[s

	cCs;h}|oQ|idd|ii|dddddf}|ptd|qvn|id|d|}x|D]|}|i|i|ifp|||i|if<q}||i|if}|i	|o|||i|if<q}q}W|o-|i|o||gStd|n|i
S(sreturn list of newest packages based on name, arch matching
           this means(in name.arch form): foo.i386 and foo.noarch are not 
           compared to each other for highest version only foo.i386 and 
           foo.i386 will be comparedRRisNo Package Matching %s.%sR^R_N(RRRR
RRRR<R@tverGTR(RRtR^R_thighdicttwhereRtpkg2((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRuns(%	c
Cs.h}x|id|d|D]}|i|ip%g||i<||ii|q||id}|i|o|g||i<n|i|o||ii|qqW|o*|i|o	||Std|ng}x2|iD]$}x|D]}	|i|	qWqW|S(sreturn list of newest packages based on name matching
           this means(in name.arch form): foo.i386 and foo.noarch will
           be compared to each other for highest versionR^R_isNo Package Matching  %s(RRR<RRtverEQRR(
RR<R^R_RRRt
returnlisttpolstRD((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRvs.
	
cCs4g}|id|dtD]}||iq~S(sLreturns a list of pkg tuples (n, a, e, v, r) optionally from a single repoidR^R_(RRR:(RR^R_t_[1]R((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRwscCs x|iD]}|GHq
WdS(N(R(RR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRxs
cCs<x5|iD]'}|i|jo|i|q
q
WdS(sDexclude incompatible arches. archlist is a list of compatible archesN(RR@R\(RRyR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRzs
c	Csh}x|iD]}g}xE|D]=}t||}|o!|i|o|i|q&q&Wt|djo&|o|||n|||<qqW|S(Ni(RRtsearchRR(	RR{R|R2tmatchesRDt	tmpvaluestfieldtvalue((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR}s
N(NNN(NNN("RRRR	RRRR/R
RARPRQRRRSRTRURRWRXRRRZR[RRRR\RRuRvRwRxRzR}(((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRXs>		
		
					
				
				!		cCsh}x|D]}}|i}d}||jo|i||d}n|djo|g||<q
|djo||i|q
q
Wg}x!|iD]}|i|qW|S(s3 Does the same as PackageSack.returnNewestByName() ii(R<tverCMPRRR(RRVRRtcvalR#tvals((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRs 	



cCseh}xR|D]J}|i|if}||jo|i||oq
n|||<q
W|iS(s7 Does the same as PackageSack.returnNewestByNameArch() (R<R@tverLER(RRVRR((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRs!tListPackageSackcBs#eZdZddZdZRS(sDerived class from PackageSack to build new Sack from list of
       pkgObjects - like one returned from self.returnNewestByNameArch()
       or self.returnNewestByName()cCs/ti||dj	o|i|ndS(N(RR	R
taddList(RtObjlist((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyR	s

cCs"x|D]}|i|qWdS(N(RZ(RtObjListtpkgobj((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRsN(RRRR
R	R(((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyRs(RtErrorsRR6RRRtpackagesRRtobjectRRRRRR(((s3/usr/lib/python2.6/site-packages/yum/packageSack.pyt<module>s.z		

Youez - 2016 - github.com/yon3zu
LinuXploit