Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/DistUpgrade/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyc


WRc@sddlZddlZddlZddlmZmZddlZddlZddlmZ	de
fdYZde
fdYZde
fd	YZ
d
e
fdYZdZd
e
fdYZedkreddZejejxejD]Zejdejejdejejdejejdejejikrejdejjnx4ejD])ZejdejejejfqWx%ej D]Z!ejde!jqWqWndS(iN(tPopentPIPE(tgettexttTemplatecBs#eZdZdZdZRS(cCsd|_t|_g|_d|_d|_d|_d|_g|_	g|_
d|_i|_d|_
t|_t|_dS(N(tNonetnametFalsetchildtparentst
match_nametdescriptiontbase_urittypet
componentstchildrent	match_urit
mirror_settdistributiontTruet	availabletofficial(tself((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyt__init__$s													cCs|td|jkS(s8 Check if the distribution provides the given component cSs|jS(N(R(tc((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyt<lambda>6s(tmapR
(Rtcomp((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyt
has_component4scCsCt|\}}}||jkr;|j|j||StSdS(s8 Check if a given url of a repository is a valid mirror N(t	split_urlRthas_repositoryR(Rturltprotothostnametdir((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyt	is_mirror8s(t__name__t
__module__RRR"(((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyR"s		t	ComponentcBsPeZddddZdZdZdZdZdZdZ	RS(cCs(||_||_||_||_dS(N(RR
tdescription_longtparent_component(RRtdesct	long_descR'((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyRCs			cCs|jS(N(R'(R((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pytget_parent_componentIscCs
||_dS(N(R'(Rtparent((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pytset_parent_componentLscCs4|jdk	r|jS|jdk	r,|jSdSdS(N(R&RR
(R((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pytget_descriptionOs
cCs
||_dS(N(R
(RR(((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pytset_descriptionWscCs
||_dS(N(R&(RR(((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pytset_description_longZscCs|jS(N(R&(R((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pytget_description_long]sN(
R#R$RRR*R,R-R.R/R0(((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyR%As					tMirrorcBsPeZdZddZdZdZdZdZdZ	dZ
RS(	s( Storage for mirror related information cCs/||_g|_|j||||_dS(N(R trepositoriestadd_repositorytlocation(RRR R!R4((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyRds		cCs|jjt||dS(N(R2tappendt
Repository(RRR!((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyR3jscstfd|jS(Ncs
|jkS(N(R(tr(R(s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyRns(tfilterR2(RR((Rs8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pytget_repositories_for_protomscCsJ|dkrtSx3|jD](}|j|kr||jkrtSqWtS(N(RRR2RR!R(RRR!R7((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyRpscstfdjS(Ncs|jjS(N(tget_urlR (R7(R(s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyRys(RR2(R((Rs8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyt
get_repo_urlsxscCs|jS(N(R4(R((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pytget_location{scCs
||_dS(N(R4(RR4((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pytset_location~sN(R#R$t__doc__RRR3R9RR;R<R=(((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyR1as					R6cBs#eZdZdZdZRS(cCs||_||_dS(N(RR!(RRR!((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyRs	cCs|j|jfS(N(RR!(R((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pytget_infoscCsd|j||jfS(Ns
%s://%s/%s(RR!(RR ((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyR:s(R#R$RR?R:(((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyR6s		cCsBtjd|dd}x#t|dkr=|jdqW|S(sE split a given URL into the protocoll, the hostname and the dir part s:*\/+tmaxsplitiiN(tretsplittlenR5R(RRB((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyRstDistInfocBs eZdddZdZRS(s/usr/share/python-apt/templatescCsd|_g|_tjjd|_d}tjd}tjd}|sy/t	dddgdt
jd	j}Wqt
k
r}|jtjkrtjd
|nd}qXn||_i}d||f}t|}	d}
d}xe|	D]]}|jd
d}
t|
dkr6qn|
d	j}|
dj}|dkrtt||_q|dkr||_q|dkr|j|
|d}t}
||
_||
_d||
_q|dkr||
_q|dkrOt|
_xZ|jD]8}|j|kr|
jj ||j!j |
qqWq|dkrptj"||
_#q|dkrtj"||
_$q|dkr||
_%q|dkr|
j&r||
_&q|d|jkr||
_&q|dkr|
j'r||
_'q|d|jkr+||
_'q|dksJ|d|jkrt(j)j*|rb|pt(j)j+t(j)j,||}||kri}yDt|2}t-|j.g|D]}|j^q}WdQXWnt/k
rdGHg}nXx|D]~}|j0d r,|j1d!|}qnt2|\}}}||krd||j3||qt4||||||<qW|||<n|||
_5q|d"krt||
_6q|d#kr|r|
j7|jr|
j8j |nt9|}q|d$kr%|j:t|q|d%krG|j;t|q|d&kr|j<|qqW|j|
|d}
d}WdQXdS('NtsAPT::Architectures^#LOC:(.+)$sS^(#LOC:.+)|(((http)|(ftp)|(rsync)|(file)|(mirror)|(https))://[A-Za-z0-9/\.:\-_@]+)$tlsb_releases-is-ststdoutis#lsb_release failed, using defaults:tDebians
%s/%s.infot:iitChangelogURItMetaReleaseURItSuites^%s$t	MatchNametParentSuitet	AvailabletOfficialtRepositoryTypetBaseURIs
BaseURI-%stMatchURIsMatchURI-%stMirrorsFilesMirrorsFile-%ss#WARNING: Failed to read mirror files#LOC:s\1tDescriptionR%tCompDescriptiontCompDescriptionLongtParentComponent(=tmetarelease_urit	templatestapt_pkgtconfigtfindtarchRRAtcompileRRtcommunicatetstriptOSErrorterrnotENOENTtloggingtwarntdisttopenRBRCt_tchangelogs_uritfinish_templateRRRR	RRRR5Rtstring_to_boolRRRRRtostpathtisabstabspathtjoinR8tmatcht	Exceptiont
startswithtsubRR3R1RR
RR
R%R.R/R,(RRgtbase_dirR4t	match_loctmatch_mirror_linetexctmap_mirror_setst
dist_fnamet	dist_filettemplatet	componenttlinettokenstfieldtvaluetnannyRtvalue_ftxtmirror_dataRR R!((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyRs			
	
				!	)



cCs|s
dS|jdkrR|jrRx-|jD]}|jr,|j|_Pq,q,Wn|jikr|jrx-|jD]}|jrt|j|_PqtqtWn|r|j|jr|jj|d}nx|jD]}|j	|_	qW|j
j|dS(s finish the current tempalte N(RRRRRRRR
R5RRZ(RR}R~tt((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyRks$			N(R#R$RRRk(((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyRDsqt__main__tUbuntus/usr/share/python-apt/templatess

Suite: %ssDesc: %ssBaseURI: %ssMatchURI: %ssMirrors: %ss %s -%s -%ss  %s("RcReRmt
subprocessRRRAR[RRitobjectRR%R1R6RRDR#tdtinfoRjRZR}RR
RRRtkeysR
RR&RR(((s8/usr/lib/python2.7/dist-packages/DistUpgrade/distinfo.pyt<module>s8 !