MOON
Server: Apache
System: Linux server2.shieldcogroup.com 3.10.0-1160.119.1.el7.tuxcare.els12.x86_64 #1 SMP Fri Nov 8 05:49:38 UTC 2024 x86_64
User: jacom (1029)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyc
�
�[/\c@s�ddlmZddlmZddlZddlZddlZddlZddlZddl	Z	ej
d�Zdefd��YZ
dejejfd��YZdS(	i����(tcommands(t_NtdnftShellDemandSheetcBs eZeZeZeZeZRS((t__name__t
__module__tTruetavailable_repost	resolvingt	root_usertsack_activation(((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyR%stShellCommandcBs�eZdZed�Zi
dd6dd6dd6dd6dd6dd	6dd6d
d
6dd6d
d
6Zd�Zed��Zd�Z	d�Z
d�Zd�Zdd�Zdd�Zdd�Zdd�Zd�Zdd�Zdd�Zdd�ZRS(tshellsrun an interactive DNF shelltrepot
repositorytquittexittts_runtrunttransactionttstconfigtresolvet
resolvedepthelpcCs0tjj||�tjj|�d|_dS(Ns> (RtCommandt__init__tcmdtCmdtprompt(tselftcli((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyR=sc	Cs/|jddddtd�dtd��dS(Ntscripttnargst?tmetavartSCRIPTRsScript to run in DNF shell(tadd_argumentR(tparser((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyt
set_argparserBscCs�|jj}t�|j_xst|�D]e}|jd�rCq(nyt|jj|�Wq(tk
r�t|jj|t||��q(Xq(WdS(Nt__(RtdemandsRtdirt
startswithtgetattrtAttributeErrortsetattr(Rtdefault_demandstattr((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyt	configureGs
cCs0|jjr"|j|jj�n
|j�dS(N(toptsR t_run_scripttcmdloop(R((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyRTscCs*|jj�d|j_|jj�dS(N(tbaset_finalize_basetNonet_transactiont	fill_sack(R((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyt_cleanZs
cCs�|s|dkrdS|dkr,d}nytj|�}Wn|j�dSX|jjj|�}|jdkr|dS|j|jkr�t|d|j|j�|ddd��n�|jj
j|j�}|dk	r�||j�}yK|jjj||�}t
j|jj�|j_|j�|j�Wq�tjjk
rv}tjtd�d|j�q�dSXn
|j�dS(	Ns
tEOFRRRisError:t (tshlextsplitt_helpRt	optparsertparse_main_argstcommandtMAPPINGR,R7tcli_commandstgettparse_command_argstcopytdeepcopyR)R1RRt
exceptionstErrortloggerterrorRtvalue(Rtlinets_lineR2tcmd_clsRte((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pytonecmd_s6	
1
!c	Csd�}|s"t|�dkr3|jd�dS|d}t|�dkrY|dnd}|jd�}|dkr�|| }||d}|jjj|�}x|D]}||||�q�W|stjt	d�|�qn||||jj
�dS(	NcSs^|rt|||�nAy$dj|t|t|���GHWntjtd��nXdS(Ns{}: {}sUnsupported key value.(R.tformatR,tstrRKtwarningR(tkeytvaltconf((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pytprint_or_set�s$iRiit.i����sCould not find repository: %s(tlenR?R7tfindR5trepostget_matchingRKRURRX(	RtargsRYRVRWtperiodt	repo_nameR]R
((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyt_configs"		

"


cCsnt|t�r+t|�dkr+|dn|}d}|r<|dkratd�j|�}q<|dkr�td�j|�}q<|dkr�td�j|�}q<|d	kr�td
�j|�}q<|dkr�td
�j|�}q<|dkrtd�j|�}q<|dkr<td�j|�}q<n|sa|jjj�td�}nd|GHdS(s�Output help information.

        :param args: the command to output help information about. If
           *args* is an empty, general help will be output.
        iRs�{} arg [value]
  arg: debuglevel, errorlevel, obsoletes, gpgcheck, assumeyes, exclude,
        repo_id.gpgcheck, repo_id.exclude
    If no value is given it prints the current value.
    If value is given it sets that value.Rs{} [command]
    print helpR
Rs�{} arg [option]
  list: lists repositories and their status. option = [all | id | glob]
  enable: enable repositories. option = repository id
  disable: disable repositories. option = repository idRs"{}
    resolve the transaction setRRsy{} arg
  list: lists the contents of the transaction
  reset: reset (zero-out) the transaction
  run: run the transactionRs{}
    run the transactionRRs{}
    exit the shells�Shell specific arguments:

config                   set config options
help                     print help
repository (or repo)     enable, disable or list repositories
resolvedep               resolve the transaction set
transaction (or ts)      list, reset or run the transaction set
run                      resolve and run the transaction set
exit (or quit)           exit the shells
N(srepoR(stransactionR(sexitsquit(	t
isinstancetlistR[R7RRSRR@t
print_help(RR_targtmsg((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyR?�s:1cCs|r|dnd}|dkrC|jddj|d��n�|dkr�|jjj}t}x|ddd�D]j}|j|�}|r�t||��t	}qxt
jtd�dtd	�|jj
jj|��qxW|r|jj�qn
|jd
�dS(
NiRds	repolist R<itenabletdisablesError:sUnknown repo: '%s'R
(slistN(RhRi(R7RRtjoinRR5R]tFalseR^R,RRKtcriticalRtoutputttermtboldR9R?(RR_RR]R9R
tr((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyt_repo�s !	cCs]|jjjdkrYy |jjj|jjj�WqYtjj	k
rU}|GHqYXndS(N(
RR5RR7RR)t
allow_erasingRRIt
DepsolveError(RR_RQ((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyt_resolve�s
 cCs�yXt|d��C}|j�}x-|D]%}|jd�s(|j|�q(q(WWdQXWnFtk
r�tjtd�|jj	j
j|��tj
d�nXdS(NRpt#s!Error: Cannot open %s for readingi(topent	readlinesR+RRtIOErrorRKtinfoRR5RmRnRotsysR(RtfiletfdtlinesRN((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyR3�s

(cCs�|r|dnd}|dkr0|j�dS|j�|dkr�|jjr�|jjj|jj�}tj|�q�nA|dkr�y|jj	�WnnX|j�n
|j
d�dS(NitresetRdRR(slistN(R7R:RtR5R8Rmtlist_transactionRKRytdo_transactionR?(RR_Rtout((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyR8s 


cCs|jdg�dS(NR(R8(RR_((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyt_ts_runscCs$tjtd��tjd�dS(Ns
Leaving Shelli(RKRyRRzR(RR_((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyt_quits(sshellN(RRtaliasesRtsummaryRCRtstaticmethodR'R1RR:RRR7RbR?RqRtR3R8R�R�(((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyR,s4

		
			 ;	(tdnf.cliRtdnf.i18nRRRGRtloggingR=Rzt	getLoggerRKtobjectRRRR(((s:/usr/lib/python2.7/site-packages/dnf/cli/commands/shell.pyt<module>s