403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/yum/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/yum/yumRepo.pyo
7Jc!@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
Es	cCs|idS(N(tclose(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt__del__JscCs
h|_dS(N(R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRMsc
Cs|ii|o||i|jodSnt|}|djod}x~|D]v}|d7}|o|i|||n||}|i||}	||	_|i|i||	|i|	qVW|ii|pg|i|<n|i|i	dd|_
n|djo|ii|o5d|i|jotid||ifqjnd}x||D]t}|d7}|o|i|||n||}|ii|o)x&|i|D]}	|	i
|qWqwqwW|i|i	|d|_
ndS(Ntmetadataiit	filelistst	otherdatas$%s md for %s imported before primary(RR(Rthas_keytlentprogressbarRtidt_addToDictAsListtpkgsByIDt
addPackagetappendtindexesBuilttErrorst	RepoErrortimportFromDict(
Rtrepotdatatypetdataobjtcallbackttotaltcurrenttpkgidtpkgdicttpo((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytaddDictPsN	


	

	


RicCse|djodddg}n
|g}t|dp+tid|id|id||_nx|D]}|ii|o||i|joqkqnd}|djo%d	}d
}	|i	}
|ii
}nh|djo%d}d}	|i}
|ii}n6|djo%d}d
}	|i
}
|ii}nqk|i||o|i||}|pm|i|}|oS|idd}|ip3ti||ti||i||}qqn|ii|}
nCt|_|
}|ii|	}|i\}}|||}
|p|i|||
|n~
qkW|`dS(NtallRRRtcacheHandlertstoredirtrepoidR&t
primary_dbtprimarytfilelists_dbtother_dbtothers.bz2t(thasattrtsqlitecachectRepodataParserSqlitetcachedirRR.RRtNonet
getPrimaryXMLt
getPrimarytgetFileListsXMLtgetFileliststgetOtherXMLtgetOtherdatat_check_db_versiont_check_uncompressed_dbt_retrieveMDtreplacetcacheRt
bunzipFiletunlink_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|sd
				
	
	
	

		c
Cs|ii|}|i\}}tii|}|id|}|idd}d}	|i	tii|tii
|okto|io|Sy|i
||dtWn.tj
o"|ipti|qqX|}	n|	S(s8return file name of uncompressed db is good, None if nott/s.bz2R6topenchecksumN(RLRMtlocationtostpathtbasenameR:RER;t_preload_md_from_system_cachetexiststskip_old_DBMD_checkt
_using_old_MDtcheckMDRJRRFRRH(
RR#ROtmydbdatatr_basetremotetfnametbz2_fnRXtresult((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRCs"

cCs
|i|S(N(RB(RR#RO((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRBsN(t__name__t
__module__t__doc__R
RRR;R,R^RCRB(((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR
Cs			,I	t
YumRepositorycBseZdZdZdZdZeeZdZdZ	dZ
ee
ZdZdZ
d	Zd
Zdnedod
ZdZdZdZdZdZdZdZdZdZdZedZedZdZdZ dZ!dZ"edZ#edd Z$ed!d"Z%ed#d$Z&ed%Z'd&Z(d'Z)d(Z*d)Z+d*Z,ed+d,d-d.d/d0Z-d1Z.ed+d2d-d3d/d4Z/dodododododododod5e0dod6Z1e1Z2dodoe0d7Z3dod5e0d8Z4d9Z5d:Z6d;Z7d<Z8dododod=Z9d>Z:dodod?Z;dod@Z<dAZ=dBZ>dCZ?dodDZ@edEZAdFZBeCdGZDdododHZEdIZFdodJZGdodKZHedLZIdodMZJdododNZKdodOZLdPZMed+dQd-dRd/dSZNdTZOedUZPedoedVZQdWZRedXZSdYZTdZZUd[ZVd\ZWd]ZXd^ZYd_ZZd`Z[dodaZ\dbZ]dcZ^dddodeZ_dfZ`dgZadhZbdiZcdjZddkdlgdmZeRS(pso
    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|_hdd6dd6dd	6dd
6dd6dd6|_d|_d|_d|_d|_ t|_!d|_"d|_#d|_$t%|_&d|_'d|_(d|_)dS(
Nis
yumgroups.xmlsrepodata/repomd.xmltcachecookieR6iR2RR5tgroupt
updateinfotprestodelta(*RtRepoConfR
RR;trepofilet
mirrorurlst_urlstenablegroupstgroupsfilenamet
repoMDFilet_repoXMLRht_oldRepoMDDataRFtmirrorlistparsedtyumvart_proxy_dicttmetadata_cookie_fnt_metadataCurrentt	_metalinktFalsetgroups_addedthttp_headerstrepo_config_agetbasecachedirtcostt
copy_localt	retrievedR&tfailure_objtmirror_failure_objtinterrupt_callbackt_callbacks_changedt	mediafunctgpg_import_functconfirm_funcRJttimestamp_checkt_sackt	_grabfunct_grab(RR0((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR
sL																																	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(R;R7RtcmpR(RR5tocosttret((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt__cmp__ s

cCs0|idjotiti|_n|iS(N(RR;t
sqlitesacktYumSqlitePackageSacktYumAvailablePackageSqlite(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_getSack-scCs2|idj	o|iinti|dS(N(RR;tsackRR(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR9scCs
d|_dS(N(R;R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
_resetSack>scCs |i|io|iSdS(N(tdoProxyDictRR;(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt__getProxyDictAs

cCs|iS(s7Returns the instance of this repository's package sack.(R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytgetPackageSackKscCs"t|do|idj	StS(s;Returns true if this repository is setup and ready for use.tmetadata_cookieN(R7RLR;R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytreadyPscCsEd|iijo|iid}n|iid}|iS(s"Returns the location of the group.tgroup_gzRu(RLt	fileTypesRMRa(Rtthisdata((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytgetGroupLocationWscCs|iS(N(R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt__str___siicCs[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(RRNR t	MiscErrortEnvironmentErrorR;R!(RtsumtypetfiletCHUNKtchecksum_can_failtdatasizete((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt	_checksumbscCsd|i}dddddddd	d
ddd
dddddddddg}|ix+|D]#}|d|t||f}qcW|d}x|iD]}|d|}qW|S(Ns[%s]
tnamet	bandwidthtenabledR|tgpgcheckt
repo_gpgchecktincludepkgst	keepalivetproxytproxy_passwordtproxy_usernametexcludetretriestthrottlettimeoutt
mirrorlisttmetalinkR:tgpgkeytpkgdirthdrdirs%s = %s
s	baseurl =s %s
(Rtsorttgetattrturls(Rtoutputtvarstattrturl((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytdumpos 
		
!

cCss|iyti|ddgWnHtj
o<}|itijoti|qott|nXdS(s%Persistently enables this repository.tonlyRN(	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(RR{tmediaidR R!R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytchecks!cCs8|iodSh|_d}|idjod|i}|idj	oti|idd}|d}|d}|ddjo
d}n|dd|d	}d
||i||f}|idj	o#d||i|i||f}qqn|dj	o+||id<||id
<||id<ndS(Nt_none_s%stallow_fragmentsiiiR6t?is%s://%s@%s%ss%s://%s:%s@%s%sthttpthttpstftp(NR(RR;RRturlparseturlsplitR(Rtproxy_stringtproxy_parsedtproxy_protot
proxy_hostt
proxy_rest((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRs.
	






cCs8g}x+|iD] }|i||i|fqW|S(sAConvert our dict of headers to a list of 2-tuples for urlgrabber.(RR(Rtheaderstkey((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(twarningstwarnR tYumFutureDeprecationWarningt
_setupGrab(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt	setupGrabs	c#Cs|idjotii}n
tii}t|i}td|id|i	d|i
d|id|id|i
d|id	|id
|id|id|d
dd|id|id|id|id|i|_tii|ii_||i|id|i|_dS(s_sets up the grabber functions with the already stocked in urls for
           the mirror groupst
roundrobinRRtretryRtprogress_objtproxiestfailure_callbackRRRRtregettsimpletssl_verify_peertssl_verify_hosttssl_ca_certtssl_certtssl_keyN(tfailovermethodt
urlgrabbertmirrort
MGRandomOrdertMirrorGroupttuplet#_YumRepository__headersListFromDictRRRRRR&t
proxy_dictRRRRt	sslverifyt	sslcacertt
sslclientcerttsslclientkeyRRtoptst
user_agentRRR(RtmgclassR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRs0													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.pyRscCstii|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(	RbRcRftisdirRFR R!tmakedirstOSError(RtdpathRtmsg((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_dirSetupMkdir_ps&
cCstii|i|i}tii|d}tii|d}|id||id||id||id|id|id|i}|id	|x'|i|igD]}|i	|qW|i
d
|i
d|i
d|i
d
dS(s6make the necessary dirs, if possible, raise on failuretpackagesRt_dir_setup_cachedirt_dir_setup_pkgdirt_dir_setup_hdrdirt_dir_setup_gpgdirs/gpgdirR_t_dir_setup_metadata_cookies
repomd.xmlRtsmirrorlist.txtsmetalink.xmlN(RbRctjoinRRtsetAttributeR:RRRRe(RR:RRtcookietdir((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytdirSetup
s 


cCs5d|}t||p|int||S(s; Make the directory attributes call .dirSetup() if needed. t_dir_setup_(R7R%R(RR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_dirGetAttr"s
cCsd|}t||p|in|djo:t|dp
g|_n|iit||nt|||}|djo|i|n|S(s; Make the directory attributes call .dirSetup() if needed. R&Rt_old_pkgdirs(s_dir_setup_pkgdir(R7R%R(RRtsetattrR(RRtvalR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_dirSetAttr(s



cCs
|idS(R:(R'(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR7scCs
|idS(R(R'(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR8scCs|id|S(R(R+(Rtx((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR9scCs
|idS(R(R'(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(tgpgdir(R'(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(R(R'(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR>scCs'tidtidd|idS(Ns8baseurlSetup() will go away in a future version of Yum.
Ri(RRR Rt
_baseurlSetup(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytbaseurlSetup@s	cCsL|iodS|ipdS|iiddjodS|i|_dS(NRi(RRtfind(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_hack_mirrorlist_for_anacondaEs

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_baseurlR1RRtextendtlistt
metalink_dataRRJRt_getMirrorListRzR{RR7RbRcRfR2RFRRHRRR(RRzR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR.Ts,


&
cCsg}d}x|D]}|d
joqnti||i}|ddjo|d}nti|\}}}}}	}
|djo
|}qq|i|qW|dj	o3|odti|GHqd	ti|GHn|S(NR6iR_RRRRsMYumRepo 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(R6N(shttpsftpsfileshttps(R;tparsert
varReplaceRRRRtto_utf8(Rturl_listtgoodurlstskippedRtstbtptqtfto((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR3xs&
!

cCs|ip|in|iS(N(R{R.(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_geturlss
tfgetcCs
|iS((RF(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRstfsetcCst|d|S(R{(R)(Rtvalue((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRstfdelcCst|ddS(R{N(R)R;(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRscCs|ip|idd|_|id}|ip.ti|i}ytd|id|i	d|i
d|id|id	|i
d
|i
d|id|id
|i
}tii|i_|i||d|id}Wqftiij
ok}tii|ipd|}ti|nd||idti|idfGHt |_!qfXn|i!pmy)ti"||_t#i$||iWqti%j
o.}d||fGHt |_!ti&|qXn|i!oti"|i|_qn|iS(NR_smetalink.xmls.tmpRRRRRRRRRRttexts	/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('RR:tmetalink_filenamet_metalinkCurrentRR<RRRRRR&R	R
RRR
RRRturlgrabRRtgrabberRRbRcRfR R!targst
to_unicodeRJRtMetaLinkRepoMDtshutiltmovetMetaLinkRepoErrorParseFailRH(RtlocalRtugRoRR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_getMetalinksH


								#)
	
cCs
|iS((RX(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRscCst|d|S(R(R)(RRI((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRs	cCst|ddS(RN(R)R;(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRsRc*Cs#|i}|
p|iidp|id)nt|}|d*jo
|i}n|d*jp
|d*jotid|i	n|i
djo2tii
|o|Stid||fn|o"ti|\}
}}}}n|io|iod}|o(|
djo|ot|}qBny\|id|d|d	|d
|d|d|d
|id|id|d||f
}|SWqtij
o#}titid|fqXn|o|
djotd|id|id|id|id|id|d|	d|id|i d|i!d|i"d|d|d|i#d|i#d|i$d |i%d!|i&d"|}t'i(i)|i(_)|d#|}y:|i*t+i,||d
t+i,|d||f}Wqt-j
om}d$||i	|f}|i.o|d%7}|d&7}n|i/d'joti0|qfti|qXny[|i1i*t+i,||d
t+i,|d||fd|d|	d|d|d"|}WnWt-j
oK}d(||i	|f}|i/d'joti0|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 baseurltPragmasno-caches/get request for Repo %s, gave no source or destis0Caching enabled but no local cache of %s from %sRRVt	checkfunctrelativeRKRRRRtdiscnumtranges8Error getting package from media; falling back to url %sRRRRRRRRRRRRRRRRtsizeR_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.isfailure: %s from %s: %s(RYsno-cacheN(2RRRRRR;RR R!RRFRbRcRfRRRRtintRt
MediaErrortverbose_loggertlogt
logginglevelstDEBUG_2RRRRRR&R	RRRR
RRR
RRRRNRR<RRzRtNoMoreMirrorsRepoErrortgrab(RRR[RVtstarttendRRZRKRRFR^RtschemetnetlocRctquerytfragidR\RoRRWRlterrstr((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(NRR[RVRZRKRFR^(	trelativepathtlocalPkgtbasepatht_preload_pkg_from_system_cachetverifyLocalPkgRRHRnR^(RtpackageRZRKRFRlRVRq((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
getPackageCs		
cCs|i}|i}|i}|i}||}	|i}
tii|ipti	|in|i
d|
d|d|d|ddd|d|dd	d
|d|	
S(NRR[RVRgRRhRZRiRFR^(RotlocalHdrthdrstartthdrendRqRbRcRfRRRnR;(RRtRZRRFRlRVRgRhR^Rq((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt	getHeaderVs			
	!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(
RR;twithinCacheAgeRtmetadata_expireR:RbRcRfRR1RRJ(RtmC_deftrepomdfntmlfn((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytmetadataCurrenths"		
		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(RR;RFRbRcRfRLR R!RJRRzRR{(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRMs!



	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(	RbRcRfRJRtstatttimeR_R(Rtmyfiletexpiration_timeR*tcookie_info((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRzs 

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

cCsy(||_||_||_||_Wntij
o}nX|io@|io6|io+|io t	i
tidt
|_ndS(Ns1Disabling media repo for non-media-aware frontend(RFRRRR R!RRR4RaRbRcRdRR(RRFRRRR((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(	RFRbRcRfR R!RRJR(RRV((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_XMLR6tprefixtrepomdtsuffixstmp.xmlR$R[RVRiRKRRZRFR-R^isError downloading file %s: %ssError renaming file %s to %s(N(t
_checkRepoXMLR;RttempfiletmktempRbRctdirnameRnR~thttp_cachingRRRHR R!Retrename(RRVRKt
grab_can_failRZttfnameRoR((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repoMDObjecttRepoMDRR tRepoMDErrorR;RR!(RRVtparse_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.tmpRRVt	old_localtnew_MD_filesN(
tglobR:RRHRbRcRfRStcopy2RRJR;R(RRVRmRRZ((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_saveOldRepoXMLs

cCsd|ijoh|_dSx"|idD]}ti|q,W|i}h|_d|joti|d|dn|d|_d|jodSx&|dD]}ti|d|qWdS(s0 If we have older data available, revert to it. RNRRRVtold_MD_filess.old.tmp(RRRHRbRR(RRmtold_datatrevert((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_revertOldRepoXMLs 			


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

cCs|djo
|i}n|djod|ijo
d}n|djo(|i|dd|o|d7}n|ii|o||i|fS|dfS(	NRuRR5RR2t_dbRL(sothers	filelistssprimary(R;RLRRBtrepoDataRRM(RRORL((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_get_mdtype_data@s

 

cCsM|i\}}|idtii|}|o|idd}n|S(NR_s.bz2R6(RaR:RbRcRdRE(RRQt
compressedRkRlRV((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_get_mdtype_fnameNs
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(
RRJRt	timestampRLRRRtctimeR(RR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_groupCheckDataMDNewerVs

	cCs|i|ijotS|i|ijotSt}xU|iD]J}||ijoqCn|i||i|jotS|i|qCWx dD]}||jotSqWtS(s7 Check parsed repomd.xml against metalink.repomd data. tsha512tsha256tsha1tmd5(RRRR(	RRtlengthR^tsett	checksumstchksumstaddRJ(RLRtdoneRN((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_checkRepoXMLMetalinkhs"	

	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(R;RR8RRRJtold_repomdsRaRbRcRdRRRR(RRLR8R((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. (
RRR1RR8RRRRJR(RRVtoxmlR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_latestRepoXMLs

cCs|id}|idj	otS|i|ot}|}nht}|i|o|i|itS|i	||}|djo|itS|i|i
||_|idjo|itS||_|otS|ip|itStS(s` Common LoadRepoXML for instant and group, returns False if you
            should just return. s/repomd.xmlN(
R:RR;RRRJRRRRRRhR(RRKtmdtypesRVtcachingRo((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_commonLoadRepoXMLs6







	

cCsQ|djo
|i}n|ii|o t|i|ijotSntS(N(R;RLRRt	DBVERSIONt	dbversionRJR(RRORL((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRBs

	c	Cs|djodS|p%|id}|i||}nHt}|i|t}tii|p|idd}t}n|i	tii
||i||d|d|dtpdS|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). Rs.bz2R6R`RQtcheck_can_failN(R;tendswithRRRbRcRfRERJReRdt_checkMD(RRQtdbmdtypetmmdtypet
file_checkRRV((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_groupCheckDataMDValids

c
Cs
d}|ii}|djo
|}ng}d|ijo
d}n|id}||id<g|id<x|D]{}|i|\}}|o|i|d|\}	}
|i|
|	|t}|oB||	|
||oq}nti||d|i	|qn|djoq}n||joq}n|i|||oq}n|i
|dtp|itS|i
|t}|ido9|}|id	d
}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(R;RRNRbRcRdRaRJ(tomdtypetodatatnmdtypetndatatornametnrname((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
_mdtype_eqs


RRRRLs.old.tmptretrieve_can_failRs.bz2R6N(RtkeysR;RRRRJRbRRRDRRRRRERRGRHR(
RRRtall_mdtypestrevertsRRORRRRRVtdl_local((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_commonRetrieveDataMDsP	









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(RRKR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_groupLoadRepoXMLOscCs1hgd6dgd6ddgd6dddddgd	6}t}t|itijo&|i|i|i|ign1x-|iD]"}|i|i||gqW|p
d
|jo
d}ntt	|}y|i
||SWn tj
o|inXt
id|idS(
s5retrieve/check/read in repomd.xml from the repositorytinstantR2s
group:primaryRvsgroup:smallRuRRws
group:mains	group:allsBad loadRepoXML policy: %sN(RttypetmdpolicyttypestStringTypestupdatetgetR;tsortedR7RtKeyboardInterruptRR R!(RRKt	md_groupsRR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_loadRepoXMLZs(


		&
 

cCs^|io|iSy|id|Wn.tij
o}d|}ti|nX|iS(NRKsiCannot retrieve repository metadata (repomd.xml) for repository: %s. Please verify its path and try again(RRR R!(RRR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_getRepoXMLts
cCs
|iS((R(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRscCst|d|S(R(R)(RR*((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRscCst|ddS(RN(R)R;(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRscCs"t|tijo
|i}n|}|iobtidjotdd|n|i	d}yP|i
ddddd|d	d
|iddddd
|idjdd}Wn.tj
o"}tdd||fnXti
|||i}|ok|ioay|i||iWn+tij
o}tdd|nXti
|||i}n|ptdd|qnyti|i|}Wn1tij
o"}tdd||fnX|i|io(|i|otdd|ndS(Nis?pygpgme is not working so repomd.xml can not be verified for %ss/repomd.xml.ascR[srepodata/repomd.xml.ascRiRVRKs%s/signatureRRZRFR-R^is1Error 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InstanceTypetfilenameRRtgpgmeR;RR:RnRRtvalid_detached_sigR-RRR tYumBaseErrorRRRR1RR(RRtfilepathtsigfileRoRtvalidRL((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRsF





	cCs|i|||S(s,check the metadata type against its checksum(R(RtfnROR`((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRisc
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(R;RLRMR`topensizeRNR^RRRRR_RR R!R(
RRROR`RQRRtr_ctypetr_csumR^Rtl_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'.(RD(RRO((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
retrieveMDscCs=|ii|}|i\}}tii|}|id|}|ii|o|i|o|Sn|i	djoqtii
|oDy|i||Wn%tj
o}t
id|qX|Sqt
id||fntii
|p|itii|o/|i||dtod|i|<|Snyt|i|fhf}	d|i|f}
|id|d|d	dd
|	ddd|
d
|idjd|i}Wndt
it
ifj
o|odSnItj
o+}|odSt
id||fnXd|i|<|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 %sRs%s/%sR[RVRRZRRKRFR-R^s6Could not retrieve %s matching remote checksum from %sN(RLRMRaRbRcRdR:RRRFRfRiRR R!ReRRJRRnR;RR^Re(RRORRRkRlRmRVRRZRK((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRDsZ	
	
cCs
|idS(s]this gets you the path to the primary.xml file, retrieving it if we
           need a new oneR2(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(NR5(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 NoneRRRu(RLRRDRJ(R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt	getGroups0scCs||_t|_dS(N(R&RJR(RR&((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytsetCallback7s	cCs||_t|_dS(N(RRJR(RR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
setFailureObj;s	cCs||_t|_dS(N(RRJR(RR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytsetMirrorFailureObj?s	cCs||_t|_dS(N(RRJR(RR&((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytsetInterruptCallbackCs	cCsg}g}|dj	oy|i}WnAtj
o5}|djo
d}nd||fGHg}nXxj|D]^}tid|ptid|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^\s*$s$ARCHs	$BASEARCHN(R;t	readlinest	ExceptiontretmatchtrstripRER(RRRt
returnlisttcontentRtlineR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_readMirrorListGs$


&c
Cs|idd|_d}t}|i|i|io)t}t|id}d|i}n|i}t	i	|d}|djod|}nyt
ii|d|i
}WnJt
iij
o8}d||idti|id	fGHd}nX|i||\}}|oU|ioF|o>t|id
}x|D]}	|i|	qPW|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://iR6Rs1Could not retrieve mirrorlist %s error was
%s: %sitwN(R:R2R;RRztmirrorlist_expireRJRRRRROturlopenR	RRPRRQRRFtwriteRRbRcRftutime(
RRtcacheokRRiRRRRR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR9]s8	
)cCsutii|ptStii|o6ti|titi|tijotSnti||tS(s&attempts to copy the file, if possible(	RbRcRfRRtST_CTIMERSRRJ(RRtdestfn((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
_preload_files-	R6cCst|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_dirR6R_N(
R7RRRbRcR!RRftnormpathR:RdR;R
(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(R(RR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRescCstii|i}tii|i|}|i|iddd|otSt|dpt	Sx8|i
D]-}|itii|||otSqvWt	S(sOattempts to copy the package from the system-wide cache,
           if possibleR
s	packages/R	R((RbRcRdRpR!RRRJR7RR(R
(RtpkgtpnameR	topkgdir((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRrs

"	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(RLRR R!tRepoVerifyProblemRRR(Rtproblemstmd_typesRtprbtmd_typeR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
_verify_mds$
	
cCsdGHg}|i}|dj	o#|idoti|}nyti}|i|WnLti	ti
fj
o4}d}tt|t
|}|i|n;X|idjo)d}tt|d}|i|n|S(Nsverifying compss.gzscomps file failed to addisno groups in compsR6(RR;RtgzipRRtCompsRR tGroupsErrortCompsExceptionRtREPO_PROBLEM_COMPSRt
compscount(RRtgrpfiletcRRR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
_verify_compss"cCsgS(N((R((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt_verify_packagesstrepodataRcCsg}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
        R#RR(R6RR|R!R"(RtitemsR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pytverifys



iN(fRpRqRrR
RRtpropertyRRRt_YumRepository__getProxyDictR	RRRRRR;RRRRRRRRRRRtgrabfuncRfRR%R'R+R:RRR-RR/R1R.R3RFRRXR8RJRnt_YumRepository__getRuRyRRMRzRRRRRRRRRRRtstaticmethodRRRRRBRRRRRRLRRiRRRDR<R>R@RRRRRRR9R
RReRrRR!R"R%(((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyRss	8	
	
																"												$				-	s	 				*			
		(
O			.'	<									*						cCsutidtiddg}ttido
ti}nddk}|}ti|d}|djod|}n|}y|i	|d	|}WnJtii
j
o8}d
||idti
|idfGHd}nX|dj	oy|i}	xj|	D]^}
tid|
ptid
|
oqn|
i}|idd}|i|qWn|S(Ns9getMirrorList() will go away in a future version of Yum.
RiRiiR6sfile://Rs1Could not retrieve mirrorlist %s error was
%s: %sis^\s*\#.*s^\s*$s$ARCHs	$BASEARCH(RRR RR7RROturllibRRRRPRRQR;RRRRRER(RtpdictRturlresolverR+RiRRRRRR((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt
getMirrorLists4	

)
&RcBseZdZedZRS(s9 Holder for each "problem" we find with a repo.verify(). cCs(||_||_||_||_dS(N(Rtmessagetdetailstfake(RRRR0R1((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR
*s			(RpRqRrRR
(((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyR's(2RbRRRRt
uses_fragmentRRR turlgrabber.grabberRRturlgrabber.mirrorRRRRtreposRR:R8RtyumRRRt	constantsRtloggingRcRRRSRRRRJRgtsimplefilterRt	getLoggerRRaRR
RxRsR;R.R(((s//usr/lib/python2.6/site-packages/yum/yumRepo.pyt<module>sX

'%

Youez - 2016 - github.com/yon3zu
LinuXploit