/usr/lib/python3.9/site-packages/dnf/cli/commands/__pycache__
NameSizeModeActions
alias.cpython-39.opt-1.pyc54060644editdlrm
alias.cpython-39.pyc54060644editdlrm
autoremove.cpython-39.opt-1.pyc19720644editdlrm
autoremove.cpython-39.pyc19720644editdlrm
check.cpython-39.opt-1.pyc37610644editdlrm
check.cpython-39.pyc37610644editdlrm
clean.cpython-39.opt-1.pyc42890644editdlrm
clean.cpython-39.pyc42890644editdlrm
deplist.cpython-39.opt-1.pyc9310644editdlrm
deplist.cpython-39.pyc9310644editdlrm
distrosync.cpython-39.opt-1.pyc14770644editdlrm
distrosync.cpython-39.pyc14770644editdlrm
downgrade.cpython-39.opt-1.pyc18580644editdlrm
downgrade.cpython-39.pyc18580644editdlrm
group.cpython-39.opt-1.pyc103010644editdlrm
group.cpython-39.pyc103770644editdlrm
history.cpython-39.opt-1.pyc114690644editdlrm
history.cpython-39.pyc114690644editdlrm
install.cpython-39.opt-1.pyc61490644editdlrm
install.cpython-39.pyc61490644editdlrm
makecache.cpython-39.opt-1.pyc13080644editdlrm
makecache.cpython-39.pyc13080644editdlrm
mark.cpython-39.opt-1.pyc29600644editdlrm
mark.cpython-39.pyc29600644editdlrm
module.cpython-39.opt-1.pyc144670644editdlrm
module.cpython-39.pyc144670644editdlrm
reinstall.cpython-39.opt-1.pyc30100644editdlrm
reinstall.cpython-39.pyc30690644editdlrm
remove.cpython-39.opt-1.pyc39510644editdlrm
remove.cpython-39.pyc39510644editdlrm
repolist.cpython-39.opt-1.pyc75030644editdlrm
repolist.cpython-39.pyc75030644editdlrm
repoquery.cpython-39.opt-1.pyc223730644editdlrm
repoquery.cpython-39.pyc223730644editdlrm
search.cpython-39.opt-1.pyc44570644editdlrm
search.cpython-39.pyc44570644editdlrm
shell.cpython-39.opt-1.pyc79360644editdlrm
shell.cpython-39.pyc79360644editdlrm
swap.cpython-39.opt-1.pyc19470644editdlrm
swap.cpython-39.pyc19470644editdlrm
updateinfo.cpython-39.opt-1.pyc140140644editdlrm
updateinfo.cpython-39.pyc140140644editdlrm
upgrade.cpython-39.opt-1.pyc37080644editdlrm
upgrade.cpython-39.pyc37080644editdlrm
upgrademinimal.cpython-39.opt-1.pyc11370644editdlrm
upgrademinimal.cpython-39.pyc11370644editdlrm
__init__.cpython-39.opt-1.pyc247470644editdlrm
__init__.cpython-39.pyc249280644editdlrm
Edit: /usr/lib/python3.9/site-packages/dnf/cli/commands/__pycache__/shell.cpython-39.pyc (7936B)
a ©!cl&ã@sˆddlmZddlmZmZddlZddlZddlZddlZddl Z ddl Z ddl Z e   d¡Z Gdd„deƒZGdd„dejejƒZdS) é)Úcommands)Ú_ÚucdNÚdnfc@seZdZdZdZdZdZdS)ÚShellDemandSheetTN)Ú__name__Ú __module__Ú __qualname__Zavailable_reposZ resolvingZ root_userZsack_activation©r r ú:/usr/lib/python3.9/site-packages/dnf/cli/commands/shell.pyr%src @sÀeZdZdZedƒjejjd�Z ddddddddd d d œ Z d d „Z e dd„ƒZ dd„Zdd„Zdd„Zdd„Zd)dd„Zd*dd„Zd+dd„Zd,dd „Zd!d"„Zd-d#d$„Zd.d%d&„Zd/d'd(„ZdS)0Ú ShellCommand)ÚshellÚshzrun an interactive {prog} shell©ÚprogÚrepoÚquitZts_runÚ transactionÚconfigÚresolveÚhelp) rÚ repositoryÚexitrÚrunÚtsrrÚ resolvedeprcCs$tj ||¡tj |¡d|_dS)Nz> )rÚCommandÚ__init__ÚcmdÚCmdÚprompt)ÚselfÚclir r r r=s zShellCommand.__init__cCs*|jddtdƒtdƒjtjjd�d�dS)NÚscriptú?ZSCRIPTzScript to run in {prog} shellr)ÚnargsÚmetavarr)Ú add_argumentrÚformatrÚutilÚMAIN_PROG_UPPER)Úparserr r r Ú set_argparserBs ÿÿzShellCommand.set_argparserc Csl|jj}tƒ|j_t|ƒD]L}| d¡r*qzt|jj|ƒWqtydt|jj|t||ƒƒYq0qdS)NÚ__)r"ÚdemandsrÚdirÚ startswithÚgetattrÚAttributeErrorÚsetattr)r!Zdefault_demandsÚattrr r r Ú configureHs    zShellCommand.configurecCs$|jjr| |jj¡n| ¡dS©N)Úoptsr#Ú _run_scriptZcmdloop©r!r r r rUszShellCommand.runcCs |j ¡d|j_|j ¡dSr6)ÚbaseZ_finalize_baseÚ _transactionÚ fill_sackr9r r r Ú_clean[s zShellCommand._cleanc Csh|r |dkrdS|dkrd}zt |¡}Wn| ¡YdS0|jjjdd�|jj |¡}|jdkrndS|j|jvržt |d|j|jƒ|dd…ƒnÆ|jj   |j¡}|du�r\||jƒ}z|jj  ||¡}Wnt yêYdS0z&t |jj¡|j_| ¡| ¡WnFtjj�yX}z(t td ƒd t|ƒ¡WYd}~dSd}~00n| ¡dS) NÚ ZEOFrF)Z reset_usager réúError:ú )ÚshlexÚsplitÚ_helpr"Ú optparserrZparse_main_argsZcommandÚMAPPINGr1Z cli_commandsÚgetZparse_command_argsÚ SystemExitÚcopyÚdeepcopyr.r5rrÚ exceptionsÚErrorÚloggerÚerrorrr)r!ÚlineZs_liner7Zcmd_clsrÚer r r Úonecmd`s<   $    zShellCommand.onecmdNc CsÂdd„}|rt|ƒdkr&| d¡dS|d}t|ƒdkrB|dnd}| d¡}|dkr®|d|…}||dd…}|jj |¡}|D]}||||ƒq†|s¾t td ƒ|¡n||||jj ƒdS) NcSsP|rt|||ƒn:ztd |t|t|ƒƒ¡ƒWnt tdƒ¡Yn0dS)Nz{}: {}zUnsupported key value.)r3Úprintr(r1ÚstrrMÚwarningr)ÚkeyÚvalÚconfr r r Ú print_or_set‡s z*ShellCommand._config..print_or_setérrr?Ú.éÿÿÿÿzCould not find repository: %s) ÚlenrDÚfindr:ÚreposÚ get_matchingrMrTrrW) r!ÚargsrXrUrVZperiodZ repo_namer^rr r r Ú_config†s$     ÿzShellCommand._configcCsøt|tƒrt|ƒdkr|dn|}d}|rÐ|dkrBtdƒ |¡}nŽ|dkrZtdƒ |¡}nv|dvrrtdƒ |¡}n^|d krŠtd ƒ |¡}nF|d vr¢td ƒ |¡}n.|d krºtdƒ |¡}n|dvrÐtdƒ |¡}|sè|jj ¡tdƒ}td|ƒdS)z¤Output help information. :param args: the command to output help information about. If *args* is an empty, general help will be output. rNrzà{} 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.rz{} [command] print help)rrzÅ{} arg [option] list: lists repositories and their status. option = [all | id | glob] enable: enable repositories. option = repository id disable: disable repositories. option = repository idrz"{} resolve the transaction set)rrzy{} arg list: lists the contents of the transaction reset: reset (zero-out) the transaction run: run the transactionrz{} run the transaction)rrz{} exit the shella‚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 shellr>) Ú isinstanceÚlistr\rr(r"rEÚ print_helprR)r!r`ÚargÚmsgr r r rD£sF"üÿýÿýÿÿ  zShellCommand._helpcCsÌ|r |dnd}|dvr6| dd |dd…¡¡n’|dvr¾|jjj}d}|dd…D]L}| |¡}|r|t||ƒƒd}qXt t d ƒdt d ƒ|jj j   |¡¡qX|r´|j  ¡d|j_n | d ¡dS) Nr©rcNz repolist rAr?)ÚenableÚdisableFTr@zUnknown repo: '%s'r)rQÚjoinr"r:r^r_r1rMZcriticalrÚoutputÚtermÚboldr<Z_compsrD)r!r`rr^r<rÚrr r r Ú_repoÞs$   ÿ  zShellCommand._repoc CsNz|jj |jjj¡Wn0tjjyH}zt|ƒWYd}~n d}~00dSr6) r"r:rr.Z allow_erasingrrKZ DepsolveErrorrR)r!r`rPr r r Ú_resolveøszShellCommand._resolvec Cs’zTt|dƒ�6}| ¡}|D]}| d¡s| |¡qWdƒn1sH0YWn8tyŒt tdƒ|jj j   |¡¡t   d¡Yn0dS)Nrnú#z!Error: Cannot open %s for readingr?)ÚopenÚ readlinesr0rQÚIOErrorrMÚinforr:rkrlrmÚsysr)r!ÚfileÚfdÚlinesrOr r r r8þs  . zShellCommand._run_scriptc CsÚ|r |dnd}|dkr$| ¡dS| ¡|dvrZ|jjrÖ|jj |jj¡}t |¡n||dkrÌz|j ¡WnBt j j y²}z&t  t dƒdt|ƒ¡WYd}~nd}~00t t dƒ¡| ¡n | d¡dS) NrÚresetrgrr@rAz Complete!r)r=rpr:r;rkZlist_transactionrMruZdo_transactionrrKrLrNrrrD)r!r`rÚoutrPr r r r; s" 0 zShellCommand._transactioncCs| dg¡dS)Nr)r;©r!r`r r r Ú_ts_run"szShellCommand._ts_runcCst tdƒ¡t d¡dS)Nz Leaving Shellr)rMrurrvrr|r r r Ú_quit%szShellCommand._quit)N)N)N)N)N)N)N)rrr Úaliasesrr(rr)r*ZsummaryrFrÚ staticmethodr,r5rr=rQrarDrorpr8r;r}r~r r r r r ,s8÷   &  ;    r )Zdnf.clirZdnf.i18nrrZdnf.utilrrrIZloggingrBrvZ getLoggerrMÚobjectrrrr r r r r Ús