Anons79 Mini Shell

Directory : /usr/lib/python2.7/site-packages/dnf/module/
Upload File :
Current File : //usr/lib/python2.7/site-packages/dnf/module/module_base.pyc

�
�[/\c@s�ddlmZddlZddlZddlZddlZddlZddl	m
Z
ddlmZddl
mZmZmZejjjZejjjZejjjZejjjZed�Zed�Zdefd	��YZd
�ZdS(i����(tOrderedDictN(tEnableMultipleStreamsException(tlogger(t_tP_tucds6

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalledsA

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled, [a]ctive]t
ModuleBasecBs�eZd�Zd�Zd�Zed�Zd�Zd�Zd�Z	d�Z
d�Zed	�Zd
�Z
d�Zed�Zd
�Zd�Zed�Zd�Zed��Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs
||_dS(N(tbase(tselfR((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyt__init__&sc		Cs�|j|�\}}}}xQ|j�D]C\}\}}|jr(tjtd�j|j|j��q(q(W|s�|s�|r�tj	j
d|d|d|��ndS(Ns%Ignoring unnecessary profile: '{}/{}'tno_match_group_specsterror_group_specstmodule_debsolv_errors(t!_resolve_specs_enable_update_sacktitemstprofileRtinfoRtformattnametdnft
exceptionst
MarkingErrors(	Rtmodule_specstno_match_specsterror_specst
solver_errorstmodule_dictstspectnsvcaptmodule_dict((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pytenable)s	cCsF|j|t�\}}|s$|rBtjjd|d|��ndS(NR
R(t_modules_reset_or_disabletSTATE_DISABLEDRRR(RRRR((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pytdisable5sc 	CsF|j|�\}}}}i}t�}x8|j�D]*\}	\}
}x|j�D]\}}
x�|
j�D]�\}}g|D]'}|jjj|j��r�|^q�}|s�|j|	�qong}|j|�}|
j	r7|j
|j|
j	��|s�tj
td�j|	��|j|	�qoq�n�|jjj||�}|swtj
td�j||��nx[t|�D]M}|j|�}|s�tj
td�j|||��n|j
|�q�Wx]|D]U}|jjj||j��x0|j�D]"}|j|t��j|	�qWq�Wx!|D]}|j|j��q<WqoWqVWq7W|jjj�jd|�j�}g|jjj�D]}|jr�|j^q�}|jjj�jd|�jd|j ��}|j!|�}x|j�D]\}}|j"d|�}|s�|jjj�jd|�}|s�x*|D]"}	tj
td�j|	��qUWtj
td�j|��|j
|�qq�n|jj#j$j|�t%j&j'|jj�}|jd	|�|jj#jd
|d|�qW|s|s|rBt%j(j)d|d
|d|��ndS(Ns&Unable to match profile in argument {}s$No default profiles for module {}:{}s'Profile {} not matched for module {}:{}tnevra_stricttreponameRsUnable to resolve argument {}sNo match for package {}tpkgtselecttoptionalR
RR(*R
tsetRRt_moduleContainertisModuleActivetgetIdtappendt_get_latestRtextendtgetProfilesRterrorRRtgetDefaultProfilestinstalltgetNamet
getContentt
setdefaulttaddtupdatetgetArtifactstsacktquerytfiltermtapplytrepostiter_enabledtmodule_hotfixestidtkeystuniontfiltert_goalt
group_membersRtselectortSelectorRR( RRtstrictRRRRtinstall_dicttinstall_set_artefactsRRt
moduledictRt
streamdicttstreamtmodule_listtxtinstall_module_listtprofilest
latest_moduletprofiles_stringsRtmodule_profilestpkg_nametmoduletinstall_base_querytit
hot_fix_reposthotfix_packagest	set_specsR9tsltr((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyR1;sz	
'
	
	
$
#1!
 
	!cCs@|j|t�\}}|r<tjjd|d|��ndS(NR
R(Rt
STATE_UNKNOWNRRR(RRRR((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pytreset�scCs�g}xs|D]k}|j|�\}}|sA|j|�q
ng|D]'}|jjj|j��rH|^qH}|s�tjtd�j	|��q
n|j
|t�}t�}	x-|j
�D]\}
}x|j
�D]\}}
|	j|j|
|��|j|
�}t|jjj|j���}|s?q�n|jr�|j|j�}|sfq�nxw|D].}|j�|krm|	j|j��qmqmWq�x;|D]3}x*|j|�D]}|	j|j��q�Wq�Wq�Wq�W|	s
tjtd�j	|��n|jjj�j�jd|	�}|r
tjj|jj�}|jd|�|jjjd|�q
q
W|S(NsUnable to resolve argument {}s&Unable to match profile in argument {}RR$R%(t_get_modulesR+RR(R)R*RR/RRt_create_module_dict_and_enabletFalseR'RR6t)_get_package_name_set_and_remove_profilesR,tgetInstalledProfilesR2RR.R3R8R9t	availableR:RRERFRCtupgrade(RRRRRMRRNtupdate_module_listRtupgrade_package_setRRKRLtmodule_list_from_dictRQtinstalled_profiles_stringstprofiles_setRtprofile_stringR9R[((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyRd�sP


'	
	

#$cCsbg}t�}x�|D]�}|j|�\}}|sJ|j|�qn|j|t�}g}xS|j�D]E\}	}
x6|
j�D](\}}|j|j||t��q�WqoW|s�t	j
td�j|��n|j
|�qW|r^|jjj�}
|j|
�}|r^|jjj�j�jd|�}|r[|jj|�q[q^n|S(Ns&Unable to match profile in argument {}R(R'R^R+R_R`RR-RatTrueRR/RRR6RR(tgetInstalledPkgNamest
differenceR8R9t	installedR:t_remove_if_unneeded(RRRtremove_package_setRRMRRtremove_packages_namesRRKRLRgtkeep_pkg_namesR9((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pytremove�s0	

$c
Cs�tj|�}x�|j�D]�}|jr4|jnd}|jrL|jnd}d}|jrj|jnd}|jr�|jnd}|jr�|jdkr�t|j�}n|j	j
j|||||�}	|	r|	|fSqWdS(Nti����(((N(
thawkeytSubjecttnsvcap_possibilitiesRRLtcontexttarchtversiontstrRR(R9tNone(
Rtmodule_spectsubjRRRLRzRxRytmodules((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyR^�s!cCsSd}|rO|d}x6|dD]'}|j�|j�kr!|}q!q!Wn|S(Nii(R|t
getVersion(RRMtlatestRU((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyR,�s
c
Cs�i}x?|D]7}|j|j�i�j|j�g�j|�q
Wxu|j�D]g\}}|jjj|�}t|�dkrn|t	kr�|t
kr�|tkr�t|��n|t
kr�|jjj
|�}n|jjj|�}|s||krt|��nx�t|j��D]>}	|	|kr`|r)|jjj||	�q)q)n||	=q)Wn6|r�x-|j�D]}	|jjj||	�q�Wnt|�dksUt�qUW|S(Ni(R4R2t	getStreamR+RRR(tgetModuleStatetlent
STATE_DEFAULTt
STATE_ENABLEDR RtgetEnabledStreamtgetDefaultStreamtsortedR@RtAssertionError(
RRMRt
moduleDictRUt
moduleNamet
streamDicttmoduleStateRLtkey((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyR_�s4
/cCsg}g}i}x�|D]�}|j|�\}}|sM|j|�qny&|j|t�}||f||<Wqttfk
r�}	|j|�tjt|	��tjt	d�j
|��qXqWg|jjj
�D]}
|
jr�|
j^q�}|jjj|jj||jjjd|jjj�}x�|j�D]�\}\}}
x�|
j�D]�}x�|j�D]{}y#|jjjtjj|��Wqxtk
r�}	|j|�tjt|	��tjt	d�j
|��qxXqxWqeWqFW||||fS(NsUnable to resolve argument {}(R^R+R_RktRuntimeErrorRRR/RRRRR<R=R>R?R8tfilter_modulesR(tconftinstallrootR|tdebug_solverRtvaluestenableDependencyTreetlibdnfRUtVectorModulePackagePtr(RRRt
error_specRRRMRRteRWRXRR�R�R((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyR
s<


$1
,c
	Cs�g}x|D]}|j|�\}}|s]tjtd�j|��|j|�q
n|jr�tjtd�j|j|j��nt	�}x!|D]}|j
|j��q�WxR|D]J}	|tkr�|j
jj|	�n|tkr�|j
jj|	�q�q�Wq
Wg|j
jj�D]}
|
jr'|
j^q'}|j
jj|j
j||j
jj|j
jjdtd|j
jj�}||fS(NsUnable to resolve argument {}s%Ignoring unnecessary profile: '{}/{}'tupdate_onlytdebugsolver(R^RR/RRR+RRRR'R5R2R\RR(R]R R!R<R=R>R?R8R�R�R�tmodule_platform_idRkR�(
RRtto_stateRRRMRtmodule_namesRURRWRXR((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyR(s0

		

1c
Cs0t�}|j|�}t|jjj|j���}|sFt�S|jr�|j|j�}|snt�Sx�|D]S}|j�|kru|r�|jjj||j��n|j	|j
��ququWn]xZ|D]R}	|r�|jjj||	�nx*|j|	�D]}|j	|j
��qWq�W|S(N(R'R,RR(RbR2RR.t	uninstallR6R3(
RRMRRstpackage_name_setRQRhRiRRj((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyRaCs*		

c
Cs*t�}x|D]}|j|�\}}|sStjtd�j|��qn|jr�tjtd�j|j|j��nx�|D]�}t�}|j	�|d<xF|j
�D]8}djg|j�D]}	|	^q��||j
�<q�W|j|j|�j��q�WqWdjt|��S(NsUnable to resolve argument {}s%Ignoring unnecessary profile: '{}/{}'tNames
s

(R'R^RRRRRRRtgetFullIdentifierR.tjoinR3R2R5t_create_simple_tablettoStringR�(
RRtoutputR}RMRRUtlinesRtpkgName((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyt_get_info_profiles[s"	
	
	0$cCs�|jjj|j��}|j�}d}xj|D]b}|dj|j�|j�|krddnd�7}||j�|kr�|r�dnd7}q4W|d S(NRts{}{}s [d]s [i], s, i����(RR(RbR2R.R(Rt
modulePackagetdefault_profilestenabled_strtinstalled_profilestavailable_profilestprofiles_strR((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyt_profile_report_formaterrs
	+!cCs�d}d}d}|j�|jjj|j��krBd}n|jjj|�rs|sfd}n|d7}n1|jjj|�r�|s�d}n|d7}n|r�|jjj|�r�|s�d}n|d7}n|||fS(NRts [d]t s[e]s[x]s[a](R�RR(R�R2t	isEnabledt
isDisabledR)(RR�t
markActivetdefault_strR�tdisabled_str((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyt_module_strs_formater~s&		
	
	
cCs�t�}x�|D]�}|j|�\}}|sStjtd�j|��qn|jr�tjtd�j|j|j��nxB|D]:}|j|dt	�\}}}	|j
jj|j
�|j��}
|j||
|�}t�}|j
�|d<|j�|||	|d<|j�|d<|j�|d<||d<d	j|
�|d
<|j�|d<|j�|d<|j�|d
<djt|j���|d<|j|j|�j��q�WqWdjt|��}
|
r�|
t7}
n|
S(NsUnable to resolve argument {}s%Ignoring unnecessary profile: '{}/{}'R�R�tStreamtVersiontContexttProfilesR�sDefault profilestRepotSummarytDescriptions
t	Artifactss

(R'R^RRRRRRR�RkRR(R0R2R�R�RR�t
getContextR�t	getRepoIDt
getSummarytgetDescriptionR�R7R5R�R�tMODULE_INFO_TABLE_HINT(RRR�R}RMRR�R�R�R�R�R�R�t	str_table((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyt	_get_info�sB	
	
	
$
cCs�tjj�}|jt�|jd�|jd�}|jd�}|jt�|jd�|j	�xa|j
�D]S\}}|rx|j�}|j|�j
|�|j|�j
t|��qxqxW|S(Ns : R�tValues
(R�t	smartcolstTabletenableNoheadingsRktsetColumnSeparatort	newColumntsetWraptsetSafecharstsetNewlineWrapFunctionRtnewLinet
getColumnCelltsetDataR{(R�ttabletcolumn_nametcolumn_valuet	line_nametvaluetline((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyR��s




#c	Cs�t�}x�|D]�}|j|�\}}|sStjtd�j|��qn|jr�tjtd�j|j|j��nx0|D](}|j�}|r�|j	|�q�q�WqWdj
t|��}|S(NsUnable to resolve argument {}s%Ignoring unnecessary profile: '{}/{}'s

(R'R^RRRRRRtgetYamlR5R�R�(	RRR�R}RMRR�Rt
output_string((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyt_get_full_info�s	
	
c
Cs�t�}|jjj�}|jjj�jdt�j�}xP|D]H}t	j
j|�}|j|j
|jjdtdtdt��}qFW|j�xL|D]D}|j�}|s�q�n|jd|�}	|	r�x|	D]}
d}g}x?|j�D]1}
|
j|
j�kr�|j|
j��q�q�Wt�}|j�|d<dj|�|d	<|j�|d
<|j�|d<|j|�}|dj|jjjjt |
���7}|d
j|j!��7}|j"|�q�Wq�q�Wdjt#|��S(Ntemptyt
with_nevrat
with_providestwith_filenamesR"RttModuleR�R�R�R�s{}
s{}s

($R'RR(tgetModulePackagesR8R9R:RkR;RtsubjectRvRAtget_best_queryR`R7RBR.RR3R+R2RR�R�R�R�R�RR�ttermtboldR{R�R5R�(Rt	rpm_specsR�tmodulePackagest	baseQueryRR~R�t	artifactsR9R$t
string_outputRPRR�R�((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyt_what_provides�s<	$
(


	+cCstjj�}|jtjjj�|jt�|jd�}|jd�}|jd�}|jt�|jd�}|jt�|j	j
js�t|_nxb|D]Z}xQ|D]I}t
|�dkr�|d}	nKg|D]!}
|j	jj|
�r�|
^q�}|r|d}	n
|d}	|j�}|j|	dt�\}
}}|j	jj|	j�|	j��}|j|	||�}|j|�j|	j��|j|�j|	j�|
||�|j|�j|�|j|�j|	j��q�Wq�W|S(NR�R�R�R�iiR�(R�R�R�tsetTermforcetTermForce_AUTOtenableMaxoutRkR�R�RR�tverbosethiddenR�R(R)R�R�R`R0R2R�R�R�R�R�(RR�R�R�t
column_streamtcolumn_profilestcolumn_infotlatest_per_repotnameStreamArchR�RUtactiveR�R�R�R�R�R�((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyt_create_and_fill_tablesD






!

		$cCs�g}|rBxE|D](}|j|�\}}|j|�qWn|jjj�}|jjj||�}|svdS|j|�}d}	d}
|jj|dddj�j	}t
|d�}|j|�}
|j|�}||
7}x�t
d|j��D]�}||
|kr�|
|7}
|	d7}	|jj||	ddj�j	}t
||	�}|d7}||j|�7}||
7}n|j|�}||j||�7}qW|tS(NRtiis
(R^R-RR(R�tgetLatestModulesPerRepoR�R<R�RR�t_format_headert_format_repoidtrangetgetNumberOfLinestgetLineR�tMODULE_TABLE_HINT(RRtmodule_stateRRRMRR�R�tcurrent_repo_id_indextalready_printed_linest	repo_nametversionstheaderR�RWR�((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyt_get_brief_description,s:
%


%

cCs3|jd�}|j||�jdd�ddS(Nis
i(R�R�tsplit(RR�R�((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyR�NscCsdj|jjjj|��S(Ns{}
(RRR�R�R�(RR((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyR�Rs(t__name__t
__module__R	RR!RkR1R]RdRsR^R,R_R
RR`RaR�R�R�R�tstaticmethodR�R�R�R�RR�R�(((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyR$s0			H		,					!				&		$	)	"	cCs7tjj|�}djtddt|��|g�S(Ns
sModular dependency problem:sModular dependency problems:(Rtutilt_format_resolve_problemsR�RR�(terrorstmsg((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pytformat_modular_solver_errorsVs( tcollectionsRRutlibdnf.smartcolsR�t
libdnf.moduletdnf.selectorRtdnf.exceptionstdnf.module.exceptionsRtdnf.utilRtdnf.i18nRRRRUtModulePackageContainertModuleState_DEFAULTR�tModuleState_ENABLEDR�tModuleState_DISABLEDR tModuleState_UNKNOWNR\R�R�tobjectRR(((s:/usr/lib/python2.7/site-packages/dnf/module/module_base.pyt<module>s$��4

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