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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/rpmUtils/updates.pyo
7Jc@sDddkZddkZddkZdZdddYZdS(iNcCstii||S(N(trpmUtilst	miscutilst
compareEVR(ttup1ttup2((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyt_vertup_cmpstUpdatescBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
dZdZ
d
ZdZdZdddZdddZdddZddddZddddZddddZdddZdddZdZRS(sM
    This class computes and keeps track of updates and obsoletes.
    initialize, add installed packages, add available packages (both as
    unique lists of name, arch, ver, rel, epoch tuples), add an optional dict
    of obsoleting packages with obsoletes and what they obsolete ie::
        foo, i386, 0, 1.1, 1: bar >= 1.1.
    cCs||_||_h|_d|_h|_h|_d|_tdddddddg|_	t
ii|_
t
ii|i
|_t
ii|i
|_t
ii|i
|_|i|id|_|i|id	|_h|_h|_d	|_h|_dS(
Nitkernels
kernel-smptglibcskernel-hugememskernel-enterprises
kernel-bigmemskernel-BOOTi(t	installedt	availabletrawobsoletestNonet_obsoletes_by_nametobsoleted_dicttobsoleting_dictt	exactarchtsett
exactarchlistRtarcht	canonArchtmyarchtisMultiLibArcht_is_multilibtgetArchListt	_archlisttgetMultiArchInfot_multilib_compat_archest
makeNADicttinstalldictt	availdicttupdatesdictt
updating_dicttdebugt	obsoletes(tselftinstlistt	availlist((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyt__init__ s*										cCs\xU|D]M}|i|pqnt|i||||<||p||=qqWdS(N(thas_keytfiltert__ne__(R#tdict_tkeystvaluetkey((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyt_delFromDictDscCs|\}}}}}|i||foUt|||fi|||f|||f<|||fp|||f=qn|i|dfoUt|||fi||df||df<||dfp||df=qndS(N(R'R(R)R(R#R*tpkgtuptntatetvtr((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyt_delFromNADictLs//cCsB||ijodS|ii||i|i||i|i|ii|g||i|i|ii|g||ii	|o_|i
oQx@|i|D]1\}}}|i|i
|g|||fqW|i|=qn|i|i|ii|g||i|i|ii|g|dS(s3remove available pkgtup that is no longer availableN(
R
tremoveR5RR.R RtgetRR'R
RR(R#R/tnametflagtversion((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyt
delPackageWs%%
&%cCs|io	|GHndS(N(R!(R#tmsg((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyt
debugprintjs
c	Csh}x|D]\}}}}}|i||fpg|||f<n|||fi|||f|oQ|i|dfpg||df<n||dfi||||fq
q
W|S(sreturn lists of (e,v,r) tuples as value of a dict keyed on (n, a)
            optionally will return a (n, None) entry with all the a for that
            n in tuples of (a,e,v,r)N(R'tappendR(	R#tpkglistt	Nonelistst
returndictR0R1R2R3R4((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyRns +c	Cst|djotidnt|djo	|dS|d\}}}xe|dD]Y\}}}tii|||f|||f}|djo|}|}|}q]q]W|||fS(s;takes a list of (e, v, r) tuples and returns the newest oneis%Zero Length List in returnNewest calli(tlenRt
RpmUtilsErrorRR(	R#tevrlisttnew_etnew_vtnew_rR2R3R4trc((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pytreturnNewests	'
c
Csg}d}x|D]}|\}}}	}
}||joq||jod|	|
|f}|djpt||djo|}g}n||jo|i|qqqW|S(sreturns a list of package tuples in a list (n, a, e, v, r)
           takes a package name, a list of archs, and a list of pkgs in
           (n, a, e, v, r) form.iN(RRR>(
R#R8tarchlistR?t
returnlistthigh_vertupR/R0R1R2R3R4tvertup((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyt"returnHighestVerFromAllArchsByNames


cCs\xU|iD]J}t|i|djo*|i|}tii||i|<q
q
WdS(s+remove any accidental duplicates in updatesiN(RRBRRtunique(R#ttuptmylist((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pytcondenseUpdatess


ic	Cs|idjolh|_x`|iiD]K\}}x<|D]4\}}}|ii|gi|||fq<Wq)Wnh}|i|d}	x|D]}|\}}
}}}
x|ii|gD]p\}}}|djo||djoqnti	i
|||f|o|i|gi|qqWqW|i}|o|i|}nh}xR|D]J}xA||D]5}|i
|pg||<n||i|qWqwW|S(saccept a list of packages to check to see if anything obsoletes them
           return an obsoleted_dict in the format of makeObsoletedDictiiN(Ni(R
RRt	iteritemst
setdefaultR>RR7RRt
rangeCheckR+t_reduceListNewestByNameArchR'(R#R?tnewestR/R"R8R9R:tobsdicttpkgdictRtepochtvertreltobs_flagtobs_versiont
obsoletingtobslistRAtnewtold((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pytcheckForObsoletes>	%c
CsZh}h}xO|iD]D\}}}}}|i|pg||<n||i|qWx|iD]}|\}	}
}}}
x|i|D]\}}\}}}|ii|dfoyxv|i|dfD]]\}}}}|djp7tii|||||ff|||||fod}|ii|	dfosxp|i|	dfD]W\}}}}|||
f}|||f}|i||f|jod}Pq_q_Wn||
jo|||	jo
d}n|oB|i|pg||<n||i|||||fq3qqWqqWqhW||_	|i
dS(svfigures out what things available obsolete things installed, returns
           them in a dict attribute of the class.iiN(Ni(RR'R>RRRRRURIR"tmakeObsoletedDict(R#RXt
obs_archesR0R1R2R3R4R/R8RRZR[R\tobs_nR9tobs_etobs_vtobs_rtrpm_atrpm_etrpm_vtrpm_rtwillInstalltins_atins_etins_vtins_rtpkgvertinstalledver((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pytdoObsoletessF





8	cCsh|_xa|iD]V}xM|i|D]>}|ii|pg|i|<n|i|i|q'WqWh|_xJ|iiD]9\}}x*|D]"}|ii|gi|qWqWdS(screates a dict of obsoleted packages -> [obsoleting package], this
           is to make it easier to look up what package obsoletes what item in 
           the rpmdbN(RR"R'R>RRSRT(R#RaRbt	obsoletedtobsoletingsR_((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyRds	
	c"s0g}g}h}|i}|i}x;|iD]-\}}||jo|||f=q1q1q1Wx|D]\}}|i|||f\}}	}
xe|||fD]R\}}}
||	|
f|||
fjo$|||fi|||
fqqWqiWx|D]\}}|ii||fox|i||fD]\}}}y&|i|||f\}}}
Wntij
o
qCqCXti	i
|||
f|||f}|djo>y$|||fi|||
fWqtj
oqXqCqCWq
q
WxS|iD]Etfd|}|i
dd
fgi|qWx6|iD](}t||djo||=ququWx(|D] \}}|d
joqn|ii|d
fog}g}x1||d
fD]\}}}}
|i|qWx4|i|d
fD]\}}}}
|i|q5Wt|djpt|djo"|id||i|q|id||i||fqqWxP|D]H\}}||ijo%|ii||fo|i|i||f\}}}|i||fo|i|||f\}}}
ti	i
|||
f|||f}|djoo|i|||||fpg||||||f<n||||||fi|||||
fqqqq|i|d
fd\}}}}|i|d
fox||d
fD]\}}}}
ti	i
|||
f|||f}|djoo|i|||||fpg||||||f<n||||||fi|||||
fq^q^WqqWg}|iotiii|io|ig}n|itii|ig}|id|id}tii|}t|t|g}nt|g}xK|D]C}x:|D]2}g}xC|i|d
fD].\}}}}
|i|||||
fqW|i|||}|i|d}||ijog}x@||d
fD].\}}}}
|i|||||
fqW|i|||}|i|d} x6|D]\}}| i||fo|id||f|||fd\}}}| ||fd\}}}
ti	i
|||
f|||f}|djoo|i|||||fpg||||||f<n||||||fi|||||
fqqqWq|id|g}!x!|D]\}}|!i|q	Wtii|!d	|i}|d
joqng}x@||d
fD].\}}}}
|i|||||
fq	W|i|||}|i|d} g}x!| D]\}}|i|q	Wtii|d	|i}|d
joqn|||fd\}}}| ||fd\}}}
ti	i
|||
f|||f}|djoo|i|||||fpg||||||f<n||||||fi|||||
fqqWqW||_|i d
S(scheck for key lists as populated then commit acts of evil to
           determine what is updated and/or obsoleted, populate self.updatesdict
        ics d|d|d|dfS(iii((tx(tna(s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyt<lambda>Ksisputting %s in complex updatesputting %s in simple updatetnoarchsprocessing %s.%ss
processing %sRN(!RRR+RIR6RR'RRCRRt
ValueErrortmapRTRtextendRBR>R=RRRtmultilibArchesRtarchesRRRRNRtgetBestArchFromListRtmakeUpdatingDict("R#tsimpleupdatet
complexupdatet
updatedicttnewpkgsRJR0R1RERFRGR2R3R4RkRlRmRHt
all_archestnakeytinstallarchst
availarchsRjt	archliststbiarchestmulticompatt
multiarchlisttthisarchlistttmplistthighestinstalledpkgsthipdictthighestavailablepkgsthapdictt	instarchs((Rys4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyt	doUpdatess,		


",&'
$
'

&%"'
?#'
?


 	 	'
?
 	
'
;	cCsqh|_xa|iD]V}xM|i|D]>}|ii|pg|i|<n|i|i|q'WqWdS(screates a dict of available packages -> [installed package], this
           is to make it easier to look up what package  will be updating what
           in the rpmdbN(R RR'R>(R#RbRa((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyRs	
c
Csg}|p|ox|D]\}}}}}	|o4||jo#|i|||||	fqqkn|o4||jo#|i|||||	fqqqqWn|}|S(s?returns a set of pkg naevr tuples reduced based on name or arch(R>(
R#R?R8RRKR0R1R2R3R4((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pytreduceListByNameArchs

c
CsOg}x<|iD]1}x(|i|D]}|i||fq$WqWg}|o]xZ|D]N\\}}}	}
}}||jo&|i|||	|
|f|fqYqYWn|o]xZ|D]N\\}}}	}
}}||jo&|i|||	|
|f|fqqWnx5|D]-}y|i|Wqtj
oqXqW|S(s`returns updates for packages in a list of tuples of:
          (updating naevr, installed naevr)(RR>R6R|(
R#R8RRKtoldtuptnewtupRR0R1R2R3R4titem((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pytgetUpdatesTupless0

.
.	cCsXg}x6|iD]+}x"|i|D]}|i|q$WqW|i|||}|S(s5returns updating packages in a list of (naevr) tuples(RR>R(R#R8RRKRR((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pytgetUpdatesList&s
ic
Cs5g}|ii}|o|i|}nx9|D]1}x(|i|D]}|i||fqJWq6Wg}|p|ox|D]\}\}	}
}}}
|o:||	jo)|i||	|
|||
ffqqn|o:||
jo)|i||	|
|||
ffqq#qqWn|}|S(sAreturns obsoletes for packages in a list of tuples of:
           (obsoleting naevr, installed naevr). You can specify name and/or
           arch of the installed package to narrow the results.
           You can also specify newest=1 to get the set of newest pkgs (name, arch)
           sorted, that obsolete something(R"R+RVR>(R#RWR8RRR`tobstuptrpmtupRKR0R1R2R3R4((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pytgetObsoletesTuples4s.
"
"c	Cs5g}|ii}|o|i|}nx9|D]1}x(|i|D]}|i||fqJWq6Wg}|p|ox|D]\\}	}
}}}
}|o:||	jo)|i|	|
|||
f|fqqn|o:||
jo)|i|	|
|||
f|fqq#qqWn|}|S(sBreturns obsoletes for packages in a list of tuples of:
           (obsoleting naevr, installed naevr). You can specify name and/or
           arch of the obsoleting package to narrow the results.
           You can also specify newest=1 to get the set of newest pkgs (name, arch)
           sorted, that obsolete something(R"R+RVR>(R#RWR8RRR`RRRKR0R1R2R3R4tinsttup((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pytgetObsoletersTuplesWs.
"
"cCsB|ii}|o|i|}n|i|||}|S(s^returns obsoleting packages in a list of naevr tuples of just the
           packages that obsolete something that is installed. You can specify
           name and/or arch of the obsoleting packaging to narrow the results.
           You can also specify newest=1 to get the set of newest pkgs (name, arch)
           sorted, that obsolete something(R"R+RVR(R#RWR8RRRK((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pytgetObsoletesListzs
cCslg}x_|iD]T}xK|i|D]<}|\}}}}	}
||jo|i|q$q$q$WqW|S(s:returns a list of pkgtuples obsoleting the package in name(R"R>(R#RWR8RKRaRR0R1R2R3R4((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pytgetObsoletedLists


c
Csh}h}g}x|iD]}d||<qWx|iD]}d||<q=WxD|iD]9}|i|o"|i|o|i|q[q[W|i|||}|S(sreturns a naevr tuple of the packages that are neither installed
           nor an update - this may include something that obsoletes an installed
           packagei(RR	R
R'R>R(R#R8RtupdatestinstRR/RK((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyt
getOthersLists


"cCsh}x|D]}|\}}}}}|i||fp||||f<q
|||f}	|	\}
}}}
}tii|||f||
|f}|djo||||f<q
q
W|iS(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 comparedi(R'RRRtvalues(R#t	tuplelistthighdictR/R0R1R2R3R4tpkgtup2tn2ta2te2tv2tr2RH((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyRVs'
N(t__name__t
__module__t__doc__R&R.R5R;R=RRIRNRRRcRuRdRRRRRRRRRRRRV(((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyRs0	$									!	.			##
((RtrpmUtils.miscutilst
rpmUtils.archRR(((s4/usr/lib/python2.6/site-packages/rpmUtils/updates.pyt<module>s	

Youez - 2016 - github.com/yon3zu
LinuXploit