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/__init__.pyc

�
�[/\c@s�dZddlmZddlmZddlZddlmZddlmZm	Z	ddl
Z
ddlZddl
ZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZejd�Zed�d	Zed
�dZed�Zd
�Zfd�Zdefd��YZdefd��YZ de fd��YZ!defd��YZ"defd��YZ#defd��YZ$defd��YZ%defd��YZ&dS(u<
Classes for subcommands of the yum command line interface.
i����(tprint_function(tunicode_literalsN(tOptionParser(t_tucdudnfu+To diagnose the problem, try running: '%s'.urpm -Va --nofiles --nodigestuDYou probably have corrupted RPMDB, running '%s' might fix the issue.urpm --rebuilddbu	You have enabled checking of packages via GPG keys. This is a good thing.
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
    rpm --import public.gpg.key


Alternatively you can specify the url to the key you would like to use
for a repository in the 'gpgkey' option in a repository section and DNF
will install it for you.

For more information contact your distribution or package provider.cCs�|jjsdS|j�s�xk|jj�D]W}|jsD|jr,|jr,tjdt	�tjt
d�|�tjj
�q,q,WndS(u�Verify that there are gpg keys for the enabled repositories in the
    rpm database.

    :param base: a :class:`dnf.Base` object.
    :raises: :class:`cli.CliError`
    Nu
%s
uProblem repository: %s(tconftgpgcheckt_gpg_key_checktrepostiter_enabledt
repo_gpgchecktgpgkeytloggertcriticaltgpg_msgRtdnftclitCliError(tbaseRtrepo((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyt_checkGPGKeyCscCs�|jj�rdSx\|D]T}|jd�rEtjj|�rEdStjjj|�d}|d	krdSqWt	d�}tj
j|��dS(
u�Verify that there is at least one enabled repo.

    :param base: a :class:`dnf.Base` object.
    :param possible_local_files: the list of strings that could be a local rpms
    :raises: :class:`cli.CliError`:
    Nu.rpmiuhttpuftpufileuhttpsuThere are no enabled repos.(uhttpuftpufileuhttps(Rt_any_enabledtendswithtostpathtexistsRtpycompturlparseRRR(Rtpossible_local_filestlfiletschemetmsg((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyt_checkEnabledRepoTs
!tCommandcBs�eZdZgZdZdZd�Zed��Z	ed��Z
ed��Zd�Zd�Z
d�Zd	�Zd
�Zd�ZRS(
u%Abstract base class for CLI commands.ucCs
||_dS(N(R(tselfR((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyt__init__pscCs
|jjS(N(RR(R"((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRtscCs|jdS(Ni(taliases(R"((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyt_basecmdyscCs
|jjjS(N(RRtoutput(R"((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR&}scCsdS(u4Define command specific options and arguments. #:apiN((R"tparser((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyt
set_argparser�scCsdS(u*Do any command-specific pre-configuration.N((R"((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyt
pre_configure�scCsdS(u&Do any command-specific configuration.N((R"((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyt	configure�scCs3t|tjj�rttfStd|��dS(u.Get suggestions for resolving the given error.uerror not supported yet: %sN(t
isinstanceRt
exceptionstTransactionCheckErrort_RPM_VERIFYt_RPM_REBUILDDBtNotImplementedError(R"terror((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pytget_error_output�s
cCsdS(uExecute the command.N((R"((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pytrun�scCsdS(u%Finalize operations post-transaction.N((R"((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pytrun_transaction�sN(t__name__t
__module__t__doc__R$tsummarytNonetoptsR#tpropertyRR%R&R(R)R*R2R3R4(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR!is						tInfoCommandc	BsheZdZdZed�ZdZdddddd	d
deh	Zed��Z	d
�Z
d�ZRS(uRA class containing methods needed by the cli to execute the
    info command.
    uinfou4display details about a package or group of packagesuallu	availableu	installeduextrasuupdatesuupgradesu
autoremoveurecentu	obsoletesc
Cs�|j�}|jdddddddddd	td
��|jdddddddd	td
��|jdddddddd	td��|jdddddddd	td��|jdddddddd	td��|jdddddddd	td��|jdddddddd	td��|jdddddddd	td��|jddd d!td"�d#|jd|jdtj�dS($Nu--alltdestu_packages_actiontactionustore_consttconstualltdefaultthelpushow all packages (default)u--availableu	availableushow only available packagesu--installedu	installedushow only installed packagesu--extrasuextrasushow only extras packagesu	--updatesuupgradesushow only upgrades packagesu
--upgradesu--autoremoveu
autoremoveushow only autoremove packagesu--recenturecentu#show only recently changed packagesupackagestnargsu*tmetavaruPACKAGEtchoices(tadd_mutually_exclusive_grouptadd_argumentR9Rt
pkgnarrowstDEFAULT_PKGNARROWRtPkgNarrowCallback(tclsR'tnarrows((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR(�s8







cCs�|jj}t|_t|_|jjr?|jj|j_n|jjdkr]t|_	n|jj
r�|jjr�|jjdd|jj�q�d|j_n|jjdkr�d|j_ndS(Nu	installedu--obsoletesu--u	obsoletesuupdatesuupgrades(RtdemandstFalsetfresh_metadatatTruetsack_activationR:t_packages_actiontpackages_actiontavailable_repost	obsoletest_option_conflict(R"RL((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*�s		 cCsD|jj|j|jjj��|jjd|jj|jj�S(Nuinfo(	Rt _populate_update_security_filterR:Rtsacktquerytoutput_packagesRRtpackages(R"((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR3�s"(uinfo(R5R6R7R$RR8RHRGtclassmethodR(R*R3(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR<�s	tListCommandcBs)eZdZdZed�Zd�ZRS(uRA class containing methods needed by the cli to execute the
    list command.
    ulistu$list a package or groups of packagescCsD|jj|j|jjj��|jjd|jj|jj�S(Nulist(	RRVR:RRWRXRYRRRZ(R"((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR3�s"(ulist(R5R6R7R$RR8R3(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR\�stProvidesCommandcBsAeZdZdZed�Zed��Zd�Zd�Z	RS(uVA class containing methods needed by the cli to execute the
    provides command.
    uprovidesuwhatprovidesu*find what package provides the given valuecCs#|jddddtd��dS(Nu
dependencyRBu+RCuSOME_STRING(RFR(R'((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR(�scCs+|jj}t|_t|_t|_dS(N(RRLRORSRMRNRP(R"RL((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*�s		cCs)tjtd��|jj|jj�S(NuSearching Packages: (RtdebugRRtprovidesR:t
dependency(R"((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR3�s(uprovidesuwhatprovides(
R5R6R7R$RR8tstaticmethodR(R*R3(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR]�s	tCheckUpdateCommandcBsAeZdZdZed�Zed��Zd�Zd�Z	RS(uZA class containing methods needed by the cli to execute the
    check-update command.
    ucheck-updateu
check-upgradeu$check for available package upgradescCsN|jddddtdddtd��|jd	d
ddtd
��dS(Nu--changelogsR=u
changelogsR@R>u
store_trueRAushow changelogs before updateupackagesRBu*RCuPACKAGE(RFRMR(R'((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR(	s
cCsG|jj}t|_t|_|jjr6t|_nt|j�dS(N(	RRLRORPRSR:t
changelogsR R(R"RL((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*s		cCs�|jjj�j�}|jjjrx|j|jjj�j��}|jjj�jd|�}|j|�}n|j	j
|j|dd�|jj|jj
dtd|jj�}|r�d|j	j_n|jjjr�|j	j�ndS(NRTtcmp_typeugtetprint_Rcid(RRWRXtupgradesRRTtuniont	installedtfilterRRVR:t
check_updatesRZRORcRLtsuccess_exit_statustautocheck_running_kernelt_check_running_kernel(R"RXt	obsoletedRTtfound((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR3s!(ucheck-updateu
check-upgrade(
R5R6R7R$RR8RaR(R*R3(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRbs	tRepoPkgsCommandcBs]eZdZdefd��YZdefd��YZdefd��YZdefd��YZd	efd
��YZdefd��YZ	d
efd��YZ
defd��YZdefd��YZdefd��YZ
defd��YZeeeeee	e
eee
ehZd Zed�Zd�Zd�Zd�Zd�ZRS(!u2Implementation of the repository-packages command.tCheckUpdateSubCommandcBs&eZdZdZd�Zd�ZRS(u'Implementation of the info sub-command.ucheck-updatecCs"|jj}t|_t|_dS(N(RRLRORSRP(R"RL((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*1s	cCs@|jj|jj|jdt�}|r<d|jj_ndS(u?Execute the command with respect to given arguments *cli_args*.ReidN(	RRjR:t	pkg_specstreponameRORRLRk(R"Ro((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pytrun_on_repo6s(ucheck-update(R5R6R7R$R*Rt(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRq,s	tInfoSubCommandcBs&eZdZdZd�Zd�ZRS(u'Implementation of the info sub-command.uinfocCs�|jj}t|_|jjr6|jj|j_n|jjdkrTt|_n|jjr�|jjr�|jj	dd|jj�q�d|j_ndS(Nu	installedu--obsoletesu--u	obsoletes(
RRLRORPR:t_pkg_specs_actiontpkg_specs_actionRSRTRU(R"RL((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*Bs	 cCsN|jj|j|jjj��|jjd|jj|jj|j	�dS(u?Execute the command with respect to given arguments *cli_args*.uinfoN(
RRVR:RRWRXRYRwRrRs(R"((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRtOs"(uinfo(R5R6R7R$R*Rt(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRu=s	
tInstallSubCommandcBs&eZdZdZd�Zd�ZRS(u*Implementation of the install sub-command.uinstallcCs4|jj}t|_t|_t|_t|_dS(N(RRLRORSRPt	resolvingt	root_user(R"RL((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*Zs
			cCs8|jj|j|jjj��t|j|j�t}|jjs�y|jj	d|j
�Wn*tjj
k
r�tjtd��qXt}n|xy|jjD]k}y|jj	||j
�WnBtjj
k
rtd�}tj||jjj|��q�Xt}q�W|s4tjjtd���ndS(Nu*uNo package available.uNo package %s available.uNo packages marked for install.(RRVR:RRWRXRRMRrtinstallRsRR,tMarkingErrorRtinfoRROR&ttermtboldtError(R"tdonetpkg_specR((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRtas$"	#
(uinstall(R5R6R7R$R*Rt(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRxUs	tListSubCommandcBseZdZdZd�ZRS(u'Implementation of the list sub-command.ulistcCsN|jj|j|jjj��|jjd|jj|jj|j	�dS(u?Execute the command with respect to given arguments *cli_args*.ulistN(
RRVR:RRWRXRYRwRrRs(R"((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRt�s"(ulist(R5R6R7R$Rt(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR�~stMoveToSubCommandcBs&eZdZdZd�Zd�ZRS(u*Implementation of the move-to sub-command.umove-tocCs4|jj}t|_t|_t|_t|_dS(N(RRLRORPRSRyRz(R"RL((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*�s
			cCst|j|j�t}|jjs�y|jjdd|j�Wn{tj	j
k
rntjt
d��q�tj	jk
r�tjt
d��q�tj	jk
r�ts�td��q�Xt}n&x#|jjD]}y|jj|d|j�Wn�tj	j
k
r.t
d�}tj||�q�tj	jk
r�}x�|jD]h}d}|jjj|�}|r�t
d�|}nt
d	�}tj||jjj|�|�qMWq�tj	jk
r�ts�td��q�Xt}q�W|stj	jt
d
���ndS(u?Execute the command with respect to given arguments *cli_args*.u*tnew_reponameuNo package installed.uNo package available.u+Only the above marking errors are expected.uNo match for argument: %suu
 (from %s)u%Installed package %s%s not available.uNothing to do.N(RRRRMR:Rrt	reinstallRsRR,tPackagesNotInstalledErrorRR}RtPackagesNotAvailableErrorR|tAssertionErrorRORZthistoryRR&R~RR�(R"R�R�Rterrtpkgtxmsgtpkgrepo((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRt�s@	)	

(umove-to(R5R6R7R$R*Rt(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR��s	tReinstallOldSubCommandcBs&eZdZdZd�Zd�ZRS(u0Implementation of the reinstall-old sub-command.u
reinstall-oldcCs4|jj}t|_t|_t|_t|_dS(N(RRLRORPRSRyRz(R"RL((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*�s
			cCs t|j|j�t}|jjs�y |jjd|j|j�Wn�tj	j
k
rwtd�}tj
|�q�tj	jk
r�tj
td��q�tj	jk
r�ts�td��q�Xt}n)x&|jjD]}y |jj||j|j�Wn�tj	j
k
r:td�}tj
||�q�tj	jk
r�}x�|jD]h}d}|jjj|�}|r�td�|}ntd�}tj
||jjj|�|�qYWq�tj	jk
r�ts�td��q�Xt}q�W|stj	jtd	���nd
S(u?Execute the command with respect to given arguments *cli_args*.u*u)No package installed from the repository.uNo package available.u+Only the above marking errors are expected.uNo match for argument: %suu
 (from %s)u%Installed package %s%s not available.uNothing to do.N(RRRRMR:RrR�RsRR,R�RRR}R�R|R�RORZR�RR&R~RR�(R"R�RR�R�R�R�R�((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRt�sD 	)	

(u
reinstall-old(R5R6R7R$R*Rt(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR��s	tReinstallSubCommandcBs/eZdZdZd�Zd�Zd�ZRS(u,Implementation of the reinstall sub-command.u	reinstallcCs>ttj|�j|�tj|�tj|�f|_dS(uInitialize the command.N(tsuperRpR�R#R�R�twrapped_commands(R"R((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR#�scCsIt|jj_x3|jD](}|j|_|j|_|j�qWdS(N(RORRLRSR�R:RsR*(R"tcommand((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*s
cCsot|j|j�xU|jD]2}y|j�Wntjjk
rMqqXPqWtjjtd���dS(u?Execute the command with respect to given arguments *cli_args*.u!No packages marked for reinstall.N(	RRRR�RtRR,R�R(R"R�((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRts(u	reinstall(R5R6R7R$R#R*Rt(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR��s
		tRemoveOrDistroSyncSubCommandcBs/eZdZdZd�Zd�Zd�ZRS(u8Implementation of the remove-or-distro-sync sub-command.uremove-or-distro-synccCs4|jj}t|_t|_t|_t|_dS(N(RRLRORSRPRyRz(R"RL((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*s
			cCs'|jjjj|�tjj|�}|j|jjj�}|jjj}g|j	�D]!}|j
|�|kr\|^q\}|s�tjjd|��n|j
�}|jjjj}	xa|D]Y}
|jd|
jd|
j�r|jjjj|
�q�|jjjj|
d|	�q�WdS(u;Synchronize a package with another repository or remove it.uno package matchedtnametarcht
clean_depsN(RRRWtdisable_repoRtsubjecttSubjecttget_best_queryR�RhRR,R�t	availableRtclean_requirements_on_removeRiR�R�t_goaltdistupgradeterase(R"R�RsR�tmatchesR�R�RhR�R�tpackage((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyt_replace$s!	
cCst|j|j�t}|jjsxy|jd|j�Wn0tj	j
k
rntd�}tj
|�q�Xt}njxg|jjD]Y}y|j||j�Wn3tj	j
k
r�td�}tj
||�q�Xt}q�W|stj	jtd���ndS(u?Execute the command with respect to given arguments *cli_args*.u*u)No package installed from the repository.uNo match for argument: %suNothing to do.N(RRRRMR:RrR�RsRR,R�RRR}ROR�(R"R�RR�((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRt9s$	
(uremove-or-distro-sync(R5R6R7R$R*R�Rt(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR�s
		tRemoveOrReinstallSubCommandcBs&eZdZdZd�Zd�ZRS(u6Implementation of the remove-or-reinstall sub-command.uremove-or-reinstallcCs4|jj}t|_t|_t|_t|_dS(N(RRLRORPRSRyRz(R"RL((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*[s
			c	Cs�t|j|j�t}|jjs�y,|jjdd|jd|jdt�WnXt	j
jk
r�td�}t
j|�q\t	j
jk
r�ts�td��q\Xt}n�x�|jjD]�}y,|jj|d|jd|jdt�Wn[t	j
jk
r)td�}t
j||�q�t	j
jk
rQtsXtd��q�Xt}q�W|s}t	j
jtd���nd	S(
u?Execute the command with respect to given arguments *cli_args*.u*told_reponametnew_reponame_neqt	remove_nau)No package installed from the repository.u)Only the above marking error is expected.uNo match for argument: %suNothing to do.N(RRRRMR:RrR�RsRORR,R�RRR}R|R�R�(R"R�RR�((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRtbs4			
(uremove-or-reinstall(R5R6R7R$R*Rt(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR�Vs	tRemoveSubCommandcBs&eZdZdZd�Zd�ZRS(u)Implementation of the remove sub-command.uremovecCs=|jj}t|_t|_t|_t|_t|_dS(N(	RRLRORPt
allow_erasingRMRSRyRz(R"RL((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*�s				cCs�t}|jjshy|jjd|j�Wn0tjjk
r^t	d�}t
j|�q�Xt}ngxd|jjD]V}y|jj||j�Wn-tjjk
r�t
jt	d�|�quXt}quW|s�t
j
t	d��ndS(u?Execute the command with respect to given arguments *cli_args*.u*u)No package installed from the repository.uNo match for argument: %suNo packages marked for removal.N(RMR:RrRtremoveRsRR,R|RRR}ROtwarning(R"R�RR�((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRt�s 	
(uremove(R5R6R7R$R*Rt(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR��s	tUpgradeSubCommandcBs&eZdZdZd�Zd�ZRS(u*Implementation of the upgrade sub-command.uupgradeu
upgrade-tocCs4|jj}t|_t|_t|_t|_dS(N(RRLRORPRSRyRz(R"RL((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*�s
			cCs�t|j|j�t}|jjsA|jj|j�t}ngxd|jjD]V}y|jj	||j�Wn-t
jjk
r�t
jtd�|�qNXt}qNW|s�t
jjtd���ndS(u?Execute the command with respect to given arguments *cli_args*.uNo match for argument: %suNo packages marked for upgrade.N(RRRRMR:Rrtupgrade_allRsROtupgradeRR,R|RR}RR�(R"R�R�((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRt�s	
(uupgradeu
upgrade-to(R5R6R7R$R*Rt(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR��s	urepository-packagesu	repo-pkgsu
repo-packagesurepository-pkgsu7run commands on top of all packages in given repositorycsOtt|�j���fd�|jD�}d|_d�|D�|_dS(uInitialize the command.c3s|]}|��VqdS(N((t.0tsubcmd(R(s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pys	<genexpr>�scSs)i|]}|jD]}||�qqS((R$(R�R�talias((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pys
<dictcomp>�s	N(R�RpR#tSUBCMDSR9R�t_subcmd_name2obj(R"Rtsubcmd_objs((Rs=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR#�s	c
Cs3g|jD]}|jd^q
}tt|�jddddtjdtd��|jdddd	|�d
}|ddd
ddddh}|j�}|jddddddd
dddtd��|jddddddddtd��|jddddddddtd��|jddddddddtd��|jd dddddddtd!��|jd"dddddddtd!��|jd#dddddd
dtd$��|jd%dddddddtd&��|jd'dd(dtd)�d	|d|dtj	�dS(*NiureponameRBiR>RCuREPOusubcmdRDuallu	installedu	availableu
autoremoveuextrasu	obsoletesurecentuupgradesu--allR=u_pkg_specs_actionustore_constR?R@RAushow all packages (default)u--availableushow only available packagesu--installedushow only installed packagesu--extrasushow only extras packagesu	--updatesushow only upgrades packagesu
--upgradesu--autoremoveushow only autoremove packagesu--recentu#show only recently changed packagesu	pkg_specsu*uPACKAGE(
R�R$R�RRFt_RepoCallbackEnableRRER9RI(R"R'R�tsubcommand_choicesRHRGRK((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR(�sJ#
		







cCs�y|j|jjd|_Wn;tjjtfk
r[}|jjj�tjj�nX|j|j_|jj	d|j_	|jj
�dS(u8Verify whether the command can run with given arguments.iN(R�R:R�RRRtKeyErrort	optparsertprint_usageRsR*(R"te((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*scCs|jj�dS(u>Execute the command with respect to given arguments *extcmds*.N(R�Rt(R"((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR3s(urepository-packagesu	repo-pkgsu
repo-packagesurepository-pkgs(R5R6R7R!RqRuRxR�R�R�R�R�R�R�R�R�R$RR8R#R(R*R3(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyRp)s0)79>1(#					(	tHelpCommandcBs8eZdZdZed�Zed��Zd�ZRS(uRA class containing methods needed by the cli to execute the
    help command.
    uhelpudisplay a helpful usage messagecCs#|jddddtd��dS(NucmdRBu?RCuCOMMAND(RFR(R'((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR($scCsk|jjs%|jj|jjkr8|jjj�n/|jj|jj}|jjj||��dS(N(R:tcmdRtcli_commandsR�t
print_help(R"R�((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR3(s

(uhelp(	R5R6R7R$RR8RaR(R3(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR�s
tHistoryCommandcBs�eZdZd
Zed�Ze�Ze�Ze	d��Z
d�Zd�Zd�Z
d�Zd�Zd	�Ze�ed
d�Zd�ZRS(uUA class containing methods needed by the cli to execute the
    history command.
    uhistoryu(display, or use, the transaction historycCs[ddddddg}|jddd	d
|d|dd
tjdddj|��dS(Nulistuinfouredouundourollbacku
userinstalledutransactionsRBu*RDR@iR>RCu[%s]u|(RFRRItjoin(R'tcmds((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR(;s
	cCs^t}td�j|jj�}|jj}|jjdkr�t}|jjstd�}t	j
|�tjj|��n:t
|jj�dkr�t	j
|�tjj|��nt|_t|j|j�n	t|_t|_t|_tj|jjjtj�s?td�}t	j
|�tjj|��n|j|j||�|_dS(	NuUFound more than one transaction ID.
'{}' requires one transaction ID or package name.uredouundourollbacku(No transaction ID or package name given.iu(You don't have access to the history DB.(uredouundourollback(RMRtformatR:ttransactions_actionRRLROttransactionsRR
RRtlenRSRRRNRPRzRtaccessR�RtR_OKt_args2transaction_idstmerged_transaction_idsttransaction_ids(R"trequire_one_transaction_idtrequire_one_transaction_id_msgRLR((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR*Cs2

				
cCs�t|tjj�r�|jjdkrG|jj\}td�|fS|jjdkr�|jjddkr{|jjn
|jjd\}td�|fSntj	||�S(u.Get suggestions for resolving the given error.uundouVCannot undo transaction %s, doing so would result in an inconsistent package database.urollbackiuforceiuZCannot rollback transaction %s, doing so would result in an inconsistent package database.(
R+RR,R-R:R�R�RR!R2(R"R1tid_((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR2`s	"	cCs�|jj|�}|dkr+ddgfStjj|j�}td|j|f�|j	j
|�x|j�D]�}t|jj
j�jdt|�d|j��}|jtjjkr)|stjtd�|j	jjtt|����ddgfS|d}|jjt|��qt|jtjjkrt|sJqtn|d}|jjt|��qtqtW|jj�|jj �dS(	NiuFailed history redou!Repeating transaction %u, from %stnevraRsuNo package %s available.uAn operation cannot be redonei(!Rthistory_get_transactionR9Rtutiltnormalize_timet
beg_timestamptprintttidR&thistoryInfoCmdPkgsAlteredRZtlistRWRXRitstrt	from_repoR>ttransactiontFORWARD_ACTIONSRR}RR~RRR{tlibdnftTransactionItemAction_REMOVER�tresolvetdo_transaction(R"textcmdstoldttmtitpkgsR�((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyt
_hcmd_redoos,
3"



cCsHy|jj|d�SWn)tjjk
rC}dt|�gfSXdS(Nii(Rthistory_undo_transactionRR,R�R�(R"R�R�((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyt
_hcmd_undo�scCsHy|jj|d�SWn)tjjk
rC}dt|�gfSXdS(Nii(Rthistory_rollback_transactionRR,R�R�(R"R�R�((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyt_hcmd_rollback�scCs+t|jj��}|jj|dd�S(u&Execute history userinstalled command.uPackages installed by userunevra(ttupleRtiter_userinstalledR&tlistPkgs(R"R�((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyt_hcmd_userinstalled�sucs^�fd�}t�}x3�jjD]%}d|kr�y|jdd�\}}Wn9tk
r�tjtd�j|��t	j
j�nXtd�}	y||�}Wn9tk
r�tjt|	�j|��t	j
j�nXy||�}Wn9tk
r2tjt|	�j|��t	j
j�nX|ra||kratj|�t	j
j�n||kr}||}}n|j||f�|j
t||d��q%y|j||��Wq%tk
rI�jjj|g�}
|
r|j
|
�qJtd�j|�}|r9tj|�t	j
j�qJtj|�q%Xq%Wt|dt�S(	u0Convert commandline arguments to transaction idscsi|dkrd}n|jd�r1|d}nt|�}|dkre|�jjj�j7}n|S(Nulastu0ulast-ii(t
startswithtintR&R�tlastR�(tsttransaction_id(R"(s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pytstr2transaction_id�s	
u..iuWInvalid transaction ID range definition '{}'.
Use '<transaction-id>..<transaction-id>'.uYCan't convert '{}' to transaction ID.
Use '<integer>', 'last', 'last-<positive-integer>'.iu8No transaction which manipulates package '{}' was found.treverse(tsetR:R�tsplitt
ValueErrorRR
RR�RRRtaddtupdatetrangeR&R�tsearchR}tsortedRO(R"t
merged_idstrequire_one_trans_idtrequire_one_trans_id_msgR�R�tttbegin_transaction_idtend_transaction_idtcant_convert_msgttransact_ids_from_pkgnameR((R"s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR��sT
	





	
cCsD|jj}|dkr0|jj|j�}n�|dkrc|jj|j|jj|j�}n~|dkr�|j|j�}n]|dkr�|j	|j�}n<|dkr�|j
|j�}n|dkr�|j�}n|dkr�dS|\}}|dkrt
|jj_n%|dkr@tjj|d��ndS(	Nulistuinfouundouredourollbacku
userinstalledii(R:R�R&thistoryListCmdR�thistoryInfoCmdR�R�R�R�R�R�R9RORRLRyRR,R�(R"tvcmdtrettcodetstrs((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR3�s*(uhistory(R5R6R7R$RR8R�R�R�RaR(R*R2R�R�R�R�RMR�R3(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyR�0s								?('R7t
__future__RRR�tdnf.cli.option_parserRtdnf.i18nRRtargparsetdnf.cliRtdnf.cli.demandt	dnf.consttdnf.exceptionst
dnf.pycomptdnf.transactiontdnf.utilt	functoolstloggingtoperatorRt	getLoggerRR.R/RRR tobjectR!R<R\R]RbRpR�R�(((s=/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.pyt<module>sH				5?(��

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