/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__/module.cpython-39.pyc (14467B)
a ©!cÙAã@sŽddlmZddlmZmZddlmZddlmZddl m Z ddl Z ddl Z ddl Z ddlZddlZddlZ ddlZ Gdd„dejƒZdS) é)Úprint_function)ÚcommandsÚCliError)Ú_)ÚNoModuleException)ÚloggerNc s*eZdZGdd„dejƒZGdd„deƒZGdd„deƒZGdd„deƒZGd d „d eƒZ Gd d „d eƒZ Gd d„deƒZ Gdd„deƒZ Gdd„deƒZ Gdd„deƒZGdd„deƒZGdd„deƒZeeee e e e e eeeh ZehZdZedƒZ‡fdd„Zdd„Zdd „Zd!d"„Zd#d$„Z‡ZS)%Ú ModuleCommandcs,eZdZ‡fdd„Zdd„Zdd„Z‡ZS)zModuleCommand.SubCommandcs(ttj|ƒ |¡tjj |j¡|_dS©N) ÚsuperrÚ SubCommandÚ__init__ÚdnfÚmoduleÚ module_baseZ ModuleBaseÚbase)ÚselfÚcli©Ú __class__©ú;/usr/lib/python3.9/site-packages/dnf/cli/commands/module.pyr (sz!ModuleCommand.SubCommand.__init__c Cs¬tƒ}|jjD]˜}|j |¡\}}|dur,q|jr8|jnd}|jrH|jnd}|jr\|jdksb|jrvt   t dƒ  |¡¡|j r‚|j nd}|jj ||dd|¡}| |¡q|S)NÚéÿÿÿÿzjOnly module name, stream, architecture or profile is used. Ignoring unneeded information in argument: '{}')ÚsetÚoptsÚ module_specrÚ _get_modulesÚnameÚstreamÚversionÚcontextrÚinforÚformatÚarchrÚ_moduleContainerÚqueryÚupdate) rÚmodules_from_specsrÚ__Znsvcaprrr#ÚmodulesrrrÚ#_get_modules_from_name_stream_specs,s  þ z||fS)N)Zforms) rrr$ZisModuleActiver&Z getArtifactsÚhawkeyZSubjectZget_nevra_possibilitiesZ FORM_NEVRArÚadd) rZ use_modulesZ skip_modulesZ artifactsZ pkg_namesrZartifactZsubjZ nevra_objrrrÚ_get_module_artifact_names>s ÿ z3ModuleCommand.SubCommand._get_module_artifact_names)Ú__name__Ú __module__Ú __qualname__r r*r-Ú __classcell__rrrrr &s r c@s(eZdZdZedƒZdd„Zdd„ZdS)zModuleCommand.ListSubCommand)Úlistz,list all module streams, profiles and statescCs|jj}d|_d|_dS©NT©rÚdemandsÚavailable_reposÚsack_activation©rr5rrrÚ configureRsz&ModuleCommand.ListSubCommand.configurecCs¬|j}|jjr&| |jjtjjj¡}nV|jj rF| |jjtjjj ¡}n6|jj rf| |jjtjjj ¡}n| |jjtjjj ¡}|rŒt|ƒdS|jjr¨tdƒ}tj |¡‚dS©NzNo matching Modules to list)rrÚenabledZ_get_brief_descriptionrÚlibdnfrÚModulePackageContainerZModuleState_ENABLEDÚdisabledZModuleState_DISABLEDÚ installedZModuleState_INSTALLEDZModuleState_UNKNOWNÚprintrr Ú exceptionsÚError)rZmodsÚoutputÚmsgrrrÚ run_on_moduleWs0ÿþþÿz*ModuleCommand.ListSubCommand.run_on_moduleN©r.r/r0ÚaliasesrÚsummaryr9rErrrrÚListSubCommandMsrIc@s(eZdZdZedƒZdd„Zdd„ZdS)zModuleCommand.InfoSubCommand)r!z)print detailed information about a modulecCs|jj}d|_d|_dSr3r4r8rrrr9tsz&ModuleCommand.InfoSubCommand.configurecCsf|jjr|j |jj¡}n*|jjr4|j |jj¡}n|j |jj¡}|rRt|ƒnt j   t dƒ¡‚dSr:) rÚverboserZ_get_full_inforÚprofileZ_get_info_profilesZ _get_infor@r rArBr©rrCrrrrEys z*ModuleCommand.InfoSubCommand.run_on_moduleNrFrrrrÚInfoSubCommandosrMc@s(eZdZdZedƒZdd„Zdd„ZdS)zModuleCommand.EnableSubCommand)Úenablezenable a module streamcCs$|jj}d|_d|_d|_d|_dSr3©rr5r6r7Ú resolvingÚ root_userr8rrrr9Šs z(ModuleCommand.EnableSubCommand.configurec Csˆz|j |jj¡Wnntjjy‚}zR|jjj r`|j s>|j rB|‚|j r`|j dt jjjkr`|‚t t|ƒ¡WYd}~n d}~00dS©Né)rrNrrr rAÚ MarkingErrorsrÚconfÚstrictÚno_match_group_specsÚerror_group_specsÚmodule_depsolv_errorsr<rr=Ú!ModuleErrorType_ERROR_IN_DEFAULTSrÚerrorÚstr©rÚerrrrE‘s  ÿz,ModuleCommand.EnableSubCommand.run_on_moduleNrFrrrrÚEnableSubCommand…sr_c@s(eZdZdZedƒZdd„Zdd„ZdS)zModuleCommand.DisableSubCommand)Údisablez%disable a module with all its streamscCs$|jj}d|_d|_d|_d|_dSr3rOr8rrrr9¢s z)ModuleCommand.DisableSubCommand.configurec Csˆz|j |jj¡Wnntjjy‚}zR|jjj r`|j s>|j rB|‚|j r`|j dt jjjkr`|‚t t|ƒ¡WYd}~n d}~00dSrR)rr`rrr rArTrrUrVrWrXrYr<rr=rZrr[r\r]rrrrE©s  ÿz-ModuleCommand.DisableSubCommand.run_on_moduleNrFrrrrÚDisableSubCommand�srac@s(eZdZdZedƒZdd„Zdd„ZdS)zModuleCommand.ResetSubCommand)Úresetzreset a modulecCs$|jj}d|_d|_d|_d|_dSr3rOr8rrrr9ºs z'ModuleCommand.ResetSubCommand.configurec Csdz|j |jj¡WnJtjjy^}z.|jjj r<|j r<|‚t   t |ƒ¡WYd}~n d}~00dSr )rrbrrr rArTrrUrVrWrr[r\r]rrrrEÁs z+ModuleCommand.ResetSubCommand.run_on_moduleNrFrrrrÚResetSubCommandµsrcc@s(eZdZdZedƒZdd„Zdd„ZdS)zModuleCommand.InstallSubCommand)Úinstallz/install a module profile including its packagescCs$|jj}d|_d|_d|_d|_dSr3rOr8rrrr9Ïs z)ModuleCommand.InstallSubCommand.configurec Csrz|j |jj|jjj¡WnPtjj yl}z4|jjjrJ|j sF|j rJ|‚t   t|ƒ¡WYd}~n d}~00dSr )rrdrrrrUrVr rArTrWrXrr[r\r]rrrrEÖs  z-ModuleCommand.InstallSubCommand.run_on_moduleNrFrrrrÚInstallSubCommandÊsrec@s(eZdZdZedƒZdd„Zdd„ZdS)zModuleCommand.UpdateSubCommand)r&z0update packages associated with an active streamcCs$|jj}d|_d|_d|_d|_dSr3rOr8rrrr9äs z(ModuleCommand.UpdateSubCommand.configurecCs&|j |jj¡}|r"td |¡ƒ‚dS)Nz, )rZupgraderrrÚjoin)rZ module_specsrrrrEësz,ModuleCommand.UpdateSubCommand.run_on_moduleNrFrrrrÚUpdateSubCommandßsrgc@s(eZdZdZedƒZdd„Zdd„ZdS)zModuleCommand.RemoveSubCommand)ÚremoveÚerasez3remove installed module profiles and their packagescCs0|jj}d|_d|_d|_d|_d|_d|_dS)NTF)rr5Z allow_erasingr6Zfresh_metadatarPrQr7r8rrrr9õsz(ModuleCommand.RemoveSubCommand.configurec CsÞ|j |jj¡}|jjr¾| ¡}| |tƒ¡\}}| |jj   ¡|¡\}}|jj   ¡  ¡j|d�}|jj   ¡  ¡j|d�}|D]>}||vr¤tdƒ |¡} t | ¡q~|jjj||jjjd�q~|sÆdSt tjj|d�¡dS)N©rz0Package {} belongs to multiple modules, skipping)Z clean_deps)rW)rrhrrÚallr*r-rrr$ZgetModulePackagesÚsackr%r?Úfiltermrr"rr!ZgoalrirUZclean_requirements_on_remover[r rArT) rZskipped_groupsr'Zremove_names_from_specr(Z keep_namesZ remove_queryZ keep_queryÚpkgrDrrrrEþs.ÿ ÿÿ  ÿz,ModuleCommand.RemoveSubCommand.run_on_moduleNrFrrrrÚRemoveSubCommandðs roc@s(eZdZdZedƒZdd„Zdd„ZdS)z ModuleCommand.SwitchToSubCommand)z switch-toz7switch a module to a stream and distrosync rpm packagescCs.|jj}d|_d|_d|_d|_d|jj_dSr3) rr5r6r7rPrQrrUZmodule_stream_switchr8rrrr9s z*ModuleCommand.SwitchToSubCommand.configurec Cstz|jj|jj|jjjd�WnPtjj yn}z4|jjjrL|j sH|j rL|‚t   t|ƒ¡WYd}~n d}~00dS)N)rV)rZ switch_torrrrUrVr rArTrWrXrr[r\r]rrrrE"s  z.ModuleCommand.SwitchToSubCommand.run_on_moduleNrFrrrrÚSwitchToSubCommandsrpc@s(eZdZdZedƒZdd„Zdd„ZdS)z ModuleCommand.ProvidesSubCommand)Zprovideszlist modular packagescCs|jj}d|_d|_dSr3r4r8rrrr90sz*ModuleCommand.ProvidesSubCommand.configurecCs |j |jj¡}|rt|ƒdSr )rZ_what_providesrrr@rLrrrrE5sz.ModuleCommand.ProvidesSubCommand.run_on_moduleNrFrrrrÚProvidesSubCommand+srqc@s(eZdZdZedƒZdd„Zdd„ZdS)z!ModuleCommand.RepoquerySubCommand)Z repoqueryz#list packages belonging to a modulecCs|jj}d|_d|_dSr3r4r8rrrr9?sz+ModuleCommand.RepoquerySubCommand.configurec CsØtƒ}|jjD]}|j |¡\}}| |¡q| |tƒ¡\}}tƒ}|jjsV|jjs†|j j   ¡ ¡j |d�}|D]} |  t| ƒ¡qr|jjr¾|j j   ¡ ¡j |d�}|D]} |  t| ƒ¡qªd t|ƒ¡} t| ƒdS)N)Z nevra_strictrjÚ )rrrrrr&r-Ú availabler?rrlr%rmr,r\rfÚsortedr@) rr'rr)r(Znames_from_specZspec_artifactsZpackage_stringsr%rnrCrrrrEDs$  ÿz/ModuleCommand.RepoquerySubCommand.run_on_moduleNrFrrrrÚRepoquerySubCommand:sru)rzInteract with Modules.cs>tt|ƒ ˆ¡‡fdd„|jDƒ}d|_dd„|Dƒ|_dS)Nc3s|]}|ˆƒVqdSr r)Ú.0Úsubcmd©rrrÚ dóz)ModuleCommand.__init__..cSsi|]}|jD] }||“qqSr©rG©rvrwÚaliasrrrÚ fsz*ModuleCommand.__init__..)r rr ÚSUBCMDSrwÚ_subcmd_name2obj)rrZ subcmd_objsrrxrr bs ÿzModuleCommand.__init__cCs| ¡}|jdddtdƒd�|jdddtdƒd�|jd d dtd ƒd�|jd d dtdƒd�|jdddtdƒd�|jdddtdƒd�g}g}t|jdd„d�D]2}| |jd¡| d |jd|jpÒd¡¡q¦|jdd|dd  |¡d�|jd d!d"td#ƒd$�dS)%Nz --enabledr;Ú store_truezshow only enabled modules)ÚdestÚactionÚhelpz --disabledr>zshow only disabled modulesz --installedr?z'show only installed modules or packagesz --profilerKzshow profile contentz --availablerszshow only available packagesz--allrkzremove all modular packagescSs |jdS©Nrr{)ÚxrrrÚ~rzz-ModuleCommand.set_argparser..)Úkeyrz{}: {}rrwrSzrr)ÚnargsÚchoicesÚmetavarr„rz module-specÚ*zModule specification)r‹r‰r„) Úadd_mutually_exclusive_groupÚ add_argumentrrtrÚappendrGr"rHrf)rÚparserZnarrowsZsubcommand_choicesZsubcommand_helprwrrrÚ set_argparserisHþþþþ ÿþ  þ ÿzModuleCommand.set_argparserc CsXz|j|jjd|_Wn&ttfy>|jj ¡t‚Yn0|j|j_|j ¡dSr…) r€rrwrÚKeyErrorrZ optparserÚ print_usager9©rrrrr9‡s   zModuleCommand.configurecCs| ¡|j ¡dSr )Úcheck_required_argumentrwrEr”rrrÚrun�szModuleCommand.runcCsRdd„|jDƒ}|jjd|vrN|jjsNttdƒ tjj |jj |jjd¡ƒ‚dS)NcSsg|]}|jD]}|‘qqSrr{r|rrrÚ •s þz9ModuleCommand.check_required_argument..rz{} {} {}: too few arguments) ÚSUBCMDS_NOT_REQUIRED_ARGrrwrrrr"r ÚutilZ MAIN_PROGZcommand)rZnot_required_argumentrrrr•”sÿ þÿz%ModuleCommand.check_required_argument)r.r/r0rÚCommandr rIrMr_rarcrergrorprqrurr˜rGrrHr r‘r9r–r•r1rrrrr%s0'"%þ  r)Z __future__rZdnf.clirrZdnf.i18nrZdnf.module.exceptionsrZdnf.utilrr ÚsysÚosr+r<Zdnf.module.module_baseZdnf.exceptionsršrrrrrÚs