404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.191.84.179: ~ $
3

�fJ)�@szddlmZddlmZddlmZmZddlZddlZddlZddl	Z	ddl
Z
Gdd�dej�ZGdd�dej
j�ZdS)	�)�absolute_import)�unicode_literals)�_�loggerNcs eZdZdZ�fdd�Z�ZS)�
RepoManage�
repomanagecs,tt|�j||�|dkrdS|jt�dS)N)�superr�__init__Zregister_command�RepoManageCommand)�self�base�cli)�	__class__�� /usr/lib/python3.6/repomanage.pyr	$szRepoManage.__init__)�__name__�
__module__�__qualname__�namer	�
__classcell__rr)rrr src@s\eZdZdZed�Zdd�Zdd�Zdd�Ze	d	d
��Z
e	dd��Zd
d�Ze	dd��Z
dS)r
rz"Manage a directory of rpm packagescCs,|jjr(|jjr(|jjtjtjd�dS)N)�stdout�stderr)�opts�verbose�quietr
Zredirect_logger�loggingZWARNING�INFO)rrrr�
pre_configure/szRepoManageCommand.pre_configurecCs0|jjr|jjr|jj�|jj}d|_dS)NT)rrrr
Zredirect_repo_progress�demandsZsack_activation)rrrrr�	configure3s
zRepoManageCommand.configurec"s@�jjr �jjr tjjtd����jjr@�jjr@tjjtd����jjr`�jjr`tjjtd����jjr|�jjr|d�j_i}i}i}t�}t	�jj
�}y�d}�jjj
|�jj�jjgd�}|jj��jj|�tjj�r>�jj��jjj�}xH|D]@}	|	j�|kr�|j|	j��|j|	j�i�j|	j�g�j|	�q�WWn�tjjk
�r�g}
�j�jjd�}
t |
�dk�r�tjjtd	����jj!ddd
��jj"ddd�y�jj#|
�jj$j%d
�Wn0t&k
�r�t'j(td�j)dj*|
���YnXYnX�jj+j,t-j.d�j/�}dd�|j0|j0|d�d�j/�D�}|j1�x�|D]~}
|
j2|
j3f}||k�rx|
||k�r�||j|
�n
|
g||<�j4|
�}||k�r�||j�j5|
��n�j5|
�g||<�q@Wg}t�}�jj�r�xh|j6�D]\\}}|||f}||d�}x6|D].}�j4|�}x||D]}|j|��q W�qW�q�Wxb|j7�D]V}t8|j6��}||d�}x4|D],}x$||D]}|jt|j����q|W�qnW�qJW�jj�r|xh|j6�D]\\}}|||f}|d|�}x6|D].}�j4|�}x||D]}|j|��q�W�q�W�q�Wxb|j7�D]V}t8|j6��}|d|�}x4|D],}x$||D]}|jt|j����qTW�qFW�q"W�jj�r�xh|j6�D]\\}}|||f}|d|�}x6|D].}�j4|�}x||D]}|j|��q�W�q�W�q�Wt�}xb|j7�D]V}t8|j6��}||d�}x4|D],}x$||D]}|jt|j����q2W�q$W�qWxx|j7�D]l}t8|j6��}|d|�}xJ|D]B}x:||D].}x&|j�D]} | |k�r�|j9| ��q�W�q�W�q�W�qdW�fdd�|j0|j0|d�d�j/�D�}!||!}|j1��jj:�r$t;dj*|��nx|D]}
t;|
��q*WdS)Nz%Pass either --old or --new, not both!z)Pass either --oldonly or --new, not both!z)Pass either --old or --oldonly, not both!TZrepomanage_repo)Zbaseurlz.rpmrzNo files to process)�sack�reposF)Zload_system_repoZload_available_repos)�progresszCould not open {}z, )�flagscSsg|]}|�qSrr)�.0�xrrr�
<listcomp>osz)RepoManageCommand.run.<locals>.<listcomp>)Znevra_strict)Zpkg__neqcsg|]}�j|��qSr)�_package_to_path)r$r%)rrrr&�s)Zpkg__eq� )<r�new�old�dnf�
exceptions�ErrorrZoldonly�set�intZkeeprr!Zadd_new_repoZconf�pathZ_repoZexpireZ_add_repo_to_sackZWITH_MODULESZ_setup_modular_excludesZ_moduleContainerZgetModulePackagesZ	getRepoID�updateZgetArtifacts�
setdefaultZ
getNameStreamZ
getVersionNum�appendZ	RepoError�_get_file_list�len�resetZ	fill_sackZadd_remote_rpms�outputr"�IOErrorrZwarning�format�joinr �query�hawkeyZIGNORE_MODULAR_EXCLUDESZ	available�filter�sortr�arch�_package_to_nevrar'�keys�values�sorted�addZspace�print)"rZverfileZpkgdictZmodule_dictZall_modular_artifactsZkeepnumZREPOMANAGE_REPOIDZ	repo_confZmodule_packagesZmodule_packageZrpm_listr;Zpackages�pkgZnaZnevraZoutputpackagesZkeepnum_latest_stream_artifacts�n�aZevrlistZnewevrs�packageZfpkgZstreams_by_versionZsorted_stream_versionsZnew_sorted_stream_versions�i�streamZoldevrsZold_sorted_stream_versionsZkeepnum_newer_stream_artifactsZartifactZmodular_packagesr)rr�run9s�



&"








$



$



$

"&

zRepoManageCommand.runc	Cs�|jdddtd�d�|jdddtd�d�|jd	d
dtd�d�|jdd
dtd�d�|jddddtd�dtd�|jddtd�d�dS)Nz-oz--old�
store_truezPrint the older packages)�action�helpz-Oz	--oldonlyz6Print the older packages. Exclude the newest packages.z-nz--newzPrint the newest packagesz-sz--spacez#Space separated output, not newlinez-kz--keepZstoreZKEEPz)Newest N packages to keep - defaults to 1�)rN�metavarrO�default�typer0zPath to directory)�add_argumentrr/)�parserrrr�
set_argparser�s




zRepoManageCommand.set_argparsercCs`g}xVtj|�D]H\}}}x<|D]4}tjj|�dj�t|�kr |jtjj||��q WqW|S)zJReturn all files in path matching ext

        return list object
        rP)�os�walkr0�splitext�lower�strr3r:)r0ZextZfilelist�root�dirs�files�frrrr4�s
z RepoManageCommand._get_file_listcCs*t|jj�r tjj|jj|j�S|jSdS)N)r5rr!rWr0r:r�location)rrFrrrr'�sz"RepoManageCommand._package_to_pathcCs|j|j|j|j|jfS)N)rZepoch�version�releaser?)rFrrrr@sz#RepoManageCommand._package_to_nevraN)r)rrr�aliasesrZsummaryrrrL�staticmethodrVr4r'r@rrrrr
+s$r
)Z
__future__rrZdnfpluginscorerrr+Zdnf.clirrWr<ZPluginrr
ZCommandr
rrrr�<module>s

Filemanager

Name Type Size Permission Actions
builddep.cpython-36.opt-1.pyc File 7.27 KB 0644
builddep.cpython-36.pyc File 7.27 KB 0644
changelog.cpython-36.opt-1.pyc File 4.08 KB 0644
changelog.cpython-36.pyc File 4.08 KB 0644
config_manager.cpython-36.opt-1.pyc File 7.09 KB 0644
config_manager.cpython-36.pyc File 7.09 KB 0644
copr.cpython-36.opt-1.pyc File 20.2 KB 0644
copr.cpython-36.pyc File 20.2 KB 0644
debug.cpython-36.opt-1.pyc File 10.56 KB 0644
debug.cpython-36.pyc File 10.56 KB 0644
debuginfo-install.cpython-36.opt-1.pyc File 5.93 KB 0644
debuginfo-install.cpython-36.pyc File 5.93 KB 0644
download.cpython-36.opt-1.pyc File 9.29 KB 0644
download.cpython-36.pyc File 9.29 KB 0644
generate_completion_cache.cpython-36.opt-1.pyc File 3 KB 0644
generate_completion_cache.cpython-36.pyc File 3 KB 0644
groups_manager.cpython-36.opt-1.pyc File 8.45 KB 0644
groups_manager.cpython-36.pyc File 8.45 KB 0644
needs_restarting.cpython-36.opt-1.pyc File 9.88 KB 0644
needs_restarting.cpython-36.pyc File 9.88 KB 0644
repoclosure.cpython-36.opt-1.pyc File 4.31 KB 0644
repoclosure.cpython-36.pyc File 4.31 KB 0644
repodiff.cpython-36.opt-1.pyc File 7.55 KB 0644
repodiff.cpython-36.pyc File 7.55 KB 0644
repograph.cpython-36.opt-1.pyc File 2.72 KB 0644
repograph.cpython-36.pyc File 2.72 KB 0644
repomanage.cpython-36.opt-1.pyc File 6.37 KB 0644
repomanage.cpython-36.pyc File 6.37 KB 0644
reposync.cpython-36.opt-1.pyc File 10.19 KB 0644
reposync.cpython-36.pyc File 10.19 KB 0644
spacewalk.cpython-36.opt-1.pyc File 9.79 KB 0644
spacewalk.cpython-36.pyc File 9.79 KB 0644
system_upgrade.cpython-36.opt-1.pyc File 22.48 KB 0644
system_upgrade.cpython-36.pyc File 22.48 KB 0644
universal_hooks.cpython-36.opt-1.pyc File 5.86 KB 0644
universal_hooks.cpython-36.pyc File 5.86 KB 0644