Anons79 Mini Shell

Directory : /proc/self/root/lib/python2.7/site-packages/dnf/
Upload File :
Current File : //proc/self/root/lib/python2.7/site-packages/dnf/repodict.pyc

�
�[/\c@s�ddlmZddlmZddlmZddlZddlZ	ddl
Z
ddlZejj
Z
defd��YZdS(i����(tunicode_literals(tConfigError(t_NtRepoDictcBs�eZd�Zd�Zd�Zd�Zd
d�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�ZRS(cCsx|j}||kr.d}t||��ny|jj�Wn(tk
ri}tdj|���nX|||<dS(Nu;Repository %s is listed more than once in the configurationu{0}(tidRt_repotverifytRuntimeErrortformat(tselftrepotid_tmsgte((s0/usr/lib/python2.7/site-packages/dnf/repodict.pytadd#s	cCstjj|j��S(N(tdnftutilt
MultiCallListtvalues(R	((s0/usr/lib/python2.7/site-packages/dnf/repodict.pytall/scCstjj|j��S(N(RRtemptytiter_enabled(R	((s0/usr/lib/python2.7/site-packages/dnf/repodict.pyt_any_enabled3scCsmxf|j�D]X}xO|j||j��D]5}|js,tjtd�|j�|j�q,q,Wq
WdS(Nuenabling %s repository(Rtget_matchingRtenabledtloggertinfoRtenable(R	tsub_name_fnR
tfound((s0/usr/lib/python2.7/site-packages/dnf/repodict.pyt_enable_sub_repos6s
	c
s��fd�}tjj|��}xP|D]H}d|kr[djtjj|��}n|j||�g7_q+Wx0|j�D]"\}}	t	||||	��q�W|j
|�tjt
d�|dj|��|S(u�
        Creates new repo object and add it into RepoDict. Variables in provided values will be
        automatically substituted using conf.substitutions (like $releasever, ...)

        @param repoid: Repo ID - string
        @param conf: dnf Base().conf object
        @param baseurl: List of strings
        @param kwargs: keys and values that will be used to setattr on dnf.repo.Repo() object
        @return: dnf.repo.Repo() object
        cs�t|t�r(tjjj|�j�St|t�sFt|t�r�g}xO|D]D}t|t�r�|j	tjjj|�j��n|rS|SqSWn|S(N(
t
isinstancetstrtlibdnftconftConfigParsert
substitutet
substitutionstlistttupletappend(Rtsubstitutedtvalue(R"(s0/usr/lib/python2.7/site-packages/dnf/repodict.pyR$Is
u://u	file://{}uAdded %s repo from %su, (RR
tRepoRtostpathtabspathtbaseurltitemstsetattrRRRRtjoin(
R	trepoidR"R/tkwargsR$R
R-tkeyR*((R"s0/usr/lib/python2.7/site-packages/dnf/repodict.pytadd_new_repo=s


"cCsd�}|j|�dS(u@enable debug repos corresponding to already enabled binary reposcSs-|jd�r dj|d �Sdj|�S(Nu-rpmsu
{}-debug-rpmsi����u{}-debuginfo(tendswithR(tname((s0/usr/lib/python2.7/site-packages/dnf/repodict.pyt
debug_namees N(R(R	R9((s0/usr/lib/python2.7/site-packages/dnf/repodict.pytenable_debug_reposas	cCsd�}|j|�dS(uAenable source repos corresponding to already enabled binary reposcSs-|jd�r dj|d �Sdj|�S(Nu-rpmsu{}-source-rpmsi����u	{}-source(R7R(R8((s0/usr/lib/python2.7/site-packages/dnf/repodict.pytsource_nameos N(R(R	R;((s0/usr/lib/python2.7/site-packages/dnf/repodict.pytenable_source_reposks	cCs�tjj|�rQg|D]"}tj||�r||^q}tjj|�S|j|d�}|dkrtjjg�Stjj|g�S(N(RRtis_glob_patterntfnmatchRtgettNone(R	R5tktlR
((s0/usr/lib/python2.7/site-packages/dnf/repodict.pyRus/cCsd�|j�D�S(Ncss|]}|jr|VqdS(N(R(t.0tr((s0/usr/lib/python2.7/site-packages/dnf/repodict.pys	<genexpr>�s(R(R	((s0/usr/lib/python2.7/site-packages/dnf/repodict.pyRscCs,d�ttt|�j�dd��D�S(ureturn repos sorted by prioritycss|]}|VqdS(N((RCtitem((s0/usr/lib/python2.7/site-packages/dnf/repodict.pys	<genexpr>�sR5cSs|dj|djfS(Ni(tprioritytcost(tx((s0/usr/lib/python2.7/site-packages/dnf/repodict.pyt<lambda>�s(tsortedtsuperRR0(R	((s0/usr/lib/python2.7/site-packages/dnf/repodict.pyR0�scCs
|j�S(N(tkeys(R	((s0/usr/lib/python2.7/site-packages/dnf/repodict.pyt__iter__�scCsd�|j�D�S(Ncss|]\}}|VqdS(N((RCRAtv((s0/usr/lib/python2.7/site-packages/dnf/repodict.pys	<genexpr>�s(R0(R	((s0/usr/lib/python2.7/site-packages/dnf/repodict.pyRL�scCsd�|j�D�S(Ncss|]\}}|VqdS(N((RCRARN((s0/usr/lib/python2.7/site-packages/dnf/repodict.pys	<genexpr>�s(R0(R	((s0/usr/lib/python2.7/site-packages/dnf/repodict.pyR�s((t__name__t
__module__RRRRR6R:R<RRR0RMRLR(((s0/usr/lib/python2.7/site-packages/dnf/repodict.pyR!s				$	
	
	
				(t
__future__Rtdnf.exceptionsRtdnf.i18nRtdnf.utilRtlibdnf.confR!R>R,RRtdictR(((s0/usr/lib/python2.7/site-packages/dnf/repodict.pyt<module>s

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]