Anons79 Mini Shell

Directory : /usr/lib/python2.7/site-packages/dnf/cli/commands/
Upload File :
Current File : //usr/lib/python2.7/site-packages/dnf/cli/commands/clean.pyc

�
�[/\c@@sVddlmZddlmZddlmZddlmZmZddlm	Z	ddlZ
ddlZ
ddlZ
ddl
Z
ddlZ
ddlZddlZddlZddlZejd�Zidd	d
gd6dgd6d	gd	6d
gd
6ddd	gd6Zd
�Zd�Zd�Zd�Zdejfd��YZdS(i(tabsolute_import(tunicode_literals(tcommands(t_tP_(tmiscNudnfumetadataudbcacheuexpire-cacheupackagesuallcc@ssxltj|�D][\}}}tjj||�}x4|D],}tjj||�}tjj|�Vq;WqWdS(u:Traverse dirpath recursively and yield relative filenames.N(tostwalktpathtrelpathtjointnormpath(tdirpathtroottdirstfilestbasetfR((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/clean.pyt_tree1s

c@s�fd�|D�S(u5Yield those filenames that match any of the patterns.c3@s4|]*}�D]}tj||�r
|Vq
qdS(N(tretmatch(t.0Rtp(tpatterns(s:/usr/lib/python2.7/site-packages/dnf/cli/commands/clean.pys	<genexpr><s((RR((Rs:/usr/lib/python2.7/site-packages/dnf/cli/commands/clean.pyt_filter:scC@sfd}xY|D]Q}tjj||�}tjtjjtd�|�t	j
|�|d7}q
W|S(u(Remove the given filenames from dirpath.iuRemoving file %si(RRR
tloggertlogtdnftloggingtDDEBUGRRtunlink_f(RRtcountRR((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/clean.pyt_clean?s

c@s:tjjd��fd�|D�}td�|D��S(u:Return the repo IDs that have some cached metadata around.umetadatac3@s!|]}tj�|�VqdS(N(RR(RR(tmetapat(s:/usr/lib/python2.7/site-packages/dnf/cli/commands/clean.pys	<genexpr>Mscs@s$|]}|r|jd�VqdS(urepoidN(tgroup(Rtm((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/clean.pys	<genexpr>Ns(RtrepotCACHE_FILEStset(Rtmatches((R!s:/usr/lib/python2.7/site-packages/dnf/cli/commands/clean.pyt
_cached_reposJstCleanCommandcB@s8eZdZdZed�Zed��Zd�ZRS(uSA class containing methods needed by the cli to execute the
    clean command.
    ucleanuremove cached datac	C@s/|jddddtj�dtd��dS(Nutypetnargsu+tchoicesthelpuMetadata type to clean(tadd_argumentt_CACHE_TYPEStkeysR(tparser((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/clean.pyt
set_argparserYsc
C@s�|jjj}tjj|t�}tjj|t�}tjj|jjj	t�}x�tr�y|or|or|�t
d�|jjD��}t
t|��}tjtddj|���d|krt|�}|jjjj|�|jd�tjtd��ng|D]}tjj|^q}	t|t||	��}
tjtdd|
�|
�dSWdQXWqZtjjk
r�}|jjj s�td|j!�}tj|�t"j#d	�q�|�qZXqZWdS(
Ncs@s&|]}t|D]}|VqqdS(N(R.(Rtctt((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/clean.pys	<genexpr>gsuCleaning data: u uexpire-cacheuCache was expiredu%d file removedu%d files removedu*Waiting for process with pid %d to finish.i($RtconftcachedirRtlocktbuild_metadata_locktTruetbuild_download_locktbuild_rpmdb_lockt
persistdirR&toptsttypetlistRRtdebugRR
R(t_repo_persistortexpired_to_addtupdatetremovetinfoR$R%R RRt
exceptionst	LockErrortexit_on_locktpidttimetsleep(
tselfR5tmd_lockt
download_lockt
rpmdb_lockttypesRtexpiredR3RRtetmsg((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/clean.pytrun_s2	 
#
(uclean(	t__name__t
__module__t__doc__taliasesRtsummarytstaticmethodR1RS(((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/clean.pyR)Qs
(t
__future__RRtdnf.cliRtdnf.i18nRRtdnf.yumRRtdnf.exceptionstdnf.locktdnf.loggingtdnf.repoRRRRIt	getLoggerRR.RRR R(tCommandR)(((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/clean.pyt<module>s2


					

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