Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /usr/lib/python2.7/site-packages/yum/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/python2.7/site-packages/yum/yumRepo.pyc
�
�v_c@s�ddlZddlZddlZddlZddlZejjd�ddlZddlZddl	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
�p�e*e)d�r�e+Z)nWne,k
r
e+Z)nXd�Z-d�Z.e!j/dej0�ej1d�Z2ej1d�Z3dej4fd��YZ5deej6fd��YZ7e+d�Z8dfd��YZ9dS(i����Ntmedia(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.RepostYumPackageSackcBsteZdZd�Zd�Zd�Zd
d�Zd�Zdd
dd�Z	d	�Z
d
�Zd�Z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|j�Wn?tjk
rO}tjdt|�t|�|jf�nXdS(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||jkr�g|j|<n|j|jd�d|_	n�|dkr�||jkrRd|j|krRt
jd||jf�qRnd}xu|D]m}|d7}|r�|j|||�n||}||jkr_x%|j|D]}	|	j
|�q�Wq_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


		


cCs�x�|D]�}||jj|g�kr.qn|dkrCd}n-|dkrXd}n|dkrd}nq|j||�r|j||�s�|j|dtdd	�q�qqWd	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_async�s
			R)icCs�|dkrdddg}n	|g}t|d�s`tjd|jd|jd|�|_nx,|D]$}||jkr�||j|kr�qgq�n|dkr�d	}d
}|j}	|jj}
nc|dkr�d}d}|j	}	|jj
}
n3|dkrgd}d
}|j}	|jj}
nqg|j
||�r�|j||�}|sj|j||�}n|s�|j|�}|r�tj|jd|�|j||�}n|s�tjd|�q�n|jj|�}
n�t|_|	�}|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.pytpopulate�sn				
							
c
Cs�|jj|�}|j\}}tjj|�}|jd|}|d}|j||d|dt�spdSt
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~RR�Rk((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR]$scCsld}tjj|�rhy|j||dt�Wn*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	eZdZd�Zd�Zd�Zee�Zd�Zee�Z	d�Z
d�Zd�Zee�Z
d�Zd	�Zd
�Zd�Zdyedzd�Zd�Zd�Zd�Zd�Zd�Zed�Zd�Zd�Zed�Zd�Zd�Z ed��Z!ed��Z"d�Z#d�Z$d�Z%d�Z&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/�Z2ed0d1�d2d3�d4d5��Z3d6�Z4ed0d7�d2d8�d4d9��Z5d:�Z6dzdzdzdzdzdzdzdzd;edzd<�Z7e7Z8dzdzed=�Z9dzd;ed>�Z:d?�Z;d@�Z<dA�Z=edB�Z>dC�Z?dzdzdzdzdD�Z@dE�ZAdzdzdF�ZBdzdG�ZCdH�ZDdI�ZEdJ�ZFdzdK�ZGedL�ZHdM�ZIeJdN��ZKdzdzdO�ZLdP�ZMdzdQ�ZNdzdR�ZOedS�ZPdzdT�ZQdU�ZRdV�ZSdzdzdW�ZTdX�ZUdzdY�ZVdZ�ZWed0d[�d2d\�d4d]��ZXd^�ZYd_�ZZed`�Z[edzeda�Z\db�Z]edc�Z^dd�Z_de�Z`df�Zadg�Zbdzdh�Zcdi�Zddj�Zedk�Zfdzdl�Zgdm�Zhdn�Zidodzdp�Zjdq�Zkdr�Zlds�Zmdt�Zndu�Zodvdwgdx�ZpRS({so
    This is an actual repository object

    Configuration attributes are pulled in from config.RepoConf.
    cCs�tjj|�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.xmltcachecookieti�RPR*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|d�r+|j}nd}t|j|�}|rM|St|j|j�S(s@ Sort yum repos. by cost, and then by alphanumeric on their id. iR�i�N(RRSR�tcmpR.(RRQtocostR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt__cmp__�scCs.|jdkr'tjtj�|_n|jS(N(R�Rt
sqlitesacktYumSqlitePackageSacktYumAvailablePackageSqlite(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getSack�scCst|d�rt|d�Stj|�}|s:d}ng|\}}||}d|kri|d}n8d|kr�|d}nd|kr�|d}nd}|j}xE|jD]:}d||kr�|d7}|t|j|�7}q�q�Wt|d|�|S(s@ Show self.id, but include any $releasever/$basearch/etc. data. t__cached_ui_idR�tmetalinkt
mirrorlisttbaseurlt$Rt(	RStgetattrRt_readRawRepoFileR.tui_repoid_varsR&R�tsetattr(Rtvaltinit
section_idRtvar((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_ui_id�s*
	



	
cCs0|jdk	r|jj�ntj|�dS(N(R�RtsackR 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
_resetSack�scCs|j�|jr|jSdS(N(tdoProxyDictR�R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt__getProxyDict�s
	cCs|jS(s7Returns the instance of this repository's package sack.(R�(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytgetPackageSack�scCs t|d�r|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.pytready�s
cCsCd|jj�kr*|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.pytgetGroupLocation�scCs|jS(N(R.(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt__str__�siicCs�ytj||||�SWn`tjtfk
r|}|r?dSd|}t|tj�rjt|�}ntj	|��nXdS(s�takes 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	_checksum�s
c!Cs�d|j}d(}x�t|�D]�}|jd#�r;q n||krMq ntt||�tj�rnq nt||�}|r�t|�tt�td$�fkr�d%}nt|�tj	kr�d&j
|�}n|d'||f}q W|S()Ns[%s]
R�R�t
metalink_datatgrabtgrabfuncRctcfgR�R�R�R�R�R9R�R�R�R.R�R�R�R�R�R�R�R�tquick_enable_disableR�R�turlsR�R�R�R�R	iR�s,
   s%s = %s
(!s	mediafuncssacks
metalink_datasgrabsgrabfuncsrepoXMLR�s	retrievedsmirrorlistparsedsgpg_import_funcsgpgca_import_funcsfailure_objscallbacksconfirm_funcsgroups_addedsinterrupt_callbacksidsmirror_failure_objsrepo_config_agesgroupsfilenames
copy_localsbasecachedirshttp_headerssmetadata_cookiesmetadata_cookie_fnR�s
repoMDFilestimestamp_checksurlss
mirrorurlssyumvarsrepofilesmulti_callback(R.tdirt
startswithR�R�ttypest
MethodTypettypeRtListTypetjoin(Rtoutputt
excluded_varstattrtres((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytdump�s4
+	cCso|j�ytj|ddg�WnDtk
rj}|jtjkrXtj|�qktt|��nXdS(s%Persistently enables this repository.tonlytenabledN(	tenableRtwriteRawRepoFiletIOErrorterrnotEACCEStloggertwarningR&(RR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytenablePersistents
cCso|j�ytj|ddg�WnDtk
rj}|jtjkrXtj|�qktt|��nXdS(s&Persistently disables this repository.R�R�N(	tdisableRR�R�R�R�R�R�R&(RR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytdisablePersistent"s
cCs9t|j�dkr5|jr5tjd|j�ndS(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,R�tmediaidR!R"R4(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytcheck-scCs|jr
dSi|_d}d
}|j|kr:d}n�|jr�d|j}|j|kr�tj|j�}|j|kr�|dtj|j�7}ntjd|�j	�\}}d|||f}q�n|dk	r
||jd<||jd<||jd	<ndS(Nt_none_R�s%st:s(\w+://)(.+)s%s%s@%sthttpthttpstftp(NRR�(
R�Rtproxytproxy_usernameturllibtquotetproxy_passwordtretmatchtgroups(Rtproxy_stringtemptytauthtprototrest((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR�4s&				


cCs]g}x+|jD] }|j||j|f�qW|pFd|jksY|jd�n|S(sAConvert our dict of headers to a list of 2-tuples for urlgrabber.tPragmasno-cache(Rsno-cache(R�R2(RRbtheaderstkey((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt__headersListFromDictMscCs'tjdtjdd�|j�dS(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	cs��jdkrtjj}ntjj}�j�}td�jd�jd�j	d�j
d�jdd|��_�fd	�}�j
}�jr�t||�}n�fd
�}|�j|d|��_dS(s_sets up the grabber functions with the already stocked in urls for
           the mirror groupst
roundrobintprogress_objtmulti_progress_objtfailure_callbackR�R�tregettsimplecs|tj|�jjd�d}�jjj|�}|rxitj|�d6i|j	d6|j
d6|jd6d6}n|S(Nt@i����tmirrortmax_connectionst
preferencetprivatetkwargs(turlparseturlsplittnetloctsplitR�t_host2mcRRtto_utf8R'R(R)(turlthosttmc(R(s//usr/lib/python2.7/site-packages/yum/yumRepo.pytadd_mcns

c	s�i}|j}|jdksE|jdkr�t|dd�dkr�t|d�j�}|�jt�j�kr�t|d<q�n|jd	kr�t|d
<n�j}|r�t	|�r�|difp�|\}}}|j
||||��n|S(
Niitcodeiii�ttriestremovei����tfail(ii�((t	exceptionR�R�tretriesR,R�RRR�tcallabletupdate(tobjtactionR(R6tcbtfuntargtkarg(R(s//usr/lib/python2.7/site-packages/yum/yumRepo.pytmirror_failures	'
	*N(tfailovermethodt
urlgrabberR&t
MGRandomOrdertMirrorGroupt_default_graboptsRR9R�R�R�R�R�R�R�tmapR�(RtmgclasstugoptsR4R�RC((Rs//usr/lib/python2.7/site-packages/yum/yumRepo.pyR]s$				
		cCs�i|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}|jdkr�t|d<n
|j|d<|S(Nt	keepalivet	bandwidthtretrytthrottlettimeouttminratet
ip_resolveRbR�tssl_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.pyRH�s*

















cCs0|js|jr)|j�t|_n|jS(N(R�R�RR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getgrabfunc�s
cCs0|js|jr)|j�t|_n|jS(N(R�R�RR(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getgrab�s
cCs
|j�S(N(Rf(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt<lambda>�scCs
|j�S(N(Rg(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRh�scCs{tjj|�r(tjj|�r(dSytj|dd�Wn5tk
rv}dd|d|f}tj|�nXdS(s@make the necessary directory path, if possible, raise on failureNtmodei�s
%s: %s %s: %ssError making cache directorys	error was(RwRxR�tisdirtmakedirstOSErrorR!R"(RtdpathR(R�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_dirSetupMkdir_p�s$c	Cs�tjj|j|j�}tjj|j|j�}tjj|d�}tjj|d�}|jd|�|jd|�|jd|�|jd|�d}tj�dkr�d	}n|jd
|d|�|jd|d
|�|jd|j	}|jd|�x1|j|jd|j
gD]}|j|�q2Wx>|jgD]0}y|j|�WqVt
jk
r�}qVXqVW|jd�r�t|_n|jd�|jd�|jd�dS(s6make the necessary dirs, if possible, raise on failuretpackagesRt_dir_setup_cachedirt_dir_setup_pkgdirt_dir_setup_hdrdirt_dir_setup_persistdirR�is-rot_dir_setup_gpgdirs/gpgdirt_dir_setup_gpgcadirs	/gpgcadirRtt_dir_setup_metadata_cookies/gens
repomd.xmlR�smirrorlist.txtsmetalink.xmlN(RwRxR�R�R.R�tsetAttributetgeteuidRVR�tpkgdirRnt
persistdirR!R"t_preload_md_from_system_cacheRR�(	RRVRzRythdrdirtexttcookieR�R(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytdirSetup�s6	#

cCs3d|}t||�s&|j�nt||�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_dirGetAttr�s

cCs�d|}t||�s&|j�n|dkrit|d�sMg|_n|jjt||��nt|||�}|dkr�|j|�n|S(s; Make the directory attributes call .dirSetup() if needed. R�Rqt_old_pkgdirs(s_dir_setup_pkgdir(RSRR�R2R�R�Rn(RR�R�R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_dirSetAttr�s

cCs
|jd�S(NRV(R�(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRh	scCs
|jd�S(NRz(R�(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRh
scCs
|jd�S(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
|jd�S(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
|jd�S(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
|jd�S(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
|jd�S(NR�(R�(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhscCs'tjdtjdd�|j�dS(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|jjd�dkr6dS|j|_dS(NR�i����(R�R�tfind(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_hack_mirrorlist_for_anacondas		c	Cs�|j|j�|_|j|_g}|j�|jrl|jrl|jt|jj	���t
|_n|jr�|jr�|j|j��t
|_n|j|�|_
|j|j
|_t|j�dkrlt|d�rltjj|j�rl|jsiytj|j�Wn3ttfk
rN}tjd|j|f�qfXtjd|j�qiqln|j|_|j�dS(s�go 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_urlR�t
_orig_baseurlR�R�R�textendtlistR�R�RR�t_getMirrorListR�R�R,RSRwRxR�R�RbRR^R�RlR�terrorR�R(RR�R(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR�*s,
$	cCs g}d}x�|D]�}|dkr+qntj||j�}|ddkr]|d}ny%tj|�\}}}}}	}
Wn"tttfk
r�}d}nX|dkr�|}qq|j|�qW|dk	r|r�t	j
d	tj|��qt	j
d
tj|��n|S(
NR�i����RttblahRRR�RsMYumRepo 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(R�N(shttpsftpsfileshttps(Rtparsert
varReplaceR�R+t
ValueErrort
IndexErrortKeyErrorR2R�R�RR0R�(Rturl_listtgoodurlstskippedR1tstbtptqtftoR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR�Ns*

%
cCs|js|j�n|jS(N(R�R�(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_geturlsls	
tfgetcCs
|j�S(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|dd�S(NR�(R�R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRhsscCs�|js�|jdd|_|jd}|j�stj|j�}|jd|jdk�}y8t	d|j
|�}|j||dd|j�}Wqt
k
r}tjj|j�s�d	|j}tj|�ntjd
||jdtj|jd�f�t|_qXn|js�y)tj|�|_tj||j�Wq�tjk
r�}tjd
||f�t|_tj|�q�Xn|jr�tj|j�|_q�n|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(R�RVtmetalink_filenamet_metalinkCurrentRR0R�RHthttp_cachingRR9turlgrabR4RRwRxR�R!R"R�R�targst
to_unicodeRR�tMetaLinkRepoMDtshutiltmovetMetaLinkRepoErrorParseFailR^(RtlocalR1RKtugR�R(R�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getMetalinkus6	
#
1			cCs
|j�S(N(R�(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRh�scCst|d|�S(NR�(R�(RR�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRh�s	cCst|dd�S(NR�(R�R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRh�scCsZ|r"|jd�p!|jd�S|js/tSx$|jD]}|j|�s9tSq9WtS(NRtsfile:(R�R�Rt_all_urls_are_filesR(RR1((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR��s	R$cKs|dkr|j}n|dks0|dkrFtjd|j�n|jdkr�tjj|�rk|Stjd||jf�n|r�t	j
|�\}
}}}}n|jr�|jr�d}|r�|
dkr�|r�t
|�}q�ny\|jd|d|d|d|d	|d
|d|jd|jd
|d||f�
}|SWq�tjk
r~}tjtjd|f�q�Xn|r|s�|j|�rtjtjj|��}|j|j}|t|�krtjtd�tjj|�t|�tt|��f�qn|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|�}||_'|�qXn�t(|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(s�retrieve 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 %sRR�t	checkfunctrelativeR�R�R1Rtnametdiscnumtranges8Error getting package from media; falling back to url %ssKInsufficient space in download directory %s
    * free   %s
    * needed %sRbR R#R"R�tsizetretry_no_cacheRts*failed to retrieve %s from %s
error was %sR�sfailure: %s from %s: %sterrorsN(-RR�R!R"R4RbRwRxR�R+R,RR�tintR�t
MediaErrorR#tlogt
logginglevelstDEBUG_2R�tstatvfstdirnametf_bavailtf_bsizetlongR	RRHRR9R�R�R�R�RR0Rt_del_dl_fileR6R^R_R�R�tNoMoreMirrorsRepoError(RR1R�R�tstarttendR�R�R�R#RbR�R*tschemeR-RxtquerytfragidR�R�R(tdirstattavailRKR�R~terrstrRR�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getFile�s�!T!	4				

	
c
s�j}�j���j}|j��rM�j�r=�Stj��n|dkrn��fd�}n|jdk|_	z@|j
d|d|d�d|d|d|d	�j|�}Wdt|_	X|j
d
�r�j�rd}	|	��jjf}	tj|	�n|S(Ncs5�j�s1tj��tdtd���ndS(Ni����s)Package does not match intended download.(tverifyLocalPkgRR^RR	(R=(R�tpackage(s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR�"s
s
lazy:packagesR1R�R�R�R�RbR�RCs3Downloaded package %s, from %s, but it was invalid.(trelativepathtlocalPkgtbasepatht_preload_pkg_from_system_cacheR�RR^RR�R�R�R�RRR6R.R!R"(
RR�R�R�RbR*R~R�RR�((R�R�s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
getPackages2		

cCs�|j}|j�}|j}|j}||}	|j}
tjj|j�sbtj	|j�n|j
d|
d|d|d|ddd|d|dd	d
|d|	�
S(NR1R�R�R�R#R�R�R�iRbR�(R�tlocalHdrthdrstartthdrendR�RwRxR�R|RkR�R(RR�R�R#RbR~R�R�R�R�R�((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}|jr�tjj|�r�t	St|_tS(s�Check 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(
R�RtwithinCacheAgeR�tmetadata_expireRVRwRxR�RR�R�R(RtmC_deftrepomdfntmlfn((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytmetadataCurrentRs
	cCs�|jdk	r|jS|jrHtjj|j�rHtjd|�n|jr]t	|_nNtjj|j�s~t
|_n-|j|j|j
�r�t	|_n	t
|_|jS(Ns$Cannot find metalink.xml file for %s(R�RRbRwRxR�R�R!R"RRR�R�R�(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR�os		cCs�t|d�r�|jjd�r�|jjd�r�|jtd�}|jtd�}|dkr{|dkswt�tS|dkr�|dkr�tSn|dkr�|dkr�tSq�ntS(s8Return whether cache_req matches metadata_expire_filter.t_metadata_cache_reqs
read-only:tfuturetpasttpresent(R�R�R�(R�R�(RSR�R�tmetadata_expire_filterR,tAssertionErrorRR(Rt
cache_filtt	cache_req((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_matchExpireFilter�s
cCs�|r|j�rd}n|dkr=tjj|�r=tSt}tjj|�r�tj|�}|d|tj�kr�t}n|dtj�kr�t}n|js�|S|dt	|j
�kr�t}q�n|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
           i����i(R�RwRxR�RRtstatttimetcheck_config_file_ageR�R�(Rtmyfiletexpiration_timetexpire_req_filterR�tcookie_info((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR��s 
				cCse|j}tjj|j�s*|j}ntj|tj�rat|jd�}|j�~ndS(s/if possible, set touch the metadata_cookie filesw+N(	R�RwRxR�RVtaccesstW_OKtopenR (RRtfo((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytsetMetadataCookie�s	
cCs�y1||_||_||_||_||_Wntjk
rL}�nX|jr�|jr�|jr�|j	r�t
jtj
d�t|_t|_ndS(Ns1Disabling media repo for non-media-aware frontend(RbR�R�R�R�R!R"RR�R�R#R�R�R�RR�Rtskip_if_unavailable(RRbR�R�R�R�R(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytsetup�s				
'	cCsO|jr2tjj|�r2tjd|j�n|jsG|j�rKtSt	S(s( Should we cache the current repomd.xml s"Cannot find repomd.xml file for %s(
RbRwRxR�R!R"R4R�RR(RR�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_cachingRepoXML�s
cCsk|jdif}|dkr0d|jk}nd}yvtjdddddtjj|��}|jd|j	d	|d
dd|d
dd|d|j
dkdd�}Wnmtk
r�}tj
|�|r�dStjd||f�n.tjk
rtj
|�|rdS�nXytj||�Wn4tj
|�|rMdStjd||f�nX|S(s* Call _getFile() for the repomd.xml file. told_repo_XMLR�tprefixtrepomdtsuffixstmp.xmlR�R�R�R�iR�R#R�RbRLR�i�sError downloading file %s: %ssError renaming file %s to %s(N(t
_checkRepoXMLRR�ttempfiletmktempRwRxR�R�R�R�RRR^R!R"trename(RR�R�t
grab_can_failR�ttfnameR�R(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getFileRepoXML�sD



cCsuytj|j|�SWnWtjk
rp}|dkrJd|jk}n|rTdStjd|j|f�nXdS(s Parse the repomd.xml file. R�s&Error importing repomd.xml from %s: %sN(	trepoMDObjecttRepoMDR.R!tRepoMDErrorRR�R"R4(RR�tparse_can_failR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
_parseRepoXMLscCs�x+tj|jd�D]}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.tmpR�R�t	old_localtnew_MD_filesN(
tglobRVRR^RwRxR�R�tcopy2R
RRR�(RR�RRRn((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_saveOldRepoXMLs
cCs�|jstjd|j�nd|jkr;i|_dSx"|jdD]}tj|�qIW|j}i|_d|kr�tj|d|d�n|d|_	d|kr�dSx&|dD]}tj|d|�q�WdS(	s0 If we have older data available, revert to it. s*Can't download or revert repomd.xml for %sR�NRRR�told_MD_filess.old.tmp(
R�R!R"R4R�RR^RwRR�(RRtold_datatrevert((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_revertOldRepoXML s 				
cCsl|j}i|_d|kr2tj|d�nd|krBdSx#|dD]}tj|d�qMWdS(s  Done with old data, delete it. RRNs.old.tmp(R�RR^(RRR((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_doneOldRepoXML?s		cCs�|dkr|j}n|dkr?d|j�kr?d}n|dkrq|j|dd|�rq|d7}n||jj|�fS(	NR�R�RQR*RPt_dbRc(sothers	filelistssprimary(RRcR�REtrepoDataR(RRfRc((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_get_mdtype_dataLs	
cCsN|j\}}|jdtjj|�}|rJtj|dt�}n|S(NRtR�(RvRVRwRxRyRR�R(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	|j�tj	|jj�f�t
StS(s| We check the timestamps, if any of the timestamps for the
            "new" data is older than what we have ... we revert. R�skNot using downloaded %s/repomd.xml because it is older than what we have:
  Current   : %s
  Downloaded: %s(R�RR�t	timestampRcR�R�R.R�tctimeR(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. (RRtlengthR�t	checksumstchksumsR(RcR�tdoneRe((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_checkRepoXMLMetalinkss
cCs�|dkr|j}n|dkr0|j}n|j||j�rItSxb|jjD]T}|j||�rVtjt	j
dtj|jj
�tj|j
�f�tSqVWtS(s@ Check the repomd.xml against the metalink data, if we have it. s/Using older repomd.xml
  Latest: %s
  Using: %sN(RR�R�R!R�Rtold_repomdsR#R�R�R�R�RRR(RRcR�R�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_checkRepoMetalink�s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. (
RRR�R�R�R�R�RRR!(RR�toxmlR�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_latestRepoXML�s
	cCsN|jd}|jdk	r tS|j|�r>t}|}n�t}|j|�rr|}|j}|d|_ni|j||�}|dkr�|j	r�t
|d�r�|jdkr�tj
d|j�n|j�tS|j�|jdkr	|j|�|_n|jdkr&|j�tS|r0tS|j�sJ|j�tStS(	s` Common LoadRepoXML for instant and group, returns False if you
            should just return. s/repomd.xmlR�R�twritesread-only:futures Can't download repomd.xml for %sN(swritesread-only:future(RVR�RRR�RR%R�RR�RSR�R!R"R4RR�R
R(RR�tmdtypesR�tcachingR�R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_commonLoadRepoXML�s<
		



cCs[|jdkrtS|dkr+|j}n||jkrWt|j|jkrWtSntS(NRn(tmddownloadpolicyRRRcRt	DBVERSIONt	dbversionR(RRfRc((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRE�sc	Cs�|dkrdS|s.t}|j|�}nEt}|j|�}tjj|�sstj|dt�}t}n|j	tjj
|��|j||d|d|dt�s�dS|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). R�R�RHRuN(RRRRwRxR�RR�RR{RyRz(RRHtdbmdtypetmmdtypet
file_checkRR�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_groupCheckDataMDValid�s	cCsZ|j|�}x7|D]/\}}|j|dt�s|j�tSqW|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|jj�D]7}||kr@q(n|dkrRq(n|j|�q(W|d
krx|}ng}d|jkr�d
}n|jd}||jd<g}|jd<g}xO|D]G}|j|�\}	}
|r�|j|d	|�\}}|j|||t	�}
|
r�||||	|
�rCq�nt
j|
|
d
�|j|
�|
d}t
jj
|�r�t
j||d
�|j|�q�q�n|
d
kr�q�n||kr�q�n|j|
|	|�r�q�n|j|
|	f�|j|j|
t��q�W|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(tomdtypetodataR6R5tornametnrname((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
_mdtype_eqsR@RARBR�R�RRRcs.old.tmps.sqlite(s
primary_dbsfilelists_dbsother_dbsgroup_gzN(R�tkeysRcR�R2RR�RR0RRwRRxR�RR(RR'R<tall_mdtypesRftrevertsR�t
newmdfilesR4R6R5R8R9R�t	gen_local((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR2sR			




cCs7x&|D]\}}|j|t�}qW|j�dS(s$ Uncompress the downloaded metadata N(RRR(RR4R5R6R�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR3oscCs#|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)R7(RR�R'((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_groupLoadRepoXMLvscCs�idgd6dgd6ddddgd6ddddd	d
gd6}t�}t|j�tjkr�|j|j|j|jg��n0x-|jD]"}|j|j||g��q�W|s�d|kr�d}n|jd�t	t
|��}|S(
Nt__None__tinstantRPs
group:primaryR�R�tpkgtagssgroup:smallR*R�s
group:mains	group:all(RR�tmdpolicyR�tStringTypesR<RRtdiscardtsortedR�(Rt	md_groupsR'RF((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_mdpolicy2mdtypes�s

	% 	
cCs[y|j||j��SWntk
r:|j��nXtjd|j|jf�dS(s5retrieve/check/read in repomd.xml from the repositorys#Bad loadRepoXML policy (for %s): %sN(RBRKtKeyboardInterruptRR!R"R4RF(RR�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_loadRepoXML�s

cCs*|jr|jS|jd|j�|jS(NR�(R�RMR4(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_getRepoXML�s	cCs
|j�S(N(RN(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRh�scCst|d|�S(NR�(R�(RR�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRh�scCst|dd�S(NR�(R�R(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRh�scCst|�tjkr!|j}n|}|jr�|jr�tjdkr_t	dd|��n|j
d}yP|jddddd|d	d
|jddddd
|j
dkdd�}Wn,t	k
r�}t	dd||f��nXtj|||j�}|rq|jrqy|j||j�Wn)tjk
rU}t	dd|��nXtj|||j�}n|s�t	dd|��q�nytj|j|�}Wn/tjk
r�}t	dd||f��nX|j�|jr|j|�rt	dd|��ndS(Ni����s?pygpgme is not working so repomd.xml can not be verified for %ss/repomd.xml.ascR�srepodata/repomd.xml.ascR�iR�R�s%s/signatureR#R�RbRLR�i�s1Error 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(R�R�tInstanceTypeRt
repo_gpgcheckt_override_sigchecksRtgpgmeRRRVR�R4R�tvalid_detached_sigR�R�R�R!tYumBaseErrorRRR.RR�R�R#(RR�tfilepathtsigfileR�R(tvalidRc((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR��sF



	cCsCtj|�}|sdS|r2|j|kr2dStj|�dS(s4 Delete a downloaded file if it's the correct size. N(Rtstat_ftst_sizeR^(RR�R�tsd((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR��scCs|j|||�S(s,check the metadata type against its checksum(Rz(RtfnRfR�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR��scCs�|}|dkr'|jj|�}n|rH|j\}}|j}	n|j\}}|j}	t|�tj	kr�|j
}
n|}
|	dk	r�t|	�}	nt|
|�}|r"t
j|
�}|dk	r"|	dkr�||kr�|jdkr�dS|	|jkr||krdSq"ny|j||
d|	�}Wn3tjk
rs}
|r]dStdd|
��nX||kr�t|
||�dS|r�dStdd��dS(	s5 Internal function, use .checkMD() from outside yum. iiR�i����sError performing checksum: %si����s%Metadata file does not match checksumN(RRcRdR�topensizeReR�R�R�RORR�RRRXRYR�R!R"RR(RR[RfR�RHRuR�tr_ctypetr_csumR�R�tl_csumtfsizeR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRz�sB	'
cCs
|j|�S(s�base 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
retrieveMDscs��jj��}|j\}}tjj|�}�jd|}�jj��rZ|S�j	rst
j|�ntjj|�s��j
tjj|��r��j|�dt�r�d�j�<|Sn�jdkr&|r�dStjj|�rd|}	nd|�jf}	tj|	�nt}
�jjd�}|dk	r�|jj��}|dk	r�tjj|jd�}
||
kp�|j|jk}
q�ny���fd�}d�j�f}|jdks�|
r�d}nd	}�j|t|j���jd
|d|ddd
|d|d|d�jdkd|j|�}WnVtjk
rz|rtdS�n:tk
r�}|r�dStjd|�jf�nX|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 %sR�csLy�j|��Wn$tk
r:tj|j��nXd�j�<dS(Ni(R�RRR^RR�(R=(RfR(s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR�Qs
s%s/%sR$R�R�R�R#R�R�RbRLR�s6Could not retrieve %s matching remote checksum from %sN(RcRdRvRwRxRyRVR�RR�RR^R�R{RzRRbRR4R!R"R�RReR�R�R�R�R�R(RRfR1R*R�R}R~RR�R�tpartialtorepomdR9tofnameR�R�R#R(((RfRs//usr/lib/python2.7/site-packages/yum/yumRepo.pyRGsl	


	
cCs
|jd�S(s]this gets you the path to the primary.xml file, retrieving it if we
           need a new oneRP(Ra(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRWwscCs
|jd�S(s_this gets you the path to the filelists.xml file, retrieving it if we
           need a new oneR*(Ra(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyRY~scCs
|jd�S(NRQ(Ra(R((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR[�scCs�d|jj�kr|jddt�}|r{ytj|dd|j�}Wq{tk
rw}tj	|�d}q{Xn|S|jddt�S(s�gets groups and returns group file path for the repository, if there
           is none or retrieve/decompress fails, it returns NoneR�R1s	comps.xmlRRR�N(RcR�RGRRRaRbR�R�R�R(RR[R(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt	getGroups�s

cCs||_||_t|_dS(N(R9R�RR�(RR9R�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytsetCallback�s		cCs||_t|_dS(N(R�RR�(RR�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
setFailureObj�s	cCs||_t|_dS(N(R�RR�(RR�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytsetMirrorFailureObj�s	cCs||_t|_dS(N(R�RR�(RR9((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytsetInterruptCallback�s	cCs�g}g}|dk	r�y|j�}WnEtk
ro}|dkrOd}ntjd||f�g}nXxT|D]I}tjd|�s�qwn|j�}|jdd�}|j	|�qwWn||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�R�R
RtrstriptreplaceR2(RR�R1t
returnlisttcontentR(tlineR&((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_readMirrorList�s"	

cCs�|jdd|_d}t}|j|j|jdt�rft}t|jd�}d|j}n�|j}t	j	|�d}|dkr�d|}n|j
�}ytjj
||�}WnJtk
r}tjd||jdtj|jd	�f�d}nX|j||�\}}|r||jr�|r�t|jd
�}	x|D]}
|	j|
�qUW|	j�q�nL|r�tjj|j�r�tj|jd�|jt|jd��dS|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.txtR�trsfile://iR�s1Could not retrieve mirrorlist %s error was
%s: %sitwN(RVR�RRR�tmirrorlist_expireRR�R�R+RHREtgrabberturlopenRR�R�R�RR�RqRbR&R RwRxR�tutime(RR�tcacheokR1R�RKR(RnRoR�Rp((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR��s:		
1

cCs~tjj|�stStjj|�r[tj|�tjtj|�tjkr[tSnytj||�WntSXtS(s&attempts to copy the file, if possible(	RwRxR�RR�tST_CTIMER�RR(RR[tdestfn((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
_preload_file�s,R�cCs�t|d�stS|jdkr&tStjj|j|j�}tjj|�sWtStjj|�tjj|j	�kr�tS|d|tjj
|�}|dkr�|j	d|tjj
|�}n|j||�S(sLattempts to copy the file from the system-wide cache,
           if possibletold_base_cache_dirR�RtN(
RSRR|RwRxR�R.R�tnormpathRVRyRR{(RRtsubdirRztglob_repo_cache_dirR[((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt_preload_file_from_system_cache�s'$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{scCs�tjj|j��}tjj|j|�}|j|j�ddd|�rUtSt|d�sht	Sx6|j
D]+}|jtjj||�|�rrtSqrWt	S(sOattempts to copy the package from the system-wide cache,
           if possibleR~s	packages/RzR�(RwRxRyR�R�RyR�RRSRR�R{(RtpkgtpnameRztopkgdir((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR�s	!cCs�g}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(RcR�R!R"tRepoVerifyProblemR&R2Ra(Rtproblemstmd_typesR(tprbtmd_typeR�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
_verify_md"s"

	
cCs�dGHg}|j�}|dk	r5tj|�}nytj�}|j|�WnJtjtj	fk
r�}d}t
t|t|��}|j|�n8X|j
dkr�d}t
t|d�}|j|�n|S(Nsverifying compsscomps file failed to addisno groups in compsR�(ReRRR�RtCompstaddR!tGroupsErrortCompsExceptionR�tREPO_PROBLEM_COMPSR&t
compscount(RR�tgrpfiletcR(R�R�((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|j��nd|krV|jrV|j|j��qVnd|krx|j|j��n|S(s}download/verify the specified items
           @items = ['repodata', 'comps'] can include: repodata, comps, packages
        R�RRo(R�R�R�R�R�(RtitemsR�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pytverifyVs	iN(qR�R�R�RR�R�tpropertyR�R�R4R R�t_YumRepository__getProxyDictReR�R�R�R�RRR�R�R�RRR�RR_RRRHRfRgR�R�RnRR�R�RVRzRyR|R�R�R�R�R�R�R�R�R�R�R�R�R�t_YumRepository__getR�R�R�R�R�R�R�R�R�RR
RRRRRRtstaticmethodR!R#R%R)RER0R7R2R3RBRKRMRNRcR�R�R�RzRaRGRWRYR[ReRfRgRhRiRqR�R{R�R{R�R�R�R�R�(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR�As�	=	
	
															<				'									$				$		
h)			#		*			
		-
	S						,	
0	Z								,						cCsRtjdtjdd�g}ttjd�r=tj}nddl}|}tj|�d}|dkr{d|}n|}y|j	|d	|�}WnBt
k
r�}d
||jdtj
|jd�fGHd}nX|dk	rN|j�}	xT|	D]I}
tjd|
�rq�n|
j�}|jd
d�}|j|�q�Wn|S(Ns9getMirrorList() will go away in a future version of Yum.
RiRvi����iR�sfile://R]s1Could not retrieve mirrorlist %s error was
%s: %sis\s*(#|$)s$ARCHs	$BASEARCH(RRR!RRSRERuR
R+RvRR�RR�RRjR
RRlRmR2(R�tpdictRnturlresolverR
R�R1R�R(RoRpR&((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt
getMirrorListgs2	
)

R�cBseZdZed�ZRS(s9 Holder for each "problem" we find with a repo.verify(). cCs(||_||_||_||_dS(N(R�tmessagetdetailstfake(RR�R�R�R�((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR�s			(R�R�R�RR(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyR��s(:RwR
R�R�R+t
uses_fragmentR2R
R!turlgrabber.grabberRRturlgrabber.progressRturlgrabber.mirrorRERRRtreposRR�RTR�tyumRRRR	t	constantsR�tloggingR�RR
R�R�R�RRtskip_old_DBMD_checkR
RSRtImportErrorRRtsimplefilterRt	getLoggerR�R#RRR�R�R�R�(((s//usr/lib/python2.7/site-packages/yum/yumRepo.pyt<module>sn
 


		��������-%

ZeroDay Forums Mini