Anons79 Mini Shell

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

�
7�m`c@@shdZddlmZddlmZddlmZyddlmZWn!ek
rmddlmZnXddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlmZdd	lmZdd
lmZmZddlZddlZddlZddlZddlZddl Zddl!Zddl"Zddl#Zddl$Zddl%Zddl&Zddl'Zddl(Zddl)Zddl*Zddl+Zddl,Zddl-Zddl.Zddl/Zddl0Zddl1Zddl2Zddl3Zddl4Zddl5Zddl6Zddl7Zddl8Zddl9Zddl:Zddl;Zddl<Zddl=Zddl>Zddl?Zddl@ZddlAZddlBZddlCZe
jDd�ZEdd
�ZFd�ZGd�ZHdejIfd��YZJdeKfd��YZLdS(u/
Command line interface yum class and related.
i(tprint_function(tabsolute_import(tunicode_literals(tSequenceNi(toutput(tCliError(tucdt_udnfucC@s�t|j�dt|j�t|�}t|j�}t|j�}xWd|fd|fd|ffD]4\}}||j|d�|||cd7<qjWdS(ul Get the length of each pkg's column. Add that to data.
        This "knows" about simpleList and printVer. iunauveruridiN(tlentnametarchtevrt
_from_repot
setdefault(tdatatpkgtindenttnatvertridtdtv((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt_add_pkg_simple_list_lens\s*.cC@siid6id6id6}xP|j|j|j|j|j|jfD]$}x|D]}t||�qSWqFWt|j�dkr�x:|j	D],\}}t||�t||dd�q�Wn|d|d|dg}|j
|dd	�}|d|d	|d
fS(uA Work out the dynamic size of the columns to pass to fmtColumns. unauveruridiRu itremainder_columniiu    (t	installedt	availabletextrast
autoremovetupdatestrecentRRt	obsoletestobsoletesTuplestcalcColumns(RtyplRtlstRtnpkgtopkgtcolumns((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt_list_cmd_calc_columnsgs

c	C@s'd�}tjj|�}t}x�|j�j�jd|�D]�}|rYtd�nt}|j	dkr�d|j
|j|jf}n"d|j	|j
|j|jf}|j
j|j�}ttd�||||j�f�ttd�|jr|jnd||j�f�q@WdS(	NcS@stjdtj|��S(Nu%c(ttimetstrftimetgmtime(tx((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt
sm_ui_timeysR	uu0u%s-%s.%su%s:%s-%s.%su  Installed: %s-%s at %su  Built    : %s at %s(tdnftsackt_rpmdb_sacktFalsetqueryRtfiltermtprinttTruetepochtversiontreleaseR
ttermtboldR	Rtinstalltimetpackagert	buildtime(	tpkgstbaseRR+t
rpmdb_sacktdoneRRR	((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pytprint_versionsxs 	%
	!tBaseClicB@s�eZdZdd�Zdd�Zd�Zd�Zd�Zd�Z	dde
ed�Zd�Z
gged	�Zd
ddd�Zd
dedd�Zd
�Zd�Zd�Zd�Zd�Zd�ZRS(u#This is the base class for yum cli.cC@sJ|ptjj�}tt|�jd|�tj||j�|_dS(Ntconf(R,RBtConftsuperRAt__init__RtOutput(tselfRB((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyRE�sc
C@s�|jjrAtjtd�djtt|jj����n|jjr�tjtd�djtt|jj����nx�|j	j
�D]�}|jr�tjtd�|jddjtt|j����n|jr�tjtd�|jddjtt|j����q�q�W|j}|j
j|�}|rYtj|�n|r
g}g}t}xd|D]\}|jtjjkr�|j|j�qx|jtjjkrxt}|j|j�qxqxW|`|s�|j
j|�q
|j
j||�n|sC|jj�sC|jr�|jjsC|jjr�|jj retjtd��n(d|jj!kr�tjtd	��n|j"�r�|jj#s�|j
j$�r�t%td
���q�q�ntjtd��dS|r�|r�tjtd
��y)|j
j&}	|j'||j
j(|	�Wq�tj)j*k
r�}
tj+j,j-t.|
��}td�d|}t/�tj)j0|��q�Xn|j1|�n|jj r�dSt2|t3�s�|g}nt
j4�gt5|�}t6t7|�j8|�}
|
dk	rH|j:j;|
g�d}tj<jj=|j:|j>�}nd}|r�|j
j?|�}tj|�xA|D]6}|j@tAjjBkrztj)j0td���qzqzWn|
S(u�Take care of package downloading, checking, user
        confirmation and actually running the transaction.

        :param display: `rpm.callback.TransactionProgress` object(s)
        :return: history database transaction ID or None
        uExcludes in dnf.conf: u, uIncludes in dnf.conf: uExcludes in repo u: uIncludes in repo u4DNF will only download packages for the transaction.utestuMDNF will only download packages, install gpg keys, and check the transaction.uOperation aborted.uNothing to do.NuDownloading Packages:uError downloading packages:u
%siuTransaction failed(CRBtexcludepkgstloggertdebugRtjointsortedtsettincludepkgstrepostiter_enabledtidttransactionRtlist_transactiontinfoR3tactionR,tFORWARD_ACTIONStappendRtBACKWARD_ACTIONSR/t_tstreportRemoveSizetreportDownloadSizet_moduleContainert	isChangedt_historytgrouptenvtdownloadonlyttsflagst
_promptWantedtassumenotuserconfirmRtdownload_callback_total_cbtdownload_packagestprogresst
exceptionst
DownloadErrortclitformattindent_blockRR2tErrortgpgsigcheckt
isinstanceRtCliTransactionDisplaytlistRDRAtdo_transactiontNonethistorytoldtdbtRPMTransactiont_transtpost_transaction_outputtstatetlibdnftTransactionItemState_ERROR(RGtdisplaytrepottranstpkg_strtinstall_pkgstrmpkgstinstall_onlyttsittotal_cbtetspecificterrstrttidtmsg((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyRs�s�	&&	#	'	
!!

"c
	@sDg}x�|D]�}�j|�\}}|dkr:q
q
|dkr��jjo\�jj}tjsytjj�r�|r�tjj	t
d���n�fd�}y�j||�Wq�tjj	k
r�}|jt
|��q�Xq
|j|�q
W|r@x|D]}	tj|	�qWtjj	t
d���ndS(uPerform GPG signature verification on the given packages,
        installing keys if possible.

        :param pkgs: a list of package objects to verify the GPG
           signatures of
        :raises: Will raise :class:`Error` if there's a problem
        iiuTRefusing to automatically import keys when running unattended.
Use "-y" to override.c@s
�jj�S(N(RRe(R*tytz(RG(s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt<lambda>suGPG check FAILEDN(t_sig_check_pkgRBt	assumeyesRdtsyststdintisattyR,RiRnRt_get_key_for_packageRWtstrRItcritical(
RGR<terror_messagestpotresultterrmsgtaytfnR�R�((RGs//usr/lib/python2.7/site-packages/dnf/cli/cli.pyRos&
!
cC@s�d}xP|jjjd|j�D]3}|tj}|r"tjj	|d�}Pq"q"Wg|j
D](}|dks�|d|krc|^qc}|S(uBReturn list of changelogs for package newer then installed versionunameiu	timestampN(Rtt_rpmconntreadonly_tstdbMatchR	trpmtRPMTAG_CHANGELOGTIMEtdatetimetdatet
fromtimestampt
changelogs(RGtpackagetnewesttmitchangelogtimestchlogtchlogs((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pytlatest_changelogs)s"
(cC@sDd|djd�tjj|d�tjj|d�f}|S(u)Return changelog formated as in spec fileu* %s %s
%s
u	timestampu%a %b %d %X %Yuauthorutext(R(R,ti18nR(RGt	changelogt	chlog_str((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pytformat_changelog7s
cC@s�t�}x3|D]+}|j|jp+|jg�j|�qWx�t|j��D]|}||}ttd�j	dj
g|D]}t|�^q~���x.|j|d�D]}t|j
|��q�WqRWdS(NuChangelogs for {}u, i(tdictR
tsource_nameR	RWRLtkeysR2RRlRKR�R�R�(RGtpackagestbysrpmtpR�tbin_packagesRtchl((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pytprint_changelogs?s	
)
;cC@s�|jd|d|�}|jjs0|jjrc|jd|d|�}|j|_|j|_n|r�t|j|�}t|j�dkri}|jj	j
d}	|	rx]t|j�D]I}
|
j�}t
jj|�r�|
j�r�|
||
j|
jf<q�q�Wn|jj}|jj}
|jj|jdddd	|d
|di|d6|
d
6�|r|j|j�qnt|j�dkr�ttd��xBt|jdtjd��D]}|jj|dd
|�q�Wq�n|jp�|jS(u?Check updates matching given *patterns* in selected repository.uupgradestreponameu	obsoletesiuboldut
outputTypeulistthighlight_naR%thighlight_modesu=unot inuObsoleting Packagestkey(treturnPkgListsRBRtverboseRR&RRRR7tMODERLtlocalPkgtostpathtexiststverifyLocalPkgR	R
tcolor_update_localtcolor_update_remotetlistPkgsR�R2Rtoperatort
itemgettertupdatesObsoletesList(RGtpatternsR�tprint_R�R!ttyplR%t
local_pkgst	highlightR�tlocaltcultcurtobtup((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt
check_updatesKs: cC@s�|jj�}t|�dkr.|j�nx|D]}|j|�q5W|jj�|}|dkr�|jj�r�td�}tjj|��ndS(ub Upgrade or downgrade packages to match the latest versions available
            in the enabled repositories.

            :return: (exit_code, [ errors ])

            exit_code is::
                0 = we're done, exit
                1 = we've errored, exit with error string
                2 = we've got work yet to do, onto the next stage
        iu4No packages marked for distribution synchronization.N(	t_goalt
req_lengthRtdistro_synctreq_has_distupgrade_allRR,RiRn(RGtuserlisttoldcounttpkg_spectcntR�((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pytdistro_sync_userlistqs

cC@s�|jj�}xl|D]d}y|j|d|�wWqtjjk
ry}tjtd�|j	j
j|j��qXqWx�|D]�}y|j
|d|�Wq�tjjk
r�}td�}	tj|	|j	j
j|��q�tjjk
r(}tjtd�|j	j
j|j��q�tjjk
r>q�Xq�W|jj�|}
|
dkr}tjjtd���ndS(uaAttempt to take the user specified list of packages or
        wildcards and downgrade them. If a complete version number is
        specified, attempt to downgrade them to the specified version

        :param specs: a list of names or wildcards specifying packages to downgrade
        :param file_pkgs: a list of pkg objects from local files
        tstrictuNo match for argument: %suNo package %s available.u6Packages for argument %s available, but not installed.iu!No packages marked for downgrade.N(R�R�tpackage_downgradeR,RitMarkingErrorRIRTRRR7R8tlocationtdowngrade_totPackageNotFoundErrortPackagesNotInstalledErrorR�Rn(RGtspecst	file_pkgsR�R�RR�targterrR�R�((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt
downgradePkgs�s,	
!
"uallc!C@s�y5|jjjd}|j||d|d|�}Wn)tjjk
r`}dt|�gfSXi}i}	i}
d}|dkr�t	|j|�}n|r	|j
r	x]|j|j|j
D]A}|j|jf}
|
|ks�|||
kr�|||
<q�q�Wn|rj|jrjxO|jD]A}|j|jf}
|
|	ksV||	|
kr"||	|
<q"q"Wn|r�|jr�xEt|j�D]1}|jtjkr�||
|j|jf<q�q�Wn|jj}|jj}|jj}|jj}|jj|j
td�|d|d|d	i|d
6|d6|d6|d
6�}|jj}|jj}|jj }|jj!}|jj|jtd�|d|	d|d	i|d6|d
6|d6|d
6�}|jj|j"td�|d|�}|jj|j#td�|d|�}|jj$}|jj%}|jj|jtd�|d|
d|d	i|d6|d
6�}t&|j'�dkr�|dkr�ddg}t(td��xit|j)dt*j+d��D]}|jj,|dd|�q�Wn'|jj|j'td�|d|�}|jj|j-td�|d|�} t&|�r�| dr�|dr�|dr�|dr�|dr�|dr�|dr�tjjtd���ndS(uJOutput selection *pkgnarrow* of packages matching *patterns* and *repoid*.uboldtinstalled_availableR�iulistuInstalled PackagesR�R%R�u>u<u=unot inuAvailable PackagesuAutoremove PackagesuExtra PackagesuAvailable UpgradesiuuObsoleting PackagesR�u	obsoletesuRecently Added PackagesuNo matching Packages to listN(.RR7R�R�R,RiRnR�RtR&Rthidden_availabletreinstall_availablet
old_availableR	R
Rthidden_installedRRLR�thawkeytSYSTEM_REPO_NAMERBtcolor_list_installed_oldertcolor_list_installed_newertcolor_list_installed_reinstalltcolor_list_installed_extraR�Rtcolor_list_available_upgradetcolor_list_available_downgradetcolor_list_available_reinstalltcolor_list_available_installRRR�R�RRR2RR�R�R�R(!RGtbasecmdt	pkgnarrowR�R�R�R!R�tupdate_pkgst	inst_pkgsR�R%RR�R�tcliotclintclirtclietriptclautcladtclartclaitraptraeptrepR�R�truptropR�trrap((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pytoutput_packages�s�
 	!2c	C@s�t}t}|r-|dkr-t}d}n!|rN|dkrNt}d}n|j||dtd|�}|jjr�|j|j7_n|r�|j|_|j|_	n|r�g|_n|r�g|_n|S(u#Return a :class:`dnf.yum.misc.GenericHolder` object containing
        lists of package objects that match the given names or wildcards.

        :param pkgnarrow: a string specifying which types of packages
           lists to produce, such as updates, installed, available, etc.
        :param patterns: a list of names or wildcards specifying
           packages to list
        :param installed_available: whether the available package list
           is present as .hidden_available when doing all, available,
           or installed
        :param reponame: limit packages list to the given repository

        :return: a :class:`dnf.yum.misc.GenericHolder` instance with the
           following lists defined::

             available = list of packageObjects
             installed = list of packageObjects
             upgrades = tuples of packageObjects (updating, installed)
             extras = list of packageObjects
             obsoletes = tuples of packageObjects (obsoleting, installed)
             recent = list of packageObjects
        u	installeduallu	availabletignore_caseR�(
R/R3t_do_package_listsRBtshowdupesfromreposRR�R�RR�(RGR�R�R�R�tdone_hidden_availabletdone_hidden_installedR!((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyR�s(		c	C@s�|jj}t|j_g}g}xF|D]>}tt|�j|�\}}|j|�|j|�q+Wx$|D]}|jj|||�qtW||j_|s�t	j
jtd���ndS(u�Print out a list of packages that provide the given file or
        feature.  This a cli wrapper to the provides methods in the
        rpmdb and pkgsack.

        :param args: the name of a file or feature to search for
        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        uNo Matches foundN(
RBRR3RDRAtprovidestextendRtmatchcallback_verboseR,RiRnR(	RGtargstold_sduptmatchestused_search_stringstspecR0tused_search_stringR((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyR6s


cC@s!|jjr|jjrtStS(N(RBR�RdR/R3(RG((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyRcUscC@sP|stjtd��dS|jj|�}|sLtjtd��dS|S(NuNo transaction ID givenuNot found given transaction ID(RIR�RRtRuRv(RGtextcmdsRv((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt_history_get_transactions[scC@sO|j|�}|dkrdSt|�dkrGtjtd��n|dS(Niu#Found more than one transaction ID!i(RRtRRIR�R(RGRRv((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pythistory_get_transactionfscC@s�|j|f�}|dkr+ddgfS|jj�}|dkrSddgfS|j|jkrrddgfSd}x�|jjtt|jd|jd���D]�}|jr�t	j
td�|j�n%|jr�t	j
td�|j�n|dkrt
jjj|�}q�|j|�q�Wt
jj|j�}td|j|f�t|jjd	d
jd�|j�D����|jj|�y*|j||jdtd|jj�Wn�t
jjk
r}�t	j td
�|jj!j"t#|j$���ddgfSt
jj%k
rn}�t	j td�|jj!j"t#|j$���ddgfSt
jj&k
r��nXdd|jfgfSdS(uRollback given transaction.iu'Failed history rollback, no transactionu!Failed history rollback, no last?iu"Rollback to current, nothing to dou-Transaction history is incomplete, before %u.u,Transaction history is incomplete, after %u.u#Rollback to transaction %u, from %su&  Undoing the following transactions: u, cs@s|]}t|�VqdS(N(R�(t.0R*((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pys	<genexpr>�sR�uNo package %s installed.uA transaction cannot be undoneuNo package %s available.iuRollback to transaction %uN('RRtRutlastR�RvRrtrangetaltered_lt_rpmdbRItwarningRtaltered_gt_rpmdbR,RwtMergedTransactionWrappertmergetutiltnormalize_timet
beg_timestampR2Rt
fmtKeyValFillRKttidsthistoryInfoCmdPkgsAlteredt_history_undo_operationsR3RBR�RiR�RTR7R8RR�tPackagesNotAvailableErrorR�(RGtextcmdRvR!tmobjR�ttmR�((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pythistory_rollback_transactionnsL


6		#*

cC@s�|j|f�}|d
kr+ddgfStjj|j�}td�j|jt	|��}t
j|�|jj
|�tjjj|�}y#|j||jd|jj�Wn�tjjk
r	}t
jtd�|jjjt	|j���ddgfStjjk
rY}t
jtd�|jjjt	|j���ddgfStjjk
rr�nXdd	|jfgfSd
S(uUndo given transaction.iuFailed history undouUndoing transaction {}, from {}R�uNo package %s installed.uAn operation cannot be undoneuNo package %s available.iuUndoing transaction %uN(RRtR,R(R)R*RRlR�RRIRTRR-RwRuR&R.RBR�RiR�R7R8R�R/R�(RGR0RvR2R�R1R�((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pythistory_undo_transaction�s*
!
#

N((((t__name__t
__module__t__doc__RtRERsRoR�R�R�R3R/R�R�R�RR�RRcRRR3R4(((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyRA�s&i	'			&	$Z/					8tClicB@s�eZd�Zd�Zd�Zd�Zd�Zdd�Zdd�Z	ddd�Z
ddd	�Zej
d
�Zd�Zd�Zd
�Zd�ZRS(cC@s�||_i|_d|_tjjj�|_|j	tjj
jj�|j	tjj
j
j�|j	tjj
jj�|j	tjj
jj�|j	tjj
jj�|j	tjj
jj�|j	tjj
jj�|j	tjj
jj�|j	tjj
jj�|j	tjj
jj�|j	tjj
jj �|j	tjj
j!j"�|j	tjj
j#j$�|j	tjj
j%j&�|j	tjj
j'j(�|j	tjj
j)j*�|j	tjj
j+j,�|j	tjj
j-j.�|j	tjj
j/j0�|j	tjj
j1j2�|j	tjj
j3j4�|j	tjj
j5j6�|j	tjj
j7�|j	tjj
j8�|j	tjj
j9�|j	tjj
j:�|j	tjj
j;�|j	tjj
j<�|j	tjj
j=�dS(N(>R=tcli_commandsRttcommandR,RktdemandtDemandSheettdemandstregister_commandtcommandstaliastAliasCommandRtAutoremoveCommandtchecktCheckCommandtcleantCleanCommandt
distrosynctDistroSyncCommandtdeplisttDeplistCommandt	downgradetDowngradeCommandR_tGroupCommandtinstalltInstallCommandt	makecachetMakeCacheCommandtmarktMarkCommandtmodulet
ModuleCommandt	reinstalltReinstallCommandtremovet
RemoveCommandtrepolisttRepoListCommandt	repoquerytRepoQueryCommandtsearcht
SearchCommandtshelltShellCommandtswaptSwapCommandt
updateinfotUpdateInfoCommandtupgradetUpgradeCommandtupgrademinimaltUpgradeMinimalCommandtInfoCommandtListCommandtProvidesCommandtCheckUpdateCommandtRepoPkgsCommandtHelpCommandtHistoryCommand(RGR=((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyRE�sB			cC@s�|jj|�|jrwx[|jj�D]G\}}|jjj||jjd|g�|jj|df�q)Wn|j	r�|jj
dd	�|jjg|j	D]}|df^q��nt�}y�x�|jD]�\}}|jjj
|�}|sO|jjjr?|dkr?td�}	tjj|	|��n|j|�n|dkrh|j�q�|j�q�WWn@tjjk
r�}
tj|
�|jj�tjd�nXx$|D]}tjtd�|�q�WxE|jjj�D]1}|jjj |�}|r�|j!j"�q�q�W|jj#j$�\}|j_%|jjj&�j'|�t#j(|j|jj#�}
|jjj&�j)|
�dS(
Ntbaseurluenableiu*udisableuUnknown repo: '%s'iuNo repository match: %s(u*udisable(*R=tread_all_repostrepofrompathtitemsROtadd_new_repoRBtrepos_edRWRtinsertRRMtget_matchingR�RR,Rit	RepoErrortaddtenabletdisabletConfigErrorRIR�t	optparsert
print_helpR�texitR$t_repo_persistortget_expired_repostgett_repotexpireRtsetup_progress_callbackst_ds_callbacktalltset_progress_bartCliKeyImportt_set_key_import(RGtoptstlabelR�trtnotmatchRt	operationRZR�R�Rtbart
key_import((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt_configure_repos�sD	%	/	



cC@s�tjdtjj�tjtjjd|j�tjtjjd|j	j
j�tjtjjd|j	j
j�tjd|j	j
j
�dS(NuDNF version: %suCommand: %suInstallroot: %suReleasever: %sucachedir: %s(RIRJR,tconsttVERSIONtlogtloggingtDDEBUGt	cmdstringR=RBtinstallroott
releasevertcachedir(RG((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt_log_essentialss
cC@sx|j}|jj}|jrKtjj�sKtjjt	d���qKn|j
rwx |j�D]}t|_
qaWn|js�|jjjr�t|jj_x�|j�D]}|jjtjj�q�Wni|jr�x]|j�D]}|jj�q�Wn9|js7x-|j�D]}|jjtjj�qWn|jrt|jjd|jjr^dntd|jj�ndS(Nu/This command has to be run under the root user.tload_system_repouautotload_available_repos(R=R=ROt	root_userR,R(t	am_i_rootRiRnRR�RPR3tload_metadata_othert	cacheonlyRBtvaluesR�tsetSyncStrategyRtSYNC_ONLY_CACHEtfreshest_metadataR�tfresh_metadatat	SYNC_LAZYtsack_activationt	fill_sackR�R/tavailable_repos(RGR=ROR((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt_process_demands!s,						cC@s�|j}|jj|�}|dkr�tjtd�|tjd�|j	j
jrotjtd�|�ntjtd��t�n||�|_tj
tjjd|�tj
tjjd|�dS(u,Check that the requested CLI command exists.u)No such command: %s. Please use %s --helpiuFIt could be a DNF plugin command, try: "dnf install 'dnf-command(%s)'"uOIt could be a DNF plugin command, but loading of plugins is currently disabled.uBase command: %suExtra commands: %sN(R:R9R�RtRIR�RR�targvR=RBtpluginsRR�R,R�R�(RGR�RR�tcommand_cls((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt_parse_commands>s	
	c
C@s7tjjj�}|j|�}|dkr?tjjj�n||_|jj	|�}|j
r�ttjj
�t|jjj|j|jj�tjd�n|jr�d|_d|_n|jr�tjj|_|_ny�|jr4|jjjd�}|j|jjjtjj�t|j _n|jjj!|�|j"|j#�d|krx|j$|jj_$n|jjj%�Wn�tj&j't(fk
r�}t)j*t+d�|�tjd�n[t,k
r'}dt-t.|��t/|j0�f}t)j*t+d�|�tjd�nX|j1dk	r�|j1|jj_1|jjj2r�|j3dkr�t)j*t+d��tjd�q�n|j4s�|j5r�|j3dkr�t)j*t+d
��tjd�n|j6dk	rt7j8t9j:|j6d��n|jj;|j<d�|jj=|j>|j?|�|jj;|j<d�|j3so|jj@�tjd�n||j_AtjjBd|_Cx'|jjAD]}|jCd|7_Cq�W|jD�y|jE||�WntFk
r�tjd�nX|jGr#|jj@|j3�tjd�n|jjH|j3|�}|jIrb|jI|j _Jt|j_Kn|jLr}|jL|j _Ln|jMr�t|jj_Nn|jOr�t|jj_On|j3jP�|jjQ�|jjR�|jS|�|jjT�|jjj!|�|j3jU�|jjj1r]tjVjW|jjj1�|jjj1|jjXjY�_Zn|jjj[dkr�|jjj\j]d|jjj[�nt^j_d�dkr3t`}x8|jjXja�D]$}	|	jbr�q�nt|	_bt}q�W|jjjcst|jj_ct}n|r3t)jdt+d��q3ndS(uParse command line arguments, and set up :attr:`self.base.conf` and
        :attr:`self.cmds`, as well as logger objects in base instance.

        :param args: a list of command line arguments
        :param option_parser: a class for parsing cli options
        iiucachediruarchuConfig error: %siu%s: %sudownloadusystem-upgradeureposyncub--destdir or --downloaddir must be used with --downloadonly or download or system-upgrade command.uconfig-manageru_--enable, --set-enabled and --disable, --set-disabled must be used with config-manager command.i<umainupluginu u%s uautotcoloru%_pkgverify_levelu	signatureuallu�Warning: Enforcing GPG signature check globally as per active RPM security policy (see 'gpgcheck' in dnf.conf(5) for how to squelch this message)N(udownloadusystem-upgradeureposync(u	signatureuall(eR,RktaliasestAliasestresolveRtt
option_parsertOptionParserR~tparse_main_argsR5R2R�R�R@R=RBthistory_record_packagesRR�R�tquiett
debuglevelt
errorlevelR�t
VERBOSE_LEVELR�t_get_optiont_settsystem_cachedirtPRIO_DEFAULTR3R=t_configure_from_optionst_read_conf_fileR�R
t_adjust_conf_optionsRiR}t
ValueErrorRIR�RtIOErrorRR�treprtfilenametdestdirRaR:tset_enabledtset_disabledt	sleeptimeR'tsleeptrandomt	randrangetadd_commandsR9tinit_pluginst
disableplugintenablepluginRRtPROGRAM_NAMER�R�R�Rthelptparse_command_argstallowerasingt
allow_erasingt_allow_erasingR�tdebugsolvertdebug_solverRt
pre_configuretpre_configure_pluginst_activate_persistorR�tconfigure_pluginst	configureR(t
ensure_dirROR�tpkgdirR�R7treinitR�texpandMacroR/RPtgpgchecktlocalpkg_gpgcheckR$(
RGRR�R�R�toptR�R�tforcingR((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyR�Rs�'	
				%	!
 	


					





!%		
	cC@s4tjjd�}|jj}|jd�|jdtjj�|jd�|j}|j	|j
�|dkr�|jdkr�tj
j|j
�}n!|dkr�tj
j|�}n|dk	r�||_n|jdkr�tjtd��nxd
D]}|j|�q�W|jjj|�|�|S(Nuconfiguconfig_file_pathtpriorityureposdiru/uPUnable to detect release version (use '--releasever' to specify release version)ucachedirulogdiru
persistdir(ucachedirulogdiru
persistdir(R,R�tTimerR=RBt_search_inside_installroottreadtPRIO_MAINCONFIGt
substitutionstupdate_from_etcR�RtR�R�tdetect_releaseverRIR$Rtprepend_installroott_loggingt_setup_from_dnf_conf(RGR�ttimerRBtsubstR�((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyR��s(

	
ueqc	C@s�|dkr|dkrdSg}|js1|r[idd|6}|j|j|��n|jsj|r�idd|6}|j|j|��n|js�|r�idd|6}|j|j|��n|js�|ridd|6}|j|j|��n|jr<i|jd|6}|j|j|��n|jrri|jd|6}|j|j|��n|j	r�i|j	d	|6}|j|j|��n|j
r�i|j
d
|6}|j|j|��n||j_dS(u�

        :param opts:
        :param query: base package set for filters
        :param cmp_type: string like "eq", "gt", "gte", "lt", "lte"
        :param all:
        :return:
        Nubugfixuadvisory_type__uenhancementu
newpackageusecurityu
advisory__uadvisory_bug__uadvisory_cve__uadvisory_severity__(
RttbugfixRWtfiltertenhancementt
newpackagetsecuritytadvisorytbugzillatcvestseverityR=t_update_security_filters(RGR�R0tcmp_typeR�tfiltersR�((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt _populate_update_security_filters8					cC@sN|dk	r%|jjjj|�n|dk	rJ|jjjj|�ndS(u�
        Change minimal logger level for terminal output to stdout and stderr according to specific
        command requirements
        @param stdout: logging.INFO, logging.WARNING, ...
        @param stderr:logging.INFO, logging.WARNING, ...
        N(RtR=R�tstdout_handlertsetLeveltstderr_handler(RGtstdouttstderr((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pytredirect_logger)scC@sAtjjj|�}||jj_|jjj�j|�dS(N(	R,RkRhtMultiFileProgressMeterR=RROR�R�(RGtfoRh((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pytredirect_repo_progress5scC@s�|jjj�}|dkr"dS|jjj�jd|j�}|j�}|jdd�|}x#|D]}||krl|}qlqlW||kr�td|�td|�ndS(NRt
advisory_typeusecurityu,Security: %s is an installed security updateu-Security: %s is the currently running version(	R=R-tget_running_kernelRtR0R1R	RR2(RGtkerneltqtikpkgR((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt_check_running_kernel:s!

cC@s;t|jj��tjjtdj||����dS(Nu)argument {}: not allowed with argument {}(R2R~tprint_usageR,RiRnRRl(RGtoption_string_1toption_string_2((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt_option_conflictLscC@sSxL|jD]A}||jkr>tjjtd�|��n||j|<q
WdS(uRegister a Command. :apiuCommand "%s" already definedN(R�R9R,RiR}R(RGR�R	((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyR>QscC@s|j�|jj�S(u2Call the base command, and pass it the extended commands or
           arguments.

        :return: (exit_code, [ errors ])

        exit_code is::

            0 = we're done, exit
            1 = we've errored, exit with error string
            2 = we've got work yet to do, onto the next stage
        (R�R:trun(RG((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyRXs
N(R5R6RER�R�R�R�RtR�R�RRR�RRRRR>R(((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyR8�s	$	/	
		�"&			(MR7t
__future__RRRtcollections.abcRtImportErrortcollectionsR�R�R�R�R�R�R�R'R�tlibdnf.transactionR|tRtdnf.cliRtdnf.i18nRRR,tdnf.cli.aliasestdnf.cli.commandstdnf.cli.commands.aliastdnf.cli.commands.autoremovetdnf.cli.commands.checktdnf.cli.commands.cleantdnf.cli.commands.deplisttdnf.cli.commands.distrosynctdnf.cli.commands.downgradetdnf.cli.commands.grouptdnf.cli.commands.installtdnf.cli.commands.makecachetdnf.cli.commands.marktdnf.cli.commands.moduletdnf.cli.commands.reinstalltdnf.cli.commands.removetdnf.cli.commands.repolisttdnf.cli.commands.repoquerytdnf.cli.commands.searchtdnf.cli.commands.shelltdnf.cli.commands.swaptdnf.cli.commands.updateinfotdnf.cli.commands.upgradetdnf.cli.commands.upgrademinimaltdnf.cli.demandtdnf.cli.formattdnf.cli.option_parsertdnf.conftdnf.conf.substitutionst	dnf.consttdnf.db.historytdnf.exceptionstdnf.loggingt
dnf.persistort
dnf.plugintdnf.rpmtdnf.sacktdnf.transactiontdnf.utiltdnf.yum.misct	getLoggerRIRR&R@tBaseRAtobjectR8(((s//usr/lib/python2.7/site-packages/dnf/cli/cli.pyt<module>s�
		��4

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