Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3
f$ @ s d dl mZ d dl mZ d dlmZmZ d dlZd dlZd dlZd dl Zd dl
Zd dlZd dlZ
d dlZd dlZd dlZd dlZejjG dd dejjZdS ) )absolute_import)unicode_literals)_loggerNc s e Zd ZdZdZeeZedZ fddZdd Z d d
Z
edd Zd
d Z
dd Zdd Zedd Zdd Zdd Zdd Zdd Z ZS )BuildDepCommandbuilddep build-depz3Install build dependencies for package or spec filez[PACKAGE|PACKAGE.spec]c s( t t| j| tjjj | _g | _d S )N) superr __init__dnfrpmZtransactionZinitReadOnlyTransaction_rpm_tstempdirs)selfcli) __class__ /usr/lib/python3.6/builddep.pyr
/ s zBuildDepCommand.__init__c C s x| j D ]}tj| qW d S )N)r shutilZrmtree)r temp_dirr r r __del__4 s zBuildDepCommand.__del__c C s t jjj|}|d dkr |jS tjj }tjdd}t jj
|t jj|}| jj
| t|d}zFy|j| jjj||j W n$ tk
r } z W Y dd}~X nX W d|j X |S ) z
In case pkgspec is a remote URL, download it to a temporary location
and use the temporary file instead.
r file Z
dnf_builddep_)prefixzwb+N)r r )r ZpycompZurlparsepathlibdnfZrepoZ
DownloadertempfileZmkdtemposjoinbasenamer appendopenZdownloadURLbaseZconfZ_configfilenoRuntimeErrorclose)r pkgspeclocationZ
downloaderr Z temp_fileZtemp_foexr r r _download_remote_file8 s
z%BuildDepCommand._download_remote_filec C s dd }| j dddtdd | j dd d
g d|tdd
| j dddtdd | j }|j ddtdd |j ddtdd d S )Nc S s: | r| j d dng }t|dk r6td| }tj||S )N z&'%s' is not of the format 'MACRO EXPR')splitlenr argparseZArgumentTypeError)argZarglistmsgr r r macro_defR s
z0BuildDepCommand.set_argparser..macro_defpackages+packagez"packages with builddeps to install)nargsmetavarhelpz-Dz--definer z'MACRO EXPR'z$define a macro for spec file parsing)actiondefaultr6 typer7 z--skip-unavailable
store_trueFz5skip build dependencies not available in repositories)r8 r9 r7 z--specz)treat commandline arguments as spec files)r8 r7 z--srpmz)treat commandline arguments as source rpm)add_argumentr Zadd_mutually_exclusive_group)parserr1 Zptyper r r
set_argparserP s
zBuildDepCommand.set_argparserc C s | j jsd| j _d S )Nerror)optsZrpmverbosity)r r r r
pre_configuref s zBuildDepCommand.pre_configurec C sr | j j}d|_d|_d|_d|_| jjp.| jjsnx<| jj D ]0}|j
dpZ|j
dpZ|j
ds:| jjj
P q:W d S )NTz.src.rpmz
.nosrc.rpmz.spec)r demandsZavailable_reposZ resolvingZ root_userZsack_activationr@ specsrpmr2 endswithr" ZreposZenable_source_repos)r rB r&