Anons79 Mini Shell

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

�
^~d\c@@s�ddlmZddlmZddlZddlZddlmZmZddlm	Z	ddl
Z
ddlZ
d�Zde
j
jfd��YZe
jjd	e
jjfd
��Y�ZdS(i(tabsolute_import(tunicode_literalsN(t_tlogger(tOptionParsercC@s:tjjtj��}tjjtjj|||��S(N(tdnfti18ntucdtostgetcwdtpathtrealpathtjoin(tintermediatettargettcwd((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pyt_pkgdir!stRPMPayloadLocationcB@seZd�Zd�ZRS(cC@s2tt|�j||�tjj|�|_dS(N(tsuperRt__init__RR
tdirnametpackage_dir(tselftpkgtprogresstpkg_location((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pyR'scC@s9tt|�j�}tjj|j�|j|d<|S(Nudest(RRt_target_paramsRtutilt
ensure_dirR(Rttp((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pyR+s
(t__name__t
__module__RR(((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pyR&s	tRepoSyncCommandcB@s�eZdZed�Zd�Zed��Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�ZRS(ureposyncu&download all packages from remote repocC@stt|�j|�dS(N(RR R(Rtcli((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pyR7scC@s5|jdddddgdtjddd	td
��|jddtddd	td
��|jdddtddd	td��|jddtddd	td��|jdddtddd	td��|jddddd	td��|jdd	td��|jddtddd	td��dS(Nu-au--archtdestuarchestdefaulttactiontmetavaru[arch]thelpu$download only packages for this ARCHu--deleteu
store_trueu5delete local packages no longer present in repositoryu-mu--downloadcompsualso download comps.xmlu--download-metadataudownload all the metadata.u-nu
--newest-onlyu&download only newest packages per-repou-pu--download-pathu./u&where to store downloaded repositoriesu--metadata-pathuXwhere to store downloaded repository metadata. Defaults to the value of --download-path.u--sourceuoperate on source packages(tadd_argumentRt_SplitCallbackRtFalse(tparser((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pyt
set_argparser:s"






cC@s�|jj}t|_t|_|jj}|jjr�|j	�j
�xY|jjD]H}y||}Wn'tk
r�tjj
d|��nX|j�qSWn|jjr�|j�nx*|j�D]}|jj�t|_q�WdS(NuUnknown repo: '%s'.(R!tdemandstTruetavailable_repostsack_activationtbasetrepostoptstrepotalltdisabletKeyErrorRtCliErrortenabletsourcetenable_source_repostiter_enabledt_repotexpireR)tdeltarpm(RR,R1trepoidR3((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pyt	configureOs"		


cC@sut|jj_x_|jjj�D]K}|jjrD|j|�n|jjr`|j	|�n|j
|�q"WdS(N(R-R0tconft	keepcacheR1R;R2tdownload_metadatat
downloadcompstgetcompstdownload_packages(RR3((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pytrunfscC@s"t|jjp|jj|j�S(N(RR2tdestdirt
download_pathtid(RR3((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pytrepo_targetoscC@s3|jjr"t|jj|j�S|j|�SdS(N(R2t
metadata_pathRRJRK(RR3((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pytmetadata_targetrscC@s|j|j�}tjjtjj||j��}|jtjj|d��s{tj	j
td�j||���n|S(Nuu6Download target '{}' is outside of download path '{}'.(
RKR3RR
RRtlocationt
startswithRt
exceptionstErrorRtformat(RRRKtpkg_download_path((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pyRSxs		cC@s@t�}x3|D]+}d||jjtjj|j�f<qWx�|jjj	�D]�}|j
|�}tjj|�rRx�tj|�D]�}tjj
||�}|jd�r�tjj|�r�|j|f|kr1y'tj|�tjtd�|�Wq.tk
r*tjtd�|�q.Xq1q�q�WqRqRWdS(Niu.rpmu[DELETED] %sufailed to delete file %s(tdictR3RJRR
tbasenameRNR0R1R;RKtexiststlistdirRtendswithtisfiletunlinkRtinfoRtOSErrorterror(Rtpackages_to_downloadtdownload_mapRR3RKtfilenameR
((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pytdelete_old_local_packages�s	
)!

cC@sl|jj�}|rhtjj|j|�d�}tjjj	|d|�t
jtd�|j
�ndS(Nu	comps.xmlR"u!comps.xml for repository %s saved(R<t
getCompsFnRR
RRMRtyumtmisct
decompressRR[RRJ(RR3tcomps_fnR"((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pyRE�s
cC@s#|j|�}|jj|�tS(N(RMR<tdownloadMetadataR-(RR3RK((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pyRC�scC@s�|jjj�j�jd|j�}|jjrB|j�}n|jj	ra|jdd�n%|jj
r�|jd|jj
�n|S(Ntreponametarchusrc(R0tsacktqueryt	availabletfiltermRJR2tnewest_onlytlatestR9tarches(RR3Rk((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pytget_pkglist�s'cC@sg|j}|j|�}|j|�\}}|r�|jj}|dkr]tjj�}ntj	j
|jj�j
�|d�}g|D]!}t|||j|��^q�}	|j|	||d�n|rGxs|D]h}tjj|jj|jjd��}
tjj|j|��}tjj|�tj|
|�q�Wn|jjrc|j|�ndS(Niu/( R0Rqt_select_remote_pkgstoutputRtNoneRtcallbacktNullDownloadProgresstdrpmt	DeltaInfoRjRkt	installedRRSt_download_remote_payloadsRR
RR3tpkgdirRNtlstripRRRtshutiltcopyR2tdeleteRa(RR3R0tpkglisttremote_pkgstlocal_repository_pkgsRRwRtpayloadstpkg_patht
target_dir((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pyRF�s&	'+
'(ureposync(RRtaliasesRtsummaryRtstaticmethodR+R@RGRKRMRSRaRERCRqRF(((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pyR 2s							
				
(t
__future__RRRR}tdnfpluginscoreRRtdnf.cli.option_parserRRtdnf.cliRR3t
RPMPayloadRtplugintregister_commandR!tCommandR (((s8/usr/lib/python2.7/site-packages/dnf-plugins/reposync.pyt<module>s	

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