403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/DistUpgrade/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyc
ó
WâRc@sxddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZd„Zd„Z
defd„ƒYZdefd	„ƒYZd
efd„ƒYZdefd
„ƒYZedkrtejƒeƒZx%eD]ZejdejƒƒqWeddƒZejdeƒejeddƒƒejeddƒƒndS(iÿÿÿÿN(tDistInfo(tfunction_deprecated_bycCsž|jdƒ}|jdƒ}||kr.tSy*|jdƒd}|jdƒd}Wntk
rltSXd|krš||jdƒd|krštStS(sµ check if the given add_url is idential or a mirror of orig_uri
        e.g. master_uri = archive.ubuntu.com
            compare_uri = de.archive.ubuntu.com
            -> True
    s/ s//it.(trstriptTruetsplitt
IndexErrortFalsetindex(t
master_uritcompare_uritcompare_srvt
master_srv((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyt	is_mirror*s
cCstt|ƒƒS(s. simple and efficient way to return uniq list (tlisttset(ts((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pytuniqHstSourceEntrycBsPeZdZdd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
RS(	s single sources.list entry cCs®t|_t|_d|_g|_d|_d|_g|_d|_||_	|dkr‚tjj
dƒtjjdƒ}n||_|j|ƒd|_g|_dS(NtsDir::EtcsDir::Etc::sourcelist(Rtinvalidtdisabledttypet
architecturesturitdisttcompstcommenttlinetNonetapt_pkgtconfigtfind_dirtfindtfiletparsettemplatetchildren(tselfRR"((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyt__init__Ps 											
	cCsX|j|jkoW|j|jkoW|j|jkoW|j|jkoW|j|jkS(s- equal operator for two sources.list entries (RRRRR(R&tother((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyt__eq__cs
cCs!|jƒ}g}d}t}t}xÔtt|ƒƒD]À}||dkrk|rkt}|||7}q7||dkr’t}|||7}q7|rÉ||jƒrÉt}|j|ƒ||}q7||jƒré|rét}q7|||7}q7Wt|ƒdkr|j|ƒn|S(s‚ a split() implementation that understands the sources.list
            format better and takes [] into account (for e.g. cdroms) Rt[t]i(tstripRtrangetlenRtisspacetappend(R&Rtpiecesttmptp_foundtspace_foundti((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pytmysplitks,

	cCsK|jjƒ}|dks'|dkr4t|_dS|ddkrt|_|djƒjƒ}|ddkr€t|_dS|d}n|jdƒ}|dkrÆ||d|_|| }n|j|ƒ}t	|ƒd
krôt|_dS|djƒ|_
|j
dkr#t|_dS|djƒddkrÕ|jdƒjdƒjd
ƒ}xt|D]i}y|jddƒ\}}Wntk
r£t|_qeX|dkrÅ|jdƒ|_
qet|_qeWn|djƒ|_t	|jƒdkr	t|_n|djƒ|_t	|ƒd
kr>|d
|_n	g|_dS(s^ parse a given sources.list (textual) line and break it up
            into the field we have Rt#Niitrpmsrpm-srctdebsdeb-srciR*s[]t;t=tarcht,i(R8srpm-srcR9sdeb-src(R9sdeb-srcR8srpm-src(RR,RRRRR!RR6R.Rtpopt	ExceptionRRRR(R&RR1R5toptionstoptiontkeytvalue((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyR#ŠsP			

		!


cCs^||_|r.|jjƒjdƒ|_n,|jjƒddkrZd|j|_ndS(s# set a line to enabled or disabled R7iN(RRtlstripR,(R&t	new_value((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pytset_enabledÈs

cCs|jƒjƒS(s debug helper (tstrR,(R&((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyt__str__ÓscCsØ|jr|jSd}|jr(d}n||j7}|jr[|ddj|jƒ7}n|d|j|jf7}t|j	ƒdkr§|ddj|j	ƒ7}n|j
dkrÊ|d|j
7}n|d	7}|S(
s# return the current line as string Rs# s
 [arch=%s]R=s %s %sit s #s
(RRRRRtjoinRRR.RR(R&R((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyRG×s			
	
N(t__name__t
__module__t__doc__RR'R)R6R#RFRHRG(((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyRMs			>		tNullMatchercBseZdZd„ZRS(s a Matcher that does nothing cCstS(N(R(R&R((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pytmatchïs(RKRLRMRO(((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyRNìstSourcesListcBsžeZdZedd„Zd„Zd„Zd„Zdddgd„Z	d	„Z
d
„Zej
rueeƒZndd„Zd„Zd
„Zd„ZRS(s8 represents the full sources.list + sources.list.d file s /usr/share/python-apt/templates/cCs;g|_|r!t|ƒ|_ntƒ|_|jƒdS(N(RtSourceEntryMatchertmatcherRNtrefresh(R&twithMatchertmatcherPath((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyR'ös
	cCs™g|_tjjdƒ}|j|ƒtjjdƒ}x(tjd|ƒD]}|j|ƒqNWx-|jD]"}|jso|jj	|ƒqoqoWdS(s" update the list of known entries sDir::Etc::sourcelistsDir::Etc::sourcepartss	%s/*.listN(
RRRt	find_filetloadR tglobRRRRO(R&R"tpartsdirtsource((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyRSs	
	ccs#x|jD]}|Vq
Wt‚dS(sM simple iterator to go over self.list, returns SourceEntry
            types N(Rt
StopIteration(R&tentry((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyt__iter__s	c/s[xT|jD]I‰t‡‡fd†ˆDƒƒr
t‡fd†|Dƒƒr
ˆVq
q
WdS(Nc3s(|]}tˆ|ƒˆ|kVqdS(N(tgetattr(t.0RB(RZtattrs(s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pys	<genexpr>sc3s|]}|ˆƒVqdS(N((R_t	predicate(RZ(s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pys	<genexpr>s(Rtall(R&t
predicatesR`((RZR`s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyt__findsRiÿÿÿÿc	sÿtˆƒ‰|}	|j‡fd†dtdtd|d|d|ƒ}
xW|
D]O}xF|	D]>}||jkr]|	|	j|ƒ=t|	ƒdkr›|Sq]q]WqPW|j‡fd†dtd|d|d|ƒ}
x\|
D]T}|jrt|jƒ|	krt|_|S|jsÚt|j|	ƒ|_|SqÚW|}
ˆrX|
d	d
jˆƒ7}
n|
d||f7}
x|	D]}|
d|}
qsW|d
krªd|
|f}
n|
d}
t	|
ƒ}|dk	rØ||_n|jj
|ƒ|jj||ƒ|S(s¨
        Add a new source to the sources.list.
        The method will search for existing matching repos and will try to
        reuse them as far as possible
        cst|jƒˆkS(N(RR(R(R(s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyt<lambda>'sRRRRRicst|jƒˆkS(N(RR(R(R(s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyRe4ss
 [arch=%s]R=s %s %sRIRs%s #%s
s
N(Rt_SourcesList__findRRRR.RRRJRRR"RRRORtinsert(R&RRRt
orig_compsRtposR"RRtsourcesRZtnew_compRtct	new_entry((Rs;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pytaddsF	


		

cCs|jj|ƒdS(s2 remove the specified entry from the sources.list N(Rtremove(R&tsource_entry((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyRoQscCs²tjjdƒ}tjj||ƒrQtjj|ƒrQtj|||ƒntjjdƒ}xHt	j	d|ƒD]3}tjj||ƒrwtj|||ƒqwqwWdS(s: restore sources.list files based on the backup extension sDir::Etc::sourcelistsDir::Etc::sourcepartss	%s/*.listN(
RRRVtostpathtexiststshutiltcopyR RX(R&t
backup_extR"RY((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pytrestore_backupUscCs†tƒ}|dkr'tjdƒ}nxX|jD]M}|j|kr1tjj|jƒr1t	j
|jd|j|fƒq1q1W|S(s† make a backup of the current source files, if no backup extension
            is given, the current date/time is used (and returned) s%y%m%d.%H%Ms%s%sN(RRttimetstrftimeRR"RqRrRsRtRu(R&Rvtalready_backupedRZ((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pytbackupds	'cCskyLt|dƒ7}x-|D]%}t||ƒ}|jj|ƒqWWdQXWntjd|ƒnXdS(s (re)load the current sources trNscould not open file '%s'
(topenRRR0tloggingtwarn(R&R"tfRRZ((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyRWps
cCsài}t|jƒdkr\tjjdƒ}d}t|dƒ}|j|ƒWdQXdSz]xV|jD]K}|j|kršt|jdƒ||j<n||jj|jƒƒqiWWdx|D]}||j	ƒqÃWXdS(s save the current sources isDir::Etc::sourcelists ## See sources.list(5) for more information, especialy
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.
twN(
R.RRRRVR}twriteR"RGtclose(R&tfilesRrtheaderR€RZ((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pytsavezs"
cCs¬g}i}x“|D]‹}|jdkr.qn|jjrv|j}||kr\g||<n||}|j|ƒqt|jjƒdkr|j|ƒqqW||fS(s5get all parent and child channels in the sources listiN(R$RtchildR0R.R%(R&tsources_listtparentstused_child_templatesRZRBttemp((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pytcheck_for_relations’s
	

N(RKRLRMRR'RSR]RfRRnRoRwRt_COMPAT_0_7Rt
restoreBackupR{RWR†RŒ(((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyRPós			5				
	RQcBs eZdZd„Zd„ZRS(s} matcher class to make a source entry look nice
        lots of predefined matchers to make it i18n/gettext friendly
        cCs§g|_tjd|ƒ}x„|D]|}tjj|ƒ}|jdƒ}|d|!}t|d|ƒ}x3|jD](}|jdk	rs|jj	|ƒqsqsWq#WdS(Ns	%s/*.infos.infoitbase_dir(
t	templatesRXRqRrtbasenameR!Rt	match_uriRR0(R&RUt
spec_filesR€R5RR$((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyR'°s	

cCs¿t}x²|jD]§}tj|j|jƒrztj|j|jƒrz|j	|j	ksg|j	dkrzt
}||_Pq|j|jƒrtj|j|jƒrt
}||_PqqW|S(s%Add a matching template to the sourceR9(
RRtretsearchR’RROt
match_nameRRRR$R
(R&RZtfoundR$((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyRO¾s!		(RKRLRMR'RO(((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyRQ«s	t__main__sentry %ss!http://archive.ubuntu.com/ubuntu/s$http://de.archive.ubuntu.com/ubuntu/sis_mirror(): %ss http://archive.ubuntu.com/ubuntus#http://de.archive.ubuntu.com/ubuntu(RXR~tos.pathRqR”RtRxRtdistinfoRtapt.deprecationRR
RtobjectRRNRPRQRKtinit_configRjR\tinfoRGtmirror(((s;/usr/lib/python2.7/dist-packages/DistUpgrade/sourceslist.pyt<module>s4		Ÿ¸(
	
	


Youez - 2016 - github.com/yon3zu
LinuXploit