KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21573/root/usr/lib/python2.4/site-packages/yum/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/root/usr/lib/python2.4/site-packages/yum/update_md.pyc
mò
üüPc@s
dZdkZdkZdklZlZdklZdkl	Z	dk
lZdkZdk
ZydklZWnej
odkZnXeiZdefd„ƒYZd	efd
„ƒYZd„Zdefd
„ƒYZd„ZedjoeƒndS(s+
Update metadata (updateinfo.xml) parsing.
N(sutf8_text_wrapsto_utf8(s
YumRepository(sFakeRepository(sto_xml(scElementTreetUpdateNoticeExceptioncBstZdZRS(s0 An exception thrown for bad UpdateNotice data. (t__name__t
__module__t__doc__(((t1/usr/lib/python2.4/site-packages/yum/update_md.pyR*stUpdateNoticecBsntZdZed„Zd„Zdd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
RS(
s@
    A single update notice (for instance, a security fix).
    cCsÇhdd<dd<dd<dd<dd<dd<dd<d	d<d
d<dd<dd<d
d<dd<dd<dd<dg<dg<dt<|_|o|i|ƒndS(Ntfromtttypettitletreleasetstatustversiont	pushcountt	update_idtissuedtupdatedtdescriptiontrightstseveritytsummarytsolutiont
referencestpkglisttreboot_suggested(tFalsetselft_mdtelemt_parse(RR((Rt__init__5s«cCs%|ii|ƒo|i|pdS(s: Allows scriptable metadata access (ie: un['update_id']). N(RRthas_keytitemtNone(RR ((Rt__getitem__NstfilescCsØd|i}|ido4|id|idjo|d|id7}ntd„|idƒ}t|ƒowd|jojd}xE|D]=}
|d	|
d
|
i	dƒod|
dpd
f7}qW||d i
ƒd7}ntd„|idƒ}t|ƒoRd|joEd}x |D]}|d|d
7}q,W||d i
ƒd7}n|idoOd|joBt|idddddddƒ}|ddi|ƒ7}n|idoOd|joBt|idddddddƒ}
|ddi|
ƒ7}n|idoOd|joBt|idddddddƒ}|ddi|ƒ7}n|id oOd |joBt|id ddddddƒ}|d!di|ƒ7}n|id"oOd"|joBt|id"ddddddƒ}|d#di|ƒ7}nd$|jo|d Snttiiƒƒ}d%}xT|id&D]E}x<|d'D]0}	|	d(|joqˆn|d|	d)7}qˆWqwW||d i
ƒ7}|S(*Ns,
===============================================================================
  %(title)s
===============================================================================
  Update ID : %(update_id)s
    Release : %(release)s
       Type : %(type)s
     Status : %(status)s
     Issued : %(issued)s
RRs    Updated : %scCs|ddjS(NRtbugzilla(tr(R%((Rt<lambda>bsRtbugss
       Bugs :s %s%s
	    :tidR	s - %sRiÿÿÿÿs
cCs|ddjS(NRtcve(R%(R%((RR&kstcvess
       CVEs :s
 %s
	    :Rtwidthi@tsubsequent_indentt is: s    Summary : %s
RsDescription : %s
Rs   Solution : %s
Rs     Rights : %s
Rs   Severity : %s
R#s
      Files :Rtpackagestarchtfilename(RRtheadtfiltertbzstlent	skip_datatbuglisttbzRtrstripR*tcvelistR)tutf8_text_wraptdatatjointdesctsettrpmUtilsR/tgetArchListtarchestfilelisttpkgtfile(RR5R1R3R6RCR9RARBRDR=R)R;R7R*((RttextRsd
);
cCst|iƒƒS(N(tto_utf8RRE(R((Rt__str__›scCs|iS(s Return the metadata dict. N(RR(R((Rtget_metadatažscCs\|idjo<x'dD]}|ii|ƒ|i|<qWx|D]}|idjo.|iptdƒ‚n|i|id<qA|id	jo|i|id	<qA|id
jo|iidƒ|id
<qA|idjo|iidƒ|id<qA|id
jo|i	|ƒqA|idjo|i|id<qA|idjo|i|id<qA|idjo|i|i|i<qA|idjo|i|id<qA|idjo|i|id<qA|idjo|i
|ƒqA|idjo|i|id<qA|idjo|i|id<qAqAWn
tdƒ‚dS(sæ
        Parse an update element::

            <!ELEMENT update (id, synopsis?, issued, updated,
                              references, description, rights?,
                              severity?, summary?, solution?, pkglist)>
                <!ATTLIST update type (errata|security) "errata">
                <!ATTLIST update status (final|testing) "final">
                <!ATTLIST update version CDATA #REQUIRED>
                <!ATTLIST update from CDATA #REQUIRED>
        tupdateRRRRR(sNo id element foundRR
RtdateRRRRRRRRR	R
sNo update element foundN(sfromstypesstatussversion(RttagtattribtgetRRtchildRERt_parse_referencest_parse_pkglist(RRRLRN((RR¢sH
cCsvxo|D]g}|idjoEh}x$d	D]}|ii|ƒ||<q*W|idi	|ƒqt
dƒ‚qWdS(
sv
        Parse the update references::

            <!ELEMENT references (reference*)>
            <!ELEMENT reference>
                <!ATTLIST reference href CDATA #REQUIRED>
                <!ATTLIST reference type (self|other|cve|bugzilla) "self">
                <!ATTLIST reference id CDATA #IMPLIED>
                <!ATTLIST reference title CDATA #IMPLIED>
        t	referenceR(threfRR	RsNo reference element foundN(sidRRstypestitle(RRQRKR;t	refattribRLRMRRtappendR(RRRSRQR;((RROÑs
cCsÅx¾|D]¶}hdg<}|iidƒo|iidƒ|d<nx]|D]U}|idjo|i|d<qP|idjo|di	|i|ƒƒqPqPW|idi	|ƒqWdS(s'
        Parse the package list::

            <!ELEMENT pkglist (collection+)>
            <!ELEMENT collection (name?, package+)>
                <!ATTLIST collection short CDATA #IMPLIED>
                <!ATTLIST collection name CDATA #IMPLIED>
            <!ELEMENT name (#PCDATA)>
        R.tshorttnametpackageRN(
Rt
collectionR;RLRRMR RKRERTRt_parse_packageR(RRR R;RX((RRPås	"cCs·h}x$dD]}|ii|ƒ||<q
Wxƒ|D]{}|idjo|i|d<q4|idjo#|iid	ƒ|if|d<q4|id
jot|i
d
<q4q4W|S(
s~
        Parse an individual package::

            <!ELEMENT package (filename, sum, reboot_suggested)>
                <!ATTLIST package name CDATA #REQUIRED>
                <!ATTLIST package version CDATA #REQUIRED>
                <!ATTLIST package release CDATA #REQUIRED>
                <!ATTLIST package arch CDATA #REQUIRED>
                <!ATTLIST package epoch CDATA #REQUIRED>
                <!ATTLIST package src CDATA #REQUIRED>
            <!ELEMENT reboot_suggested (#PCDATA)>
            <!ELEMENT filename (#PCDATA)>
            <!ELEMENT sum (#PCDATA)>
                <!ATTLIST sum type (md5|sha1) "sha1">
        R/tepochRVRR
tsrcR0tsumRRN(sarchRZsnamesversionsreleaseR[(RWtpkgfieldRRLRMRNRKREtTrueRR(RRRWRNR]((RRYús#cCsUdt|idƒt|idƒt|idƒt|idƒt|idƒt|idƒt|idƒt|id	d
tƒt|idƒf	}|ido|d
t|idƒ7}n|ido|dt|idƒ7}n|ido|dt|idƒ7}n|ido|dt|idƒ7}n|idoà|d7}xÅ|idD]¶}|do^|dt|dd
tƒt|dd
tƒt|dd
tƒt|dd
tƒf7}qz|dt|dd
tƒt|dd
tƒt|dd
tƒf7}qzW|d7}n|ido÷|d7}xê|idD]×}|dt|dd
tƒt|dƒf7}xŒ|d D]€}|d!t|d"d
tƒt|dd
tƒt|dd
tƒt|d#d
tƒt|dd
tƒt|d$ƒf7}q§W|d%7}|d&7}qhWn|d'7}|S()s.Generate the xml for this update notice objects§
<update from="%s" status="%s" type="%s" version="%s">
  <id>%s</id>
  <title>%s</title>
  <release>%s</release>
  <issued date="%s"/>
  <description>%s</description>
RRRRRR	R
RRLRRs  <summary>%s</summary>
Rs  <solution>%s</solution>
Rs  <rights>%s</rights>
Rs  <severity>%s</severity>
Rs  <references>
s8    <reference href="%s" id="%s" title="%s" type="%s"/>
RRR(s.    <reference href="%s" id="%s"  type="%s"/>
s  </references>
Rs  <pkglist>
s2    <collection short="%s">
      <name>%s</name>
RURVR.sx      <package arch="%s" name="%s" release="%s" src="%s" version="%s">
        <filename>%s</filename>
      </package>
R/R[R0s    </collection>
s
  </pkglist>
s
</update>
N(tto_xmlRRR^tmsgtreftcollRC(RRbRCR`Ra((Rtxmls< 

^K
.~

(sfiles(RRRR!RR"RERGRHRRORPRYRc(((RR/s	I			/			cCs=tii|d|d|df|d|d|dfƒS(s- Compare two "std." tuples, (n, a, e, v, r). iiiN(R?t	miscutilst
compareEVRttup1ttup2(RfRg((Rt_rpm_tup_vercmpQs!tUpdateMetadatacBsntZdZgd„Zed„ZeeƒZd„Zd„Z	dd„Z
d„Zd„Zed	„Z
RS(
s*
    The root update metadata object.
    cCsfh|_h|_h|_g|_x;|D]3}y|i|ƒWq+ti	j
o
q+q+Xq+WdS(N(
Rt_noticest_cachet	_no_cachet_repostrepostrepotaddtErrorstRepoMDError(RRnRo((RR\s				cCs@|djo|iiƒSn||ijo|i|pgS(s Return all notices. N(RVR!RRjtvaluesRl(RRV((Rtget_noticesgs
cCs]t|ƒtgƒtfƒfjodi|ƒ}n|ii|ƒo|i|pdS(si
        Retrieve an update notice for a given (name, version, release) string
        or tuple.
        t-N(RtnvrR<RRkRR!(RRv((Rt
get_noticeos%c		Cs|}|d}|d}g}xÊ|i|ƒD]¹}x°|dD]¤}x›|dD]}|d|jp|d|joqRn|d|d|dpd|d	|d
f}t
||ƒdjoqRn|i||fƒqRWqAWq0W|idt
dd
„dt
ƒ|S(s‹
        Retrieve any update notices which are newer than a
        given std. pkgtup (name, arch, epoch, version, release) tuple.
        iiRR.RVR/RZt0RR
tcmptkeycCs|dS(Ni(tx(R{((RR&“streverseN(tpkgtupt	oldpkgtupRVR/tretRRttnoticetupkgRCRhRTtsortR^(	RR}R€RVR~RRRCR/((Rtget_applicable_notices€s&

"0t
updateinfoc
Cså|p
t‚nt|ƒtdƒtdƒfjo3|idƒoti|ƒp
t|dƒ}n—t|tƒo`|i	|ijoI|ii|i	ƒ|i
|ƒ}	|	p
tƒ‚nti|	ƒ}qÿn't|tƒotid‚n|}xßt|ƒD]Ñ\}}|idjoµt|ƒ}
|ii|
dƒpŽ|
|i|
d<xz|
dD]j}xa|d	D]U}|
|id
|d|d|d
f<|ii|dt ƒƒ}|i"|
ƒqxWqgWqÝqqWdS(sA Parse a metadata from a given YumRepository, file, or filename. Rus.gztrtsNo updateinfo for local pkgRIRRR.s%s-%s-%sRVRR
N(#tobjRRtendswithtgziptopentinfilet
isinstancet
YumRepositoryR(RRmRTt
retrieveMDtmdtypetmdtFakeRepositoryRqRrt	iterparseteventRRKRtunRjRRCRDRkRlt
setdefaultR>tnoRp(RR†RŽRRCRDR’R•RŠRR“((RRp–s8
%3

&cCs.d}x!|iD]}|t|ƒ7}qW|S(Nu(RRtnoticesR€tunicode(RR€R((Rt__unicode__µs

cCst|iƒƒS(N(RFRR˜(R((RRGºscCs¡d}|o|i|ƒnxE|iiƒD]4}|o|i|iƒƒq.||iƒ7}q.Wd}|o|i|ƒn||7}|odSn|S(Ns<?xml version="1.0"?>
<updates>s</updates>
(	R`tfileobjtwriteRRjRsR€Rctend(RR™R`R›R€((RRc½s
(RRRRR!RttpropertyR–RwRƒRpR˜RGRc(((RRiVs				cCsÏdk}|iiƒd„}ttiƒdjo|ƒnyItidGHtƒ}x"tidD]}|i|ƒqfWt|ƒGHWn?t
j
o3tidtidtidfIJ|ƒnXdS(s update_md test function. NcCs)tidtidIJtidƒdS(NsUsage: %s <update metadata> ...ii(tsyststderrtargvtexit(((RtusageÙsiis%s: No such file:'%s'i(tyum.misctyumtmisctsetup_localeR¡R4RRŸRitumtsrcfileRpR—tIOErrorRž(R¦R§R£R¡((RtmainÔs 	
		%t__main__(RRRˆtyum.i18nR:RFtyum.yumRepoRŒtyum.packagesRR¢R_RqtrpmUtils.miscutilsR?t	xml.etreetcElementTreetImportErrorR‘t	ExceptionRtobjectRRhRiR©R(RFRqRRRhRR°R:R_R‘RˆRŒR©RiR?R((Rt?s*		


			ÿ#	~	


Anon7 - 2021