Anons79 Mini Shell

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

�
	i/\c@@s�ddlmZddlmZddlmZmZddlZddlZddlZddl	Z	dej
fd��YZdejj
fd��YZdS(	i(tabsolute_import(tunicode_literals(t_tloggerNt
RepoManagecB@seZdZd�ZRS(u
repomanagecC@s:tt|�j||�|dkr)dS|jt�dS(N(tsuperRt__init__tNonetregister_commandtRepoManageCommand(tselftbasetcli((s:/usr/lib/python2.7/site-packages/dnf-plugins/repomanage.pyR#s(t__name__t
__module__tnameR(((s:/usr/lib/python2.7/site-packages/dnf-plugins/repomanage.pyRsR	cB@sqeZd	Zed�Zd�Zd�Zd�Zed��Z	ed��Z
ed��Zed��ZRS(
u
repomanageu"Manage a directory of rpm packagescC@s@|jjr<|jjr<|jjdtjdtj�ndS(Ntstdouttstderr(toptstverbosetquietRtredirect_loggertloggingtWARNINGtINFO(R
((s:/usr/lib/python2.7/site-packages/dnf-plugins/repomanage.pyt
pre_configure.scC@sC|jjr*|jjr*|jj�n|jj}t|_dS(N(RRRRtredirect_repo_progresstdemandstTruetsack_activation(R
R((s:/usr/lib/python2.7/site-packages/dnf-plugins/repomanage.pyt	configure2scC@se|jjr3|jjr3tjjtd���ng}|j|jjd�}i}i}t	|jj
�d}t|�dkr�tjjtd���ny#|jj
|d|jjj�Wn6tk
r�tjtd�jdj|���nXg|jjj�j�D]}|^q}|j�x�|D]�}|j|jf}||krp||j|�n
|g||<|j|�}	|	|kr�||	j|j|��q8|j|�g||	<q8Wg}
|jjs~x�|j�D]�\}}|||f}
t|
�t|�kr+|
}n
|
|}x?|D]7}|j|�}	x||	D]}|
j|�q\Wq<Wq�Wn|jjr$x�|j�D]�\}}|||f}
t|
�t|�kr�q�n|
| }x?|D]7}|j|�}	x||	D]}|
j|�qWq�Wq�Wn|
j�|jj rKd	j|
�GHnx|
D]}|GHqRWdS(
Nu%Pass either --old or --new, not both!u.rpmi����iuNo files to processtprogressuCould not open {}u, u (!Rtnewtoldtdnft
exceptionstErrorRt_get_file_listtpathtinttkeeptlenRtadd_remote_rpmstoutputRtIOErrorRtwarningtformattjointsacktqueryt	availabletsortRtarchtappendt_package_to_nevrat_package_to_pathtkeystabstspace(R
trpm_listtverfiletpkgdicttkeepnumtxtpackagestpkgtnatnevratoutputpackagestntatevrlisttnewevrstpackagetfpkgtoldevrs((s:/usr/lib/python2.7/site-packages/dnf-plugins/repomanage.pytrun8sd#
)+


	





c
C@s�|jdddddtd��|jdddddtd	��|jd
ddddtd��|jd
ddddddtd�dddt�|jddddtd��dS(Nu-ou--oldtactionu
store_truethelpuPrint the older packagesu-nu--newuPrint the newest packagesu-su--spaceu#Space separated output, not newlineu-ku--keepustoretmetavaruKEEPu)Newest N packages to keep - defaults to 1tdefaultittypeupathuPath to directory(tadd_argumentRR'(tparser((s:/usr/lib/python2.7/site-packages/dnf-plugins/repomanage.pyt
set_argparsers



cC@s�g}xxtj|�D]g\}}}xU|D]M}tjj|�dj�t|�kr,|jtjj||��q,q,WqW|S(uJReturn all files in path matching ext

        return list object
        i(tostwalkR&tsplitexttlowertstrR5R/(R&texttfilelisttroottdirstfilestf((s:/usr/lib/python2.7/site-packages/dnf-plugins/repomanage.pyR%�s
('cC@s|jS(N(tlocation(RA((s:/usr/lib/python2.7/site-packages/dnf-plugins/repomanage.pyR7�scC@s"|j|j|j|j|jfS(N(RtepochtversiontreleaseR4(RA((s:/usr/lib/python2.7/site-packages/dnf-plugins/repomanage.pyR6�s(u
repomanage(
R
RtaliasesRtsummaryRRRLtstaticmethodRTR%R7R6(((s:/usr/lib/python2.7/site-packages/dnf-plugins/repomanage.pyR	*s			G(t
__future__RRtdnfpluginscoreRRR"tdnf.cliRRUtPluginRRtCommandR	(((s:/usr/lib/python2.7/site-packages/dnf-plugins/repomanage.pyt<module>s

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