Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/dnf-plugins/
Upload File :
Current File : //lib/python2.7/site-packages/dnf-plugins/builddep.pyo

�
	i/\c@@s�ddlmZddlmZddlmZmZmZddlZddlZddl	Zddl
ZddlZddlZddl
Z
ddlZddlZdefd��YZejjdejjfd��Y�ZdS(	i(tabsolute_import(tunicode_literals(t_tloggert
rpm_loggerNtredirect_rpm_loggingcB@s,eZd�Zd�Zd�Zd�ZRS(cC@s
d|_dS(N(tNonetsink(tself((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyt__init__&sc@s%tj����fd��}|S(Nc@s���||�SWdQXdS(N((targstkwds(tfuncR(s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pytinner*s(t	functoolstwraps(RRR
((RRs8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyt__call__)s!cC@s`xYtjD],}t|tj�r
tj|j�Pq
q
Wtdd�|_	tj|j	�dS(Nu	/dev/nulluw(
Rthandlerst
isinstancetloggingtFileHandlertrpmt
setLogFiletstreamtopenR(Rthandler((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyt	__enter__0scC@s|jr|jj�ndS(N(Rtclose(Rtexc_typetexctexc_tb((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyt__exit__9s	(t__name__t
__module__R	RRR(((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyR%s				tBuildDepCommandcB@s�eZd
ZdZee�Zed�Zd�Zed��Z	d�Z
e�d��Zed��Z
d	�Zd
�Zd�Zd�ZRS(ubuilddepu	build-depu3Install build dependencies for package or spec fileu[PACKAGE|PACKAGE.spec]cC@s/tt|�j|�tjjj�|_dS(N(tsuperR"R	tdnfRttransactiontinitReadOnlyTransactiont_rpm_ts(Rtcli((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyR	FscC@s�d�}|jddddddtd��|jd	d
ddd
gddd|dtd��|j�}|jddddtd��|jddddtd��dS(NcS@sV|r|jdd�ng}t|�dkrRtd�|}tj|��n|S(Niiu&'%s' is not of the format 'MACRO EXPR'(tsplitRtlenRtargparsetArgumentTypeError(targtarglisttmsg((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyt	macro_defLs
upackagestnargsu+tmetavarupackagethelpu"packages with builddeps to installu-Du--definetactionuappendtdefaultu'MACRO EXPR'ttypeu$define a macro for spec file parsingu--specu
store_trueu)treat commandline arguments as spec filesu--srpmu)treat commandline arguments as source rpm(tadd_argumentRtadd_mutually_exclusive_group(tparserR0tptype((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyt
set_argparserJs	


cC@s�|jj}t|_t|_t|_t|_|jjpE|jj	s�xX|jj
D]G}|jd�p�|jd�p�|jd�sU|jj
j�PqUqUWndS(Nu.src.rpmu
.nosrc.rpmu.spec(R(tdemandstTruetavailable_repost	resolvingt	root_usertsack_activationtoptstspectsrpmtpackagestendswithtbasetrepostenable_source_repos(RR<tpkgspec((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyt	configure^s				cC@s^x,|jjD]}tj|d|d�q
Wt}x�|jjD]�}y�|jjrg|j|�nv|jjr�|j	|�nZ|j
d�s�|j
d�r�|j|�n,|j
d�r�|j	|�n
|j|�WqBtj
jk
r}tj|�t}qBXqBWx%|jjD]}tj|d�qW|rZtj
jtd���ndS(Niiu.src.rpmu	nosrc.rpmu.specu!Some packages could not be found.(RBtdefineRtaddMacrotFalseRERDt	_src_depsRCt
_spec_depsRFt_remote_depsR$t
exceptionstErrorRterrorR=tdelMacroR(Rtmacrot
pkg_errorsRJte((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pytrunns*
cC@s|j�dS(Ni(tDNEVR(trpm_dep((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyt_rpm_dep2reldep_str�scC@stjj|jj�}|jd|�|j�}|r�|jd�r�tjj|jj�}|jd|�|j�}n|s�td�}t	j
||�tS|jj|�}|r�x!|D]}tjj
|�q�Wn|jjjd|dt�tS(Ntprovidesu/tfileu$No matching package to install: '%s'tselecttoptional(R$tselectortSelectorRGtsacktsettmatchest
startswithRRtwarningRNt_sltr_matches_installedt_msg_installedt_goaltinstallR=(Rt
reldep_strtsltrtfoundR/talready_insttpackage((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyt_install�s"
c
C@stj|tj�}y|jj|�}WnZtjk
r�}t|�dkretd�|}ntj	|�t
jj|��nXtj	|�|j
d�}t}xE|D]=}|j|�}|jd�r�q�n||j|�M}q�W|std�}	t
jj|	��ndS(Nuerror reading package headeru2Failed to open: '%s', not a valid source rpm file.urequirenameurpmlib(uNot all dependencies satisfied(tosRtO_RDONLYR'thdrFromFdnoRRTtstrRRR$RRRStdsFromHeaderR=R\RfRq(
Rtsrc_fntfdthRXtdstdonetdepRlterr((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyRO�s&


c	C@s�ytj|�}Wn;tk
rP}td�||f}tjj|��nXt}x?tj|j	d�D](}|j
|�}||j|�M}qmW|s�td�}tjj|��ndS(Nu/Failed to open: '%s', not a valid spec file: %surequiresuNot all dependencies satisfied(RRCt
ValueErrorRR$RRRSR=RztsourceHeaderR\Rq(	Rtspec_fnRCtexR/R{R|RlR}((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyRP�s	
c	C@stjj|�j|jj�jdd�}td�|D��}|jjj�j	�jd||gdd�j
�j�}|s�tjj
td�|��nt}x;|D]3}x*|jD]}||jt|��M}q�Wq�W|std�}tjj
|��ndS(Nt	arch__nequsrccS@sh|]}|j�qS((tsource_name(t.0tpkg((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pys	<setcomp>�s	tnametarchuno package matched: %suNot all dependencies satisfied(R$tsubjecttSubjecttget_best_queryRGRctfiltertlisttqueryt	availabletlatestRYRRRSRR=trequiresRqRu(	RRpR�tsourcenamestpkgsR{R�treqR}((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyRQ�s"
!(ubuilddepu	build-dep(R R!taliasesR/RtsummarytusageR	tstaticmethodR;RKRRYR\RqRORPRQ(((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyR">s					(t
__future__RRtdnfpluginscoreRRRR+R$tdnf.clitdnf.exceptionstdnf.rpm.transactionRRRrRtobjectRtplugintregister_commandR(tCommandR"(((s8/usr/lib/python2.7/site-packages/dnf-plugins/builddep.pyt<module>s

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