MINI MINI MANI MO

Path : /usr/lib/python2.7/site-packages/yum/
File Upload :
Current File : //usr/lib/python2.7/site-packages/yum/yumRepo.pyc


[c@sddlZddlZddlZddlZddlZejjdddlZddlZddl	m
Z
ddl	mZddlm
Z
ddlZddl	mZddlZddlZddlmZddlZddlZddlZddlmZdd	lmZdd
lmZddlmZddlTddlZddlZddl Z ddl!Z!ddl"Z"ddl#Z#ddl$Z$ddl%Z%ddl&Z&e'Z(y9ddl)Z)e*e)d
pe*e)dre+Z)nWne,k
r
e+Z)nXdZ-dZ.e!j/dej0ej1dZ2ej1dZ3dej4fdYZ5deej6fdYZ7e+dZ8dfdYZ9dS(iNtmedia(t
URLGrabber(tdefault_grabber(t
format_number(tURLGrabError(t
Repository(tconfig(tmisc(tcomps(t_(t*tgettsetcCs3ts
dSytj|d|}WndSX|S(Nsuser.yum.checksum.(txattrtNoneR(tfilenametchktypetret((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_xattr_get_chksumQscCs4ts
dSytj|d||WntSXtS(Nsuser.yum.checksum.(R
RRtFalsetTrue(RRtchksum((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_xattr_set_chksum\stignores	yum.Repossyum.verbose.RepostYumPackageSackcBsteZdZdZdZdZd
dZdZdd
ddZ	d	Z
d
ZdZdZ
RS(s;imports/handles package objects from an mdcache dict objectcCs&tjj|||_i|_dS(N(tpackageSacktPackageSackt__init__tpctadded(tselftpackageClass((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRos	cCsTy|jWn?tjk
rO}tjdt|t||jfnXdS(NsException %s %s in %s ignored(tclosetErrorst	RepoErrortverbose_loggertdebugtreprtstrt__del__(Rte((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR'tscCs
i|_dS(N(R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR zsc
Cs||jkr)||j|kr)dSnt|}|dkrd}x||D]t}|d7}|rz|j|||n||}|j||}	||	_|j|j||	|j|	qNW||jkrg|j|<n|j|jdd|_	n|dkr||jkrRd|j|krRt
jd||jfqRnd}xu|D]m}|d7}|r|j|||n||}||jkr_x%|j|D]}	|	j
|qWq_q_W|j|j|d|_	ndS(Ntmetadataiit	filelistst	otherdatas$%s md for %s imported before primary(R*R+(RtlentprogressbarRtidt_addToDictAsListtpkgsByIDt
addPackagetappendtindexesBuiltR!R"tui_idtimportFromDict(
Rtrepotdatatypetdataobjtcallbackttotaltcurrenttpkgidtpkgdicttpo((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytaddDict}sH


		


cCsx|D]}||jj|gkr.qn|dkrCd}n-|dkrXd}n|dkrd}nq|j||r|j||s|j|dtdd	qqqWd	S(
s& Just schedule the metadata downloads R)t
primary_dbR*tfilelists_dbR+tother_dbtasynctfailfuncN(RRt_check_db_versiont_check_uncompressed_db_gent_retrieveMDRR(RR6tdatatitemtmydbtype((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_retrieve_asyncs
			R)icCs|dkrdddg}n	|g}t|ds`tjd|jd|jd||_nx,|D]$}||jkr||j|krqgqn|dkrd	}d
}|j}	|jj}
nc|dkrd}d}|j	}	|jj
}
n3|dkrgd}d
}|j}	|jj}
nqg|j
||r|j||}|sj|j||}n|s|j|}|rtj|jd||j||}n|stjd|qn|jj|}
nt|_|	}|d}tj||d|j}|s3tjd|n|}|jj|}|j\}}|
||}
|s|j|||
|n~
qgW|`dS(NtallR)R*R+tcacheHandlertstoredirtrepoidR9R@tprimaryRARBtothers/gen/%s.sqlites %s: Check uncompressed DB faileds.xmltcacheds%s: Decompress DB failed(thasattrtsqlitecachectRepodataParserSqlitetcachedirR.RMRt
getPrimaryXMLt
getPrimarytgetFileListsXMLtgetFileliststgetOtherXMLtgetOtherdataREt_check_uncompressed_dbRFRGRtunlink_fR!R"t
open_databaseRt_xml2sqlite_localtrepo_gen_decompresstcachetrepoXMLtgetDatatchecksumR?(RR6tmdtypeR9t	cacheonlyRHRIRJtmymdtypetrepo_get_functiontrepo_cache_functiontdb_un_fntdb_fntdobjtxmltgenRtxmldatatctypetcsum((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytpopulatesn				
							
c
Cs|jj|}|j\}}tjj|}|jd|}|d}|j||d|dtspdSt
j||d|j}	|	r|j
|||	SdS(s7return file name of db in gen/ dir if good, None if nott/s.sqliteRHtcheck_can_failRRN(RcRdtlocationtostpathtbasenameRVt_checkMDRRRRaRbt_check_uncompressed_db_fn(
RR6Rftmydbdatatr_basetremotetfnamet
compressed_fnRkR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRFs
	c	Csl|jj|}|j\}}tjj|}|jd|}tj|dt	}|j
|||S(s8return file name of uncompressed db is good, None if notRttfn_only(RcRdRvRwRxRyRVRt
decompressRR{(	RR6RfR|R}R~RRRk((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR]$scCsld}tjj|rhy|j||dtWn*tk
r^|jsetj	|qeqhX|}n|S(Ntopenchecksum(
RRwRxtexiststcheckMDRRRbRR^(RR6RfRktresult((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR{.s
		cCs
|j|S(N(RE(RR6Rf((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRE>sN(t__name__t
__module__t__doc__RR'R RR?RKRsRFR]R{RE(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRms			,	T		
	t
YumRepositorycBs	eZdZdZdZdZeeZdZeeZ	dZ
dZdZeeZ
dZd	Zd
ZdZdyedzdZdZdZdZdZdZedZdZdZedZdZdZ edZ!edZ"dZ#dZ$dZ%dZ&ed Z'ed!Z(ed"d#Z)ed$d%Z*ed&d'Z+ed(d)Z,ed*Z-d+Z.d,Z/d-Z0d.Z1d/Z2ed0d1d2d3d4d5Z3d6Z4ed0d7d2d8d4d9Z5d:Z6dzdzdzdzdzdzdzdzd;edzd<Z7e7Z8dzdzed=Z9dzd;ed>Z:d?Z;d@Z<dAZ=edBZ>dCZ?dzdzdzdzdDZ@dEZAdzdzdFZBdzdGZCdHZDdIZEdJZFdzdKZGedLZHdMZIeJdNZKdzdzdOZLdPZMdzdQZNdzdRZOedSZPdzdTZQdUZRdVZSdzdzdWZTdXZUdzdYZVdZZWed0d[d2d\d4d]ZXd^ZYd_ZZed`Z[edzedaZ\dbZ]edcZ^ddZ_deZ`dfZadgZbdzdhZcdiZddjZedkZfdzdlZgdmZhdnZidodzdpZjdqZkdrZldsZmdtZnduZodvdwgdxZpRS({so
    This is an actual repository object

    Configuration attributes are pulled in from config.RepoConf.
    cCstjj|tj||d|_g|_g|_d|_d|_	d|_
d|_i|_d|_
t|_d|_i|_i|_d|_d|_d|_t|_i|_d|_d|_d|_d|_d|_idd6dd6dd	6dd
6dd6dd6|_t|_d|_d|_ d|_!d|_"d|_#t|_$d|_%d|_&d|_'d|_(t)|_*d|_+d|_,d|_-t|_.dS(
Nis
yumgroups.xmlsrepodata/repomd.xmltcachecookietiRPR*RQtgroupt
updateinfotprestodelta(/RtRepoConfRRRtrepofilet
mirrorurlst_urlstenablegroupstgroupsfilenamet
repoMDFilet_repoXMLt_oldRepoMDDataRbRt_retry_no_cachetmirrorlistparsedtyumvart_proxy_dicttmetadata_cookie_fnt_metadataCurrentt	_metalinktgroups_addedthttp_headerstrepo_config_agetbasecachedirtbase_persistdirtcostt
copy_localt	retrievedt_preloaded_repomdR9tmulti_callbacktfailure_objtmirror_failure_objtinterrupt_callbackt_callbacks_changedt	mediafunctgpg_import_functgpgca_import_functconfirm_funcRttimestamp_checkt_sackt	_grabfunct_grabt_async(RRO((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRHsV																																						cCs`|dkrdSt|dr+|j}nd}t|j|}|rM|St|j|jS(s@ Sort yum repos. by cost, and then by alphanumeric on their id. iRiN(RRSRtcmpR.(RRQtocostR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt__cmp__scCs.|jdkr'tjtj|_n|jS(N(RRt
sqlitesacktYumSqlitePackageSacktYumAvailablePackageSqlite(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getSackscCst|drt|dStj|}|s:d}ng|\}}||}d|kri|d}n8d|kr|d}nd|kr|d}nd}|j}xE|jD]:}d||kr|d7}|t|j|7}qqWt|d||S(s@ Show self.id, but include any $releasever/$basearch/etc. data. t__cached_ui_idRtmetalinkt
mirrorlisttbaseurlt$Rt(	RStgetattrRt_readRawRepoFileR.tui_repoid_varsR&Rtsetattr(Rtvaltinit
section_idRtvar((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_ui_ids*
	



	
cCs0|jdk	r|jjntj|dS(N(RRtsackR R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR scCs
d|_dS(N(RR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
_resetSackscCs|j|jr|jSdS(N(tdoProxyDictRR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt__getProxyDicts
	cCs|jS(s7Returns the instance of this repository's package sack.(R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytgetPackageSackscCs t|dr|jdk	StS(s;Returns true if this repository is setup and ready for use.tmetadata_cookieN(RSRcRR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytreadys
cCsCd|jjkr*|jjd}n|jjd}|jS(s"Returns the location of the group.tgroup_gzR(Rct	fileTypesRdRv(Rtthisdata((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytgetGroupLocationscCs|jS(N(R.(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt__str__siicCsytj||||SWn`tjtfk
r|}|r?dSd|}t|tjrjt|}ntj	|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(
RReR!t	MiscErrortEnvironmentErrorRt
isinstancetFIPSNonCompliantErrorR&R"(RtsumtypetfiletCHUNKtchecksum_can_failtdatasizeR(tmsg((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt	_checksums
c!Csd|j}d(}xt|D]}|jd#r;q n||krMq ntt||tjrnq nt||}|rt|tttd$fkrd%}nt|tj	krd&j
|}n|d'||f}q W|S()Ns[%s]
RRt
metalink_datatgrabtgrabfuncRctcfgRRRRRR9RRRR.RRRRRRRRtquick_enable_disableRRturlsRRRRR	iRs,
   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
mirrorurlssyumvarsrepofilesmulti_callback(R.tdirt
startswithRRttypest
MethodTypettypeRtListTypetjoin(Rtoutputt
excluded_varstattrtres((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytdumps4
+	cCso|jytj|ddgWnDtk
rj}|jtjkrXtj|qktt|nXdS(s%Persistently enables this repository.tonlytenabledN(	tenableRtwriteRawRepoFiletIOErrorterrnotEACCEStloggertwarningR&(RR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytenablePersistents
cCso|jytj|ddgWnDtk
rj}|jtjkrXtj|qktt|nXdS(s&Persistently disables this repository.RRN(	tdisableRRRRRRRR&(RR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytdisablePersistent"s
cCs9t|jdkr5|jr5tjd|jndS(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(R,RtmediaidR!R"R4(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytcheck-scCs|jr
dSi|_d}d
}|j|kr:d}n|jrd|j}|j|krtj|j}|j|kr|dtj|j7}ntjd|j	\}}d|||f}qn|dk	r
||jd<||jd<||jd	<ndS(Nt_none_Rs%st:s(\w+://)(.+)s%s%s@%sthttpthttpstftp(NRR(
RRtproxytproxy_usernameturllibtquotetproxy_passwordtretmatchtgroups(Rtproxy_stringtemptytauthtprototrest((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR4s&				


cCs]g}x+|jD] }|j||j|fqW|pFd|jksY|jdn|S(sAConvert our dict of headers to a list of 2-tuples for urlgrabber.tPragmasno-cache(Rsno-cache(RR2(RRbtheaderstkey((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt__headersListFromDictMscCs'tjdtjdd|jdS(Ns5setupGrab() will go away in a future version of Yum.
t
stackleveli(twarningstwarnR!tYumFutureDeprecationWarningt
_setupGrab(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt	setupGrabXs	csjdkrtjj}ntjj}j}tdjdjdj	dj
djdd|_fd	}j
}jrt||}nfd
}|j|d|_dS(s_sets up the grabber functions with the already stocked in urls for
           the mirror groupst
roundrobintprogress_objtmulti_progress_objtfailure_callbackRRtregettsimplecs|tj|jjdd}jjj|}|rxitj|d6i|j	d6|j
d6|jd6d6}n|S(Nt@itmirrortmax_connectionst
preferencetprivatetkwargs(turlparseturlsplittnetloctsplitRt_host2mcRRtto_utf8R'R(R)(turlthosttmc(R(s//usr/lib/python2.7/site-packages/yum/yumRepo.pytadd_mcns

c	si}|j}|jdksE|jdkrt|dddkrt|dj}|jtjkrt|d<qn|jd	krt|d
<nj}|rt	|r|difp|\}}}|j
||||n|S(
Niitcodeiiittriestremoveitfail(ii((t	exceptionRRtretriesR,RRRRtcallabletupdate(tobjtactionR(R6tcbtfuntargtkarg(R(s//usr/lib/python2.7/site-packages/yum/yumRepo.pytmirror_failures	'
	*N(tfailovermethodt
urlgrabberR&t
MGRandomOrdertMirrorGroupt_default_graboptsRR9RRRRRRRtmapR(RtmgclasstugoptsR4RRC((Rs//usr/lib/python2.7/site-packages/yum/yumRepo.pyR]s$				
		cCsi|jd6|jd6|jd6|jd6|jd6|jd6|jd6t|jd|d	6|j	d
6|j	d6|j
d6|jd
6|jd6t
jjd6|jd6|jd6|jd6}|jdkrt|d<n
|j|d<|S(Nt	keepalivet	bandwidthtretrytthrottlettimeouttminratet
ip_resolveRbRtssl_verify_peertssl_verify_hosttssl_ca_certtssl_certtssl_keyt
user_agenttusernametpasswordtftp_disable_epsvtlibproxytproxies(RLRMR:RORPRQRRttuplet#_YumRepository__headersListFromDictt	sslverifyt	sslcacertt
sslclientcerttsslclientkeyRtoptsRXRYRZR[RRt
proxy_dict(RRbRd((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRHs*

















cCs0|js|jr)|jt|_n|jS(N(RRRR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getgrabfuncs
cCs0|js|jr)|jt|_n|jS(N(RRRR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getgrabs
cCs
|jS(N(Rf(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt<lambda>scCs
|jS(N(Rg(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCs{tjj|r(tjj|r(dSytj|ddWn5tk
rv}dd|d|f}tj|nXdS(s@make the necessary directory path, if possible, raise on failureNtmodeis
%s: %s %s: %ssError making cache directorys	error was(RwRxRtisdirtmakedirstOSErrorR!R"(RtdpathR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_dirSetupMkdir_ps$c	Cstjj|j|j}tjj|j|j}tjj|d}tjj|d}|jd||jd||jd||jd|d}tjdkrd	}n|jd
|d||jd|d
||jd|j	}|jd|x1|j|jd|j
gD]}|j|q2Wx>|jgD]0}y|j|WqVt
jk
r}qVXqVW|jdrt|_n|jd|jd|jddS(s6make the necessary dirs, if possible, raise on failuretpackagesRt_dir_setup_cachedirt_dir_setup_pkgdirt_dir_setup_hdrdirt_dir_setup_persistdirRis-rot_dir_setup_gpgdirs/gpgdirt_dir_setup_gpgcadirs	/gpgcadirRtt_dir_setup_metadata_cookies/gens
repomd.xmlRsmirrorlist.txtsmetalink.xmlN(RwRxRRR.RtsetAttributetgeteuidRVRtpkgdirRnt
persistdirR!R"t_preload_md_from_system_cacheRR(	RRVRzRythdrdirtexttcookieRR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytdirSetups6	#

cCs3d|}t||s&|jnt||S(s; Make the directory attributes call .dirSetup() if needed. t_dir_setup_(RSRR(RR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_dirGetAttrs

cCsd|}t||s&|jn|dkrit|dsMg|_n|jjt||nt|||}|dkr|j|n|S(s; Make the directory attributes call .dirSetup() if needed. RRqt_old_pkgdirs(s_dir_setup_pkgdir(RSRRR2RRRn(RRRR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_dirSetAttrs

cCs
|jdS(NRV(R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRh	scCs
|jdS(NRz(R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRh
scCs
|jdS(NRy(R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCs|jd|S(NRy(R(Rtx((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRh
scCs
|jdS(NR|(R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCs|jd|S(NR|(R(RR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCs
|jdS(Ntgpgdir(R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCs|jd|S(NR(R(RR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCs
|jdS(Ntgpgcadir(R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCs|jd|S(NR(R(RR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCs
|jdS(NR(R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCs'tjdtjdd|jdS(Ns8baseurlSetup() will go away in a future version of Yum.
Ri(RRR!Rt
_baseurlSetup(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytbaseurlSetups	cCsF|jr
dS|jsdS|jjddkr6dS|j|_dS(NRi(RRtfind(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_hack_mirrorlist_for_anacondas		c	Csv|j|j|_|j|_g}|j|jrl|jrl|jt|jj	t
|_n|jr|jr|j|jt
|_n|j||_
|j|j
|_t|jdkr\t|dr\tjj|jr\|jsYytj|jWn+ttfk
rF}d|j|fGHqVXd|jGHqYq\n|j|_|jdS(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_urlRt
_orig_baseurlRRRtextendtlistRRRRt_getMirrorListRRR,RSRwRxRRRbRR^RRlR(RRR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR*s,
$	cCsg}d}x|D]}|dkr+qntj||j}|ddkr]|d}ny%tj|\}}}}}	}
Wn"tttfk
r}d}nX|dkr|}qq|j|qW|dk	r|rd	t	j
|GHqd
t	j
|GHn|S(
NRiRttblahRRRRsMYumRepo 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(RN(shttpsftpsfileshttps(Rtparsert
varReplaceRR+t
ValueErrort
IndexErrortKeyErrorR2RR0(Rturl_listtgoodurlstskippedR1tstbtptqtftoR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRNs*

%
cCs|js|jn|jS(N(RR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_geturlsls	
tfgetcCs
|jS(N(R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhqstfsetcCst|d|S(NR(R(Rtvalue((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhrstfdelcCst|ddS(NR(RR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhsscCs|js|jdd|_|jd}|jstj|j}|jd|jdk}y8t	d|j
|}|j||dd|j}Wqt
k
r}tjj|jsd	|j}tj|nd
||jdtj|jdfGHt|_qXn|jsy)tj||_tj||jWqtjk
r}d
||fGHt|_tj|qXn|jrtj|j|_qn|jS(NRtsmetalink.xmls.tmpRbRLR ttexts%s/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(RRVtmetalink_filenamet_metalinkCurrentRR0RRHthttp_cachingRR9turlgrabR4RRwRxRR!R"targst
to_unicodeRRtMetaLinkRepoMDtshutiltmovetMetaLinkRepoErrorParseFailR^(RtlocalR1RKtugRR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getMetalinkus6	
#
)			cCs
|jS(N(R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCst|d|S(NR(R(RR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhs	cCst|ddS(NR(RR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCsZ|r"|jdp!|jdS|js/tSx$|jD]}|j|s9tSq9WtS(NRtsfile:(RRRt_all_urls_are_filesR(RR1((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRs	R$cKs|dkr|j}n|dks0|dkrFtjd|jn|jdkrtjj|rk|Stjd||jfn|rt	j
|\}
}}}}n|jr|jrd}|r|
dkr|rt
|}qny\|jd|d|d|d|d	|d
|d|jd|jd
|d||f
}|SWqtjk
r~}tjtjd|fqXn|r|s|j|rtjtjj|}|j|j}|t|krtjtdtjj|t|tt|fqn|r,|
dkr,|jd|
}td|jd	|d|	d|jd|j d|d|d|j!|}|d|}y:|j"t#j$||dt#j$|d||f}Wqt%k
r(}|j&||d|||f}tj|}||_'|qXnt(|j)d|
}yg|j*j"t#j$||dt#j$|d||fd	|d|	d|d|d|d|j!|}Wnit%k
r}|j&||d|||f}t+|dd}tj,||}||_'|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 %sRRt	checkfunctrelativeRRR1Rtnametdiscnumtranges8Error getting package from media; falling back to url %ssKInsufficient space in download directory %s
    * free   %s
    * needed %sRbR R#R"Rtsizetretry_no_cacheRts*failed to retrieve %s from %s
error was %sRsfailure: %s from %s: %sterrorsN(-RRR!R"R4RbRwRxRR+R,RRtintRt
MediaErrorR#tlogt
logginglevelstDEBUG_2Rtstatvfstdirnametf_bavailtf_bsizetlongR	RRHRR9RRRRRR0Rt_del_dl_fileR6R^R_RRtNoMoreMirrorsRepoError(RR1RRtstarttendRRRR#RbRR*tschemeR-RxtquerytfragidRRR(tdirstattavailRKRR~terrstrRR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getFiles!T!	4				

	
c
sj}jj}|jrMjr=Stjn|dkrnfd}n|jdk|_	z@|j
d|d|dd|d|d|d	j|}Wdt|_	X|j
d
rjrd}	|	jjf}	tj|	n|S(Ncs5js1tjtdtdndS(Nis)Package does not match intended download.(tverifyLocalPkgRR^RR	(R=(Rtpackage(s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR"s
s
lazy:packagesR1RRRRRbRRCs3Downloaded package %s, from %s, but it was invalid.(trelativepathtlocalPkgtbasepatht_preload_pkg_from_system_cacheRRR^RRRRRRRR6R.R!R"(
RRRRRbR*R~RRR((RRs//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
getPackages2		

cCs|j}|j}|j}|j}||}	|j}
tjj|jsbtj	|jn|j
d|
d|d|d|ddd|d|dd	d
|d|	
S(NR1RRRR#RRRiRbR(RtlocalHdrthdrstartthdrendRRwRxRR|RkRR(RRRR#RbR~RRRRR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt	getHeader@s			
	!cCs|jdk	r|jS|j|j|j}|s8|S|jdd}tjj|s_t	S|j
|jdd}|jrtjj|rt	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.Rts
repomd.xmlsmetalink.xmlN(
RRtwithinCacheAgeRtmetadata_expireRVRwRxRRRRR(RtmC_deftrepomdfntmlfn((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytmetadataCurrentRs
	cCs|jdk	r|jS|jrHtjj|jrHtjd|n|jr]t	|_nNtjj|js~t
|_n-|j|j|j
rt	|_n	t
|_|jS(Ns$Cannot find metalink.xml file for %s(RRRbRwRxRRR!R"RRRRR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRos		cCst|dr|jjdr|jjdr|jtd}|jtd}|dkr{|dkswttS|dkr|dkrtSn|dkr|dkrtSqntS(s8Return whether cache_req matches metadata_expire_filter.t_metadata_cache_reqs
read-only:tfuturetpasttpresent(RRR(RR(RSRRtmetadata_expire_filterR,tAssertionErrorRR(Rt
cache_filtt	cache_req((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_matchExpireFilters
cCs|r|jrd}n|dkr=tjj|r=tSt}tjj|rtj|}|d|tjkrt}n|dtjkrt}n|js|S|dt	|j
krt}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(RRwRxRRRtstatttimetcheck_config_file_ageRR(Rtmyfiletexpiration_timetexpire_req_filterRtcookie_info((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRs 
				cCse|j}tjj|js*|j}ntj|tjrat|jd}|j~ndS(s/if possible, set touch the metadata_cookie filesw+N(	RRwRxRRVtaccesstW_OKtopenR (RRtfo((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytsetMetadataCookies	
cCsy1||_||_||_||_||_Wntjk
rL}nX|jr|jr|jr|j	rt
jtj
dt|_t|_ndS(Ns1Disabling media repo for non-media-aware frontend(RbRRRRR!R"RRRR#RRRRRRtskip_if_unavailable(RRbRRRRR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytsetups				
'	cCsO|jr2tjj|r2tjd|jn|jsG|jrKtSt	S(s( Should we cache the current repomd.xml s"Cannot find repomd.xml file for %s(
RbRwRxRR!R"R4RRR(RR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_cachingRepoXMLs
cCsk|jdif}|dkr0d|jk}nd}yvtjdddddtjj|}|jd|j	d	|d
dd|d
dd|d|j
dkdd}Wnmtk
r}tj
||rdStjd||fn.tjk
rtj
||rdSnXytj||Wn4tj
||rMdStjd||fnX|S(s* Call _getFile() for the repomd.xml file. told_repo_XMLRtprefixtrepomdtsuffixstmp.xmlRRRRiRR#RRbRLRisError downloading file %s: %ssError renaming file %s to %s(N(t
_checkRepoXMLRRttempfiletmktempRwRxRRRRRRR^R!R"trename(RRRt
grab_can_failRttfnameRR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getFileRepoXMLsD



cCsuytj|j|SWnWtjk
rp}|dkrJd|jk}n|rTdStjd|j|fnXdS(s Parse the repomd.xml file. Rs&Error importing repomd.xml from %s: %sN(	trepoMDObjecttRepoMDR.R!tRepoMDErrorRRR"R4(RRtparse_can_failR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
_parseRepoXMLscCsx+tj|jdD]}tj|qWtjj|r|d}tj|||j	|t
}|dkr|dSi|d6|d6|d6gd6|_|SdS(s= If we have an older repomd.xml file available, save it out. s
/*.old.tmps.old.tmpRRt	old_localtnew_MD_filesN(
tglobRVRR^RwRxRRtcopy2R	RRR(RRRR
Rn((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_saveOldRepoXMLs
cCs|jstjd|jnd|jkr;i|_dSx"|jdD]}tj|qIW|j}i|_d|krtj|d|dn|d|_	d|krdSx&|dD]}tj|d|qWdS(	s0 If we have older data available, revert to it. s*Can't download or revert repomd.xml for %sRNRR
Rtold_MD_filess.old.tmp(
RR!R"R4RRR^RwRR(RRtold_datatrevert((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_revertOldRepoXML s 				
cCsl|j}i|_d|kr2tj|dnd|krBdSx#|dD]}tj|dqMWdS(s  Done with old data, delete it. R
RNs.old.tmp(RRR^(RRR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_doneOldRepoXML?s		cCs|dkr|j}n|dkr?d|jkr?d}n|dkrq|j|dd|rq|d7}n||jj|fS(	NRRRQR*RPt_dbRc(sothers	filelistssprimary(RRcRREtrepoDataR(RRfRc((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_get_mdtype_dataLs	
cCsN|j\}}|jdtjj|}|rJtj|dt}n|S(NRtR(RvRVRwRxRyRRR(RRHt
compressedR}R~R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_get_mdtype_fnameXs
cCs~d|jkrtS|jd}|jrz|j|jjkrztjd|jtj	|jtj	|jjft
StS(s| We check the timestamps, if any of the timestamps for the
            "new" data is older than what we have ... we revert. RskNot using downloaded %s/repomd.xml because it is older than what we have:
  Current   : %s
  Downloaded: %s(RRRt	timestampRcRRR.RtctimeR(RR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_groupCheckDataMDNewer`s
		cCs|j|jkrtS|j|jkr,tSt}xJ|jD]?}||jkrWq<n|j||j|krutSt}q<W|S(s7 Check parsed repomd.xml against metalink.repomd data. (RRtlengthRt	checksumstchksumsR(RcRtdoneRe((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_checkRepoXMLMetalinkss
cCs|dkr|j}n|dkr0|j}n|j||jrItSxb|jjD]T}|j||rVtjt	j
dtj|jj
tj|j
ftSqVWtS(s@ Check the repomd.xml against the metalink data, if we have it. s/Using older repomd.xml
  Latest: %s
  Using: %sN(RRRR RRtold_repomdsR#RRRRRRR(RRcRR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_checkRepoMetalinkscCsk|j|}|stS|j|js0tS|jj}|jr[|j|jkr[tS|j	||S(sx Save the Old Repo XML, and if it exists check to see if it's the
            latest available given the metalink data. (
RRRRRRRRRR (RRtoxmlR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_latestRepoXMLs
	cCsN|jd}|jdk	r tS|j|r>t}|}nt}|j|rr|}|j}|d|_ni|j||}|dkr|j	rt
|dr|jdkrtj
d|jn|jtS|j|jdkr	|j||_n|jdkr&|jtS|r0tS|jsJ|jtStS(	s` Common LoadRepoXML for instant and group, returns False if you
            should just return. s/repomd.xmlRRtwritesread-only:futures Can't download repomd.xml for %sN(swritesread-only:future(RVRRRRRR$RRRRSRR!R"R4RRR	R(RRtmdtypesRtcachingRR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_commonLoadRepoXMLs<
		



cCs[|jdkrtS|dkr+|j}n||jkrWt|j|jkrWtSntS(NRn(tmddownloadpolicyRRRcRt	DBVERSIONt	dbversionR(RRfRc((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyREsc	Cs|dkrdS|s.t}|j|}nEt}|j|}tjj|sstj|dt}t}n|j	tjj
||j||d|d|dtsdS|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). RRRHRuN(RRRRwRxRRRRR{RyRz(RRHtdbmdtypetmmdtypet
file_checkRR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_groupCheckDataMDValids	cCsZ|j|}x7|D]/\}}|j|dts|jtSqW|j|tS(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. tretrieve_can_fail(t_commonRetrieveDataMD_listRGRRRt_commonRetrieveDataMD_done(RR&tdownloadingtndatatnmdtype((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_commonRetrieveDataMDs

cCsd}|jj}xH|jjD]7}||kr@q(n|dkrRq(n|j|q(W|d
krx|}ng}d|jkrd
}n|jd}||jd<g}|jd<g}xO|D]G}|j|\}	}
|r|j|d	|\}}|j|||t	}
|
r||||	|
rCqnt
j|
|
d
|j|
|
d}t
jj
|rt
j||d
|j|qqn|
d
krqn||krqn|j|
|	|rqn|j|
|	f|j|j|
tqW|S(s+ Return a list of metadata to be retrieved cSs||dkrtS||kr tS|j|jkr6tStjj|jd}tjj|jd}||krxtStS(s9 Check if two returns from _get_mdtype_data() are equal. iN(RRReRwRxRyRvR(tomdtypetodataR5R4tornametnrname((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
_mdtype_eqsR@RARBRRRRRcs.old.tmps.sqlite(s
primary_dbsfilelists_dbsother_dbsgroup_gzN(RtkeysRcRR2RRRR/RRwRRxRRR(RR&R;tall_mdtypesRftrevertsRt
newmdfilesR3R5R4R7R8Rt	gen_local((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR1sR			




cCs7x&|D]\}}|j|t}qW|jdS(s$ Uncompress the downloaded metadata N(RRR(RR3R4R5R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR2oscCs#|j|r|j|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(R(R6(RRR&((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_groupLoadRepoXMLvscCsidgd6dgd6ddddgd6ddddd	d
gd6}t}t|jtjkr|j|j|j|jgn0x-|jD]"}|j|j||gqW|sd|krd}n|jdt	t
|}|S(
Nt__None__tinstantRPs
group:primaryRRtpkgtagssgroup:smallR*Rs
group:mains	group:all(RRtmdpolicyRtStringTypesR<RRtdiscardtsortedR(Rt	md_groupsR&RE((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_mdpolicy2mdtypess

	% 	
cCs[y|j||jSWntk
r:|jnXtjd|j|jfdS(s5retrieve/check/read in repomd.xml from the repositorys#Bad loadRepoXML policy (for %s): %sN(RARJtKeyboardInterruptRR!R"R4RE(RR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_loadRepoXMLs

cCs*|jr|jS|jd|j|jS(NR(RRLR4(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getRepoXMLs	cCs
|jS(N(RM(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCst|d|S(NR(R(RR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCst|ddS(NR(RR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCst|tjkr!|j}n|}|jr|jrtjdkr_t	dd|n|j
d}yP|jddddd|d	d
|jddddd
|j
dkdd}Wn,t	k
r}t	dd||fnXtj|||j}|rq|jrqy|j||jWn)tjk
rU}t	dd|nXtj|||j}n|st	dd|qnytj|j|}Wn/tjk
r}t	dd||fnX|j|jr|j|rt	dd|ndS(Nis?pygpgme is not working so repomd.xml can not be verified for %ss/repomd.xml.ascRsrepodata/repomd.xml.ascRiRRs%s/signatureR#RRbRLRis1Error 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InstanceTypeRt
repo_gpgcheckt_override_sigchecksRtgpgmeRRRVRR4Rtvalid_detached_sigRRRR!tYumBaseErrorRRR.RRRR"(RRtfilepathtsigfileRR(tvalidRc((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRsF



	cCsCtj|}|sdS|r2|j|kr2dStj|dS(s4 Delete a downloaded file if it's the correct size. N(Rtstat_ftst_sizeR^(RRRtsd((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRscCs|j|||S(s,check the metadata type against its checksum(Rz(RtfnRfR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRscCs|}|dkr'|jj|}n|rH|j\}}|j}	n|j\}}|j}	t|tj	kr|j
}
n|}
|	dk	rt|	}	nt|
|}|r"t
j|
}|dk	r"|	dkr||kr|jdkrdS|	|jkr||krdSq"ny|j||
d|	}Wn3tjk
rs}
|r]dStdd|
nX||krt|
||dS|rdStdddS(	s5 Internal function, use .checkMD() from outside yum. iiRisError performing checksum: %sis%Metadata file does not match checksumN(RRcRdRtopensizeReRRRRNRRRRRWRXRR!R"RR(RRZRfRRHRuRtr_ctypetr_csumRRtl_csumtfsizeR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRzsB	'
cCs
|j|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'.(RG(RRf((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
retrieveMDscsjj}|j\}}tjj|}jd|}jjrZ|Sj	rst
j|ntjj|sj
tjj|rj|dtrdj<|Snjdkr&|rdStjj|rd|}	nd|jf}	tj|	nt}
jjd}|dk	r|jj}|dk	rtjj|jd}
||
kp|j|jk}
qnyfd}djf}|jdks|
rd}nd	}j|t|jjd
|d|ddd
|d|d|djdkd|j|}WnVtjk
rz|rtdSn:tk
r}|rdStjd|jfnX|SdS(s8 Internal function, use .retrieveMD() from outside yum. RtRuis;Caching enabled and local cache: %s does not match checksums0Caching enabled but no local cache of %s from %sRcsLyj|Wn$tk
r:tj|jnXdj<dS(Ni(RRRR^RR(R=(RfR(s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRQs
s%s/%sR$RRRR#RRRbRLRs6Could not retrieve %s matching remote checksum from %sN(RcRdRvRwRxRyRVRRRRR^RR{RzRRbRR4R!R"RRReRRRRRR(RRfR0R*RR}R~RRRtpartialtorepomdR8tofnameRRR#R(((RfRs//usr/lib/python2.7/site-packages/yum/yumRepo.pyRGsl	


	
cCs
|jdS(s]this gets you the path to the primary.xml file, retrieving it if we
           need a new oneRP(R`(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRWwscCs
|jdS(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.7/site-packages/yum/yumRepo.pyRY~scCs
|jdS(NRQ(R`(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR[scCsd|jjkr|jddt}|r{ytj|dd|j}Wq{tk
rw}tj	|d}q{Xn|S|jddtS(sgets groups and returns group file path for the repository, if there
           is none or retrieve/decompress fails, it returns NoneRR0s	comps.xmlRRRN(RcRRGRRRaRbRRRR(RRZR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt	getGroupss

cCs||_||_t|_dS(N(R9RRR(RR9R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytsetCallbacks		cCs||_t|_dS(N(RRR(RR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
setFailureObjs	cCs||_t|_dS(N(RRR(RR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytsetMirrorFailureObjs	cCs||_t|_dS(N(RRR(RR9((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytsetInterruptCallbacks	cCsg}g}|dk	ry|j}Wn=tk
rg}|dkrOd}nd||fGHg}nXxT|D]I}tjd|sqon|j}|jdd}|j|qoWn||fS(s5 read the mirror list from the specified file object s	<unknown>s+Could not read mirrorlist %s, error was 
%ss
\w+://\S+\s*$s$ARCHs	$BASEARCHN(Rt	readlinest	ExceptionR
RtrstriptreplaceR2(RRR1t
returnlisttcontentR(tlineR&((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_readMirrorLists"	

cCs|jdd|_d}t}|j|j|jdtrft}t|jd}d|j}n|j}t	j	|d}|dkrd|}n|j
}ytjj
||}WnBtk
r}d||jdtj|jd	fGHd}nX|j||\}}|rt|jr|rt|jd
}	x|D]}
|	j|
qMW|	jqnL|rtjj|jrtj|jd|jt|jddS|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
           Rtsmirrorlist.txtRtrsfile://iRs1Could not retrieve mirrorlist %s error was
%s: %sitwN(RVRRRRtmirrorlist_expireRRRR+RHREtgrabberturlopenRRRRRpRbR%R RwRxRtutime(RRtcacheokR1RRKR(RmRnRRo((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRs:		
)

cCs~tjj|stStjj|r[tj|tjtj|tjkr[tSnytj||WntSXtS(s&attempts to copy the file, if possible(	RwRxRRRtST_CTIMERR
R(RRZtdestfn((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
_preload_files,RcCst|dstS|jdkr&tStjj|j|j}tjj|sWtStjj|tjj|j	krtS|d|tjj
|}|dkr|j	d|tjj
|}n|j||S(sLattempts to copy the file from the system-wide cache,
           if possibletold_base_cache_dirRRtN(
RSRR{RwRxRR.RtnormpathRVRyRRz(RRtsubdirRytglob_repo_cache_dirRZ((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_preload_file_from_system_caches'$cCs
|j|S(sUattempts to copy the metadata file from the system-wide cache,
           if possible(R(RR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR{scCstjj|j}tjj|j|}|j|jddd|rUtSt|dsht	Sx6|j
D]+}|jtjj|||rrtSqrWt	S(sOattempts to copy the package from the system-wide cache,
           if possibleR}s	packages/RyR(RwRxRyRRRyRRRSRRRz(RtpkgtpnameRytopkgdir((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRs	!cCsg}dGHy|jj}Wn<tjk
r\}tddt|}|j||SXxp|D]h}d|GHy|j|Wqdtjk
r}d|}td|t|}|j|qdXqdW|S(Nsverifying mdisfailed to load repomd.xmlsverifying %ss.%s metadata missing or does not match checksumi(RcRR!R"tRepoVerifyProblemR&R2R`(Rtproblemstmd_typesR(tprbtmd_typeR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
_verify_md"s"

	
cCsdGHg}|j}|dk	r5tj|}nytj}|j|WnJtjtj	fk
r}d}t
t|t|}|j|n8X|j
dkrd}t
t|d}|j|n|S(Nsverifying compsscomps file failed to addisno groups in compsR(RdRRRRtCompstaddR!tGroupsErrortCompsExceptionRtREPO_PROBLEM_COMPSR&t
compscount(RRtgrpfiletcR(RR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
_verify_comps7s"cCsgS(N((R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_verify_packagesSstrepodataRcCs|g}d|kr(|j|jnd|krV|jrV|j|jqVnd|krx|j|jn|S(s}download/verify the specified items
           @items = ['repodata', 'comps'] can include: repodata, comps, packages
        RRRo(RRRRR(RtitemsR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytverifyVs	iN(qRRRRRRtpropertyRRR4R Rt_YumRepository__getProxyDictReRRRRRRRRRRRRRR_RRRHRfRgRRRnRRRRVRzRyR|RRRRRRRRRRRRRt_YumRepository__getRRRRRRRRRRR	RRRRRRtstaticmethodR R"R$R(RER/R6R1R2RARJRLRMRcRRRRzR`RGRWRYR[RdReRfRgRhRpRRzRR{RRRRR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRAs	=	
	
															<				'									$				$		
h)			#		*			
		-
	S						,	
0	Z								,						cCsRtjdtjddg}ttjdr=tj}nddl}|}tj|d}|dkr{d|}n|}y|j	|d	|}WnBt
k
r}d
||jdtj
|jdfGHd}nX|dk	rN|j}	xT|	D]I}
tjd|
rqn|
j}|jd
d}|j|qWn|S(Ns9getMirrorList() will go away in a future version of Yum.
RiRuiiRsfile://R]s1Could not retrieve mirrorlist %s error was
%s: %sis\s*(#|$)s$ARCHs	$BASEARCH(RRR!RRSRERtR
R+RuRRRRRRiR
RRkRlR2(RtpdictRmturlresolverR
RR1RR(RnRoR&((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
getMirrorListgs2	
)

RcBseZdZedZRS(s9 Holder for each "problem" we find with a repo.verify(). cCs(||_||_||_||_dS(N(Rtmessagetdetailstfake(RRRRR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRs			(RRRRR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRs(:RwR
RRR+t
uses_fragmentR2R
R!turlgrabber.grabberRRturlgrabber.progressRturlgrabber.mirrorRERRRtreposRRRTRtyumRRRR	t	constantsRtloggingRRRRRRRRtskip_old_DBMD_checkR
RSRtImportErrorRRtsimplefilterRt	getLoggerRR#RRRRRR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt<module>sn
 


		-%

OHA YOOOO