403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.12/site-packages/dnf/cli/commands/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.12/site-packages/dnf/cli/commands/__pycache__/module.cpython-312.pyc
�

�j�B���ddlmZddlmZmZddlmZddlmZddl	m
Z
ddl	ZddlZddl
Z
ddlZddlZddlZddlZGd�dej$�Zy)	�)�print_function)�commands�CliError)�_)�NoModuleException)�loggerNc���eZdZGd�dej�ZGd�de�ZGd�de�ZGd�de�ZGd	�d
e�Z	Gd�de�Z
Gd
�de�ZGd�de�ZGd�de�Z
Gd�de�ZGd�de�ZGd�de�Zeeee	e
eee
eeehZehZdZed�Z�fd�Zd�Zd�Zd�Zd�Z�xZS) �
ModuleCommandc�*��eZdZ�fd�Zd�Zd�Z�xZS)�ModuleCommand.SubCommandc���ttj|�|�tj
jj|j�|_y�N)	�superr
�
SubCommand�__init__�dnf�module�module_base�
ModuleBase�base)�self�cli�	__class__s  ��</usr/lib/python3.12/site-packages/dnf/cli/commands/module.pyrz!ModuleCommand.SubCommand.__init__(s9����-�*�*�D�:�3�?�"�z�z�5�5�@�@����K�D��c�N�t�}|jjD�]}|jj	|�\}}|��%|j
r|j
nd}|jr|jnd}|jr|jdk7s|jr-tjtd�j|��|jr|jnd}|jjj!||dd|�}|j#|���|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!�__�nsvcapr#r$r)�moduless	         r�#_get_modules_from_name_stream_specsz<ModuleCommand.SubCommand._get_modules_from_name_stream_specs,s���!$���#�y�y�4�4��!�-�-�:�:�;�G�
��F��>��&,�k�k�v�{�{�r��*0�-�-����R���N�N�v�~�~��';�����K�K��#T�!U�U[�U[�#�V%�&�'-�k�k�v�{�{�r���)�)�4�4�:�:�4���R�QU�V��"�)�)�'�2� 5�&�%rc��t�}t�}|D]L}||vs�|jjj|�s�.|j	|j���N|D]e}t
j|�}|jtjg��D]*}|js�|j|j��,�g||fS)N)�forms)rrr*�isModuleActiver,�getArtifacts�hawkey�Subject�get_nevra_possibilities�
FORM_NEVRAr#�add)	r�use_modules�skip_modules�	artifacts�	pkg_namesr�artifact�subj�	nevra_objs	         r�_get_module_artifact_namesz3ModuleCommand.SubCommand._get_module_artifact_names>s�����I���I�%����-��y�y�1�1�@�@��H�!�(�(��)<�)<�)>�?�&�&���~�~�h�/��!%�!=�!=�%�0�0�1�">�"3�I� �~�~�!�
�
�i�n�n�5�"3�&��i�'�'r)�__name__�
__module__�__qualname__rr1rB�
__classcell__�rs@rrr&s���	L�	&�$
	(rrc�,�eZdZdZed�Zd�Zd�Zy)�ModuleCommand.ListSubCommand)�listz,list all module streams, profiles and statesc�L�|jj}d|_d|_y�NT�r�demands�available_repos�sack_activation�rrNs  r�	configurez&ModuleCommand.ListSubCommand.configureR�!���h�h�&�&�G�&*�G�#�&*�G�#rc��|j}|jjrJ|j|jjt
jjj�}�n|jjrI|j|jjt
jjj�}n�|jjrI|j|jjt
jjj�}nH|j|jjt
jjj�}|rt|�y|jjr*td�}t j"j%|��y�NzNo matching Modules to list)rr �enabled�_get_brief_descriptionr!�libdnfr�ModulePackageContainer�ModuleState_ENABLED�disabled�ModuleState_DISABLED�	installed�ModuleState_INSTALLED�ModuleState_UNKNOWN�printrr�
exceptions�Error)r�mods�output�msgs    r�
run_on_modulez*ModuleCommand.ListSubCommand.run_on_moduleWs9���#�#�D��y�y� � ��4�4��I�I�)�)�6�=�=�+O�+O�+c�+c�e�����#�#��4�4��I�I�)�)��M�M�8�8�M�M�O�����$�$��4�4��I�I�)�)��M�M�8�8�N�N�P���4�4��I�I�)�)�6�=�=�+O�+O�+c�+c�e����f�
���y�y�$�$��5�6���n�n�*�*�3�/�/�%rN�rCrDrE�aliasesr�summaryrRrf�rr�ListSubCommandrIMs�����B�C��	+�
	0rrkc�,�eZdZdZed�Zd�Zd�Zy)�ModuleCommand.InfoSubCommand)r'z)print detailed information about a modulec�L�|jj}d|_d|_yrLrMrQs  rrRz&ModuleCommand.InfoSubCommand.configuretrSrc���|jjr0|jj|jj�}nu|jj
r0|jj
|jj�}n/|jj|jj�}|rt|�ytjjtd���rU)
r �verboser�_get_full_infor!�profile�_get_info_profiles�	_get_infor`rrarbr�rrds  rrfz*ModuleCommand.InfoSubCommand.run_on_moduleys����y�y� � ��)�)�8�8����9N�9N�O�����"�"��)�)�<�<�T�Y�Y�=R�=R�S���)�)�3�3�D�I�I�4I�4I�J����f�
��n�n�*�*�1�-J�+K�L�LrNrgrjrr�InfoSubCommandrmos�����?�@��	+�

	Mrrvc�,�eZdZdZed�Zd�Zd�Zy)�ModuleCommand.EnableSubCommand)�enablezenable a module streamc�h�|jj}d|_d|_d|_d|_yrL�rrNrOrP�	resolving�	root_userrQs  rrRz(ModuleCommand.EnableSubCommand.configure��1���h�h�&�&�G�&*�G�#�&*�G�#� $�G�� $�G�rc���	|jj|jj�y#tj
j$r�}|jjjr\|js|jr|�|jr6|jdtjjj k7r|�t#j$t'|��Yd}~yd}~wwxYw�N�)rryr r!rra�
MarkingErrorsr�conf�strict�no_match_group_specs�error_group_specs�module_depsolv_errorsrXrrY�!ModuleErrorType_ERROR_IN_DEFAULTSr�error�str�r�es  rrfz,ModuleCommand.EnableSubCommand.run_on_module�s���	
%�� � �'�'��	�	�(=�(=�>���>�>�/�/�
%��9�9�>�>�(�(��-�-��1D�1D����.�.�1�3J�3J�1�3M�"�M�M�@�@�b�b�4c������S��V�$�$��
%���/2�C3�BC.�.C3Nrgrjrr�EnableSubCommandrx�s�����,�-��	%�
	%rr�c�,�eZdZdZed�Zd�Zd�Zy)�ModuleCommand.DisableSubCommand)�disablez%disable a module with all its streamsc�h�|jj}d|_d|_d|_d|_yrLr{rQs  rrRz)ModuleCommand.DisableSubCommand.configure�r~rc���	|jj|jj�y#tj
j$r�}|jjjr\|js|jr|�|jr6|jdtjjj k7r|�t#j$t'|��Yd}~yd}~wwxYwr�)rr�r r!rrar�rr�r�r�r�r�rXrrYr�rr�r�r�s  rrfz-ModuleCommand.DisableSubCommand.run_on_module�s���	
%�� � �(�(����)>�)>�?���>�>�/�/�
%��9�9�>�>�(�(��-�-��1D�1D����.�.�1�3J�3J�1�3M�"�M�M�@�@�b�b�4c������S��V�$�$��
%�r�Nrgrjrr�DisableSubCommandr��s�����;�<��	%�
	%rr�c�,�eZdZdZed�Zd�Zd�Zy)�ModuleCommand.ResetSubCommand)�resetzreset a modulec�h�|jj}d|_d|_d|_d|_yrLr{rQs  rrRz'ModuleCommand.ResetSubCommand.configure�r~rc�P�	|jj|jj�y#tj
j$rV}|jjjr|jr|�tjt|��Yd}~yd}~wwxYwr)rr�r r!rrar�rr�r�r�rr�r�r�s  rrfz+ModuleCommand.ResetSubCommand.run_on_module�sq��
%�� � �&�&�t�y�y�'<�'<�=���>�>�/�/�
%��9�9�>�>�(�(��-�-������S��V�$�$��	
%�s�/2�B%�AB � B%Nrgrjrr�ResetSubCommandr��s�����$�%��	%�	%rr�c�,�eZdZdZed�Zd�Zd�Zy)�ModuleCommand.InstallSubCommand)�installz/install a module profile including its packagesc�h�|jj}d|_d|_d|_d|_yrLr{rQs  rrRz)ModuleCommand.InstallSubCommand.configure�r~rc��	|jj|jj|jj
j�y#tjj$rb}|jj
jr|js|jr|�tjt|��Yd}~yd}~wwxYwr)rr�r r!rr�r�rrar�r�r�rr�r�r�s  rrfz-ModuleCommand.InstallSubCommand.run_on_module�s���
%�� � �(�(����)>�)>��	�	���@U�@U�V���>�>�/�/�
%��9�9�>�>�(�(��-�-��1D�1D������S��V�$�$��	
%�s�AA�C�.AC�CNrgrjrr�InstallSubCommandr��s�����E�F��	%�	%rr�c�,�eZdZdZed�Zd�Zd�Zy)�ModuleCommand.UpdateSubCommand)r,z0update packages associated with an active streamc�h�|jj}d|_d|_d|_d|_yrLr{rQs  rrRz(ModuleCommand.UpdateSubCommand.configure�r~rc��|jj|jj�}|rt	dj|���y)Nz, )r�upgrader r!r�join)r�module_specss  rrfz,ModuleCommand.UpdateSubCommand.run_on_module�s>���+�+�3�3�D�I�I�4I�4I�J�L��'��	�	�,�(?�@�@�rNrgrjrr�UpdateSubCommandr��s�����F�G��	%�	Arr�c�,�eZdZdZed�Zd�Zd�Zy)�ModuleCommand.RemoveSubCommand)�remove�erasez3remove installed module profiles and their packagesc��|jj}d|_d|_d|_d|_d|_d|_y)NTF)rrN�
allow_erasingrO�fresh_metadatar|r}rPrQs  rrRz(ModuleCommand.RemoveSubCommand.configure�sA���h�h�&�&�G�$(�G�!�&*�G�#�%*�G�"� $�G�� $�G��&*�G�#rc���|jj|jj�}|jj�rh|j�}|j
|t��\}}|j
|jjj�|�\}}|jjj�j�j|��}|jjj�j�j|��}|D]{}||vr0td�j!|�}	t#j$|	��7|jj&j)||jj*j,���}|syt#j.t0j2j5|���y)N�r#z0Package {} belongs to multiple modules, skipping)�
clean_deps)r�)rr�r r!�allr1rBrrr*�getModulePackages�sackr+r]�filtermrr(rr'�goalr�r��clean_requirements_on_remover�rrar�)
r�skipped_groupsr-�remove_names_from_specr.�
keep_names�remove_query�
keep_query�pkgres
          rrfz,ModuleCommand.RemoveSubCommand.run_on_module�sq��!�-�-�4�4�T�Y�Y�5J�5J�K�N��y�y�}�}�%)�%M�%M�%O�"�-1�-L�-L�&���./�*�&��!%�!@�!@��I�I�.�.�@�@�B�DV�"X��
�B�#�y�y�~�~�3�3�5�?�?�A�I�I�/� J� 1��!�Y�Y�^�^�1�1�3�=�=�?�G�G�Z�G�X�
�'�C��j�(�� R�S�Z�Z�[^�_�����C�(��	�	���,�,��D�I�I�N�N�,W�,W�-�Y�(�"���L�L����5�5�>�5�Z�[rNrgrjrr�RemoveSubCommandr��s��&���I�J��	+�	\rr�c�,�eZdZdZed�Zd�Zd�Zy)� ModuleCommand.SwitchToSubCommand)z	switch-toz7switch a module to a stream and distrosync rpm packagesc��|jj}d|_d|_d|_d|_d|jj_yrL)	rrNrOrPr|r}rr��module_stream_switchrQs  rrRz*ModuleCommand.SwitchToSubCommand.configuresA���h�h�&�&�G�&*�G�#�&*�G�#� $�G�� $�G��26�D�I�I�N�N�/rc��	|jj|jj|jj
j��y#tjj$rb}|jj
jr|js|jr|�tjt|��Yd}~yd}~wwxYw)N)r�)r�	switch_tor r!rr�r�rrar�r�r�rr�r�r�s  rrfz.ModuleCommand.SwitchToSubCommand.run_on_module"s���
%�� � �*�*�4�9�9�+@�+@������I^�I^�*�_���>�>�/�/�
%��9�9�>�>�(�(��-�-��1D�1D������S��V�$�$��	
%�s�AA�C�/AC�CNrgrjrr�SwitchToSubCommandr�s�� ���M�N��	7�	%rr�c�,�eZdZdZed�Zd�Zd�Zy)� ModuleCommand.ProvidesSubCommand)�providesz.locate a module the modular packages belong toc�L�|jj}d|_d|_yrLrMrQs  rrRz*ModuleCommand.ProvidesSubCommand.configure0rSrc�~�|jj|jj�}|rt	|�yyr)r�_what_providesr r!r`rus  rrfz.ModuleCommand.ProvidesSubCommand.run_on_module5s1���%�%�4�4�T�Y�Y�5J�5J�K�F���f�
�rNrgrjrr�ProvidesSubCommandr�+s�� ���D�E��	+�
	rr�c�,�eZdZdZed�Zd�Zd�Zy)�!ModuleCommand.RepoquerySubCommand)�	repoqueryz#list packages belonging to a modulec�L�|jj}d|_d|_yrLrMrQs  rrRz+ModuleCommand.RepoquerySubCommand.configure?rSrc�T�t�}|jjD]1}|jj	|�\}}|j|��3|j
|t��\}}t�}|jjs|jjsc|jjj�j�j|��}|D]}	|jt|	���|jjrc|jjj�j�j|��}|D]}	|jt|	���djt!|��}
t#|
�y)N)�nevra_strictr��
)rr r!rr"r,rB�	availabler]rr�r+r�r:r�r��sortedr`)rr-r!r0r.�names_from_spec�spec_artifacts�package_stringsr+r�rds           rrfz/ModuleCommand.RepoquerySubCommand.run_on_moduleDs@��!$���#�y�y�4�4��"�.�.�;�;�K�H����"�)�)�'�2� 5�/3�.M�.M�"�C�E�/+�+�O�^�!�e�O��y�y�"�"�$�)�)�*=�*=��	�	���,�,�.�8�8�:�B�B�P^�B�_�� �C�#�'�'��C��1�!��y�y�"�"��	�	���,�,�.�8�8�:�B�B��B�X�� �C�#�'�'��C��1�!��Y�Y�v�o�6�7�F��&�MrNrgrjrr�RepoquerySubCommandr�:s��!���9�:��	+�
	rr�)rzxInteract with Modules. WARNING: modularity is deprecated, and functionality will be removed in a future release of DNF5.c�����tt|����fd�|jD�}d|_|D��cic]}|j
D]}||���c}}|_ycc}}w)Nc3�.�K�|]}|�����y�wrrj)�.0�subcmdrs  �r�	<genexpr>z)ModuleCommand.__init__.<locals>.<genexpr>ds�����>��v�v�c�{��s�)rr
r�SUBCMDSr�rh�_subcmd_name2obj)rr�subcmd_objsr��aliasrs `   �rrzModuleCommand.__init__bs[���
�m�T�+�C�0�>����>�����(3�!Q�(3�f�����E�6�M��E��!Q����!Qs�Ac	��|j�}|jdddtd���|jdddtd���|jd	d
dtd���|jdd
dtd���|jdddtd���|jdddtd���g}g}t|jd���D]\}|j|jd�|jdj|jd|jxsd���^|jdd|ddj|���|jdd d!td"��#�y)$Nz	--enabledrV�
store_truezshow only enabled modules)�dest�action�helpz
--disabledr[zshow only disabled modulesz--installedr]z'show only installed modules or packagesz	--profilerrzshow profile contentz--availabler�zshow only available packagesz--allr�zremove all modular packagesc� �|jdS)Nr)rh)�xs r�<lambda>z-ModuleCommand.set_argparser.<locals>.<lambda>~s�����1�r)�keyrz{}: {}rr�r�z<modular command>r�)�nargs�choices�metavarr�r!zmodule-spec�*zModule specification)r�r�r�)
�add_mutually_exclusive_group�add_argumentrr�r��appendrhr(rir�)r�parser�narrows�subcommand_choices�subcommand_helpr�s      r�
set_argparserzModuleCommand.set_argparseris����5�5�7�����[�y�$0�"#�$?�"@�	�	B�	���\�
�$0�"#�$@�"A�	�	C�	���]��$0�"#�$M�"N�	�	P�	���[�y�$0�"#�$:�";�	�	=�	���M��L�!"�#A�!B�	�	D����W�5�$0�"#�$A�"B�	�	D� �����T�\�\�/E�F�F��%�%�f�n�n�Q�&7�8��"�"�8�?�?�6�>�>�!�3D�f�n�n�FZ�XZ�#[�\�G�	���H�A�7I�$7�!%���?�!;�	�	=�	���M�=��!"�#9�!:�	�	<rc�|�tjtd��	|j|jj
d|_|j|j
_|j
j�y#ttf$r+|jjj�t�wxYw)NzaWARNING: modularity is deprecated, and functionality will be removed in a future release of DNF5.r)r�warningrr�r r�r�KeyErrorr�	optparser�print_usagerR�rs rrRzModuleCommand.configure�s������q�|�}�~�	��/�/��	�	�0@�0@��0C�D�D�K� �9�9������������	�(�#�	��H�H���*�*�,��N�	�s�+B�:B;c�X�|j�|jj�yr)�check_required_argumentr�rfr�s r�runzModuleCommand.run�s���$�$�&����!�!�#rc��|jD��cgc]}|jD]}|���}}}|jjd|vr|jjshtt
d�jtjj|jj|jjd���yycc}}w)Nrz{} {} {}: too few arguments)�SUBCMDS_NOT_REQUIRED_ARGrhr r�r!rrr(r�util�	MAIN_PROG�command)rr�r��not_required_arguments    rrz%ModuleCommand.check_required_argument�s���/3�/L�/L�!>�/L�V�.4�n�n�U�"'�.<�"'�/L�	�!>��9�9���A��&;�;��9�9�(�(���3�4�;�;�C�H�H�<N�<N�<@�I�I�<M�<M�<@�I�I�<L�<L�Q�<O�Q�R�R�)�<��!>s�C)rCrDrEr�Commandrrkrvr�r�r�r�r�r�r�r�r�r�rrhrrirr�rRrrrFrGs@rr
r
%s���%(�X�%�%�%(�N 0�� 0�DM��M�,%�:�%�0%�J�%�0%�*�%�*%�J�%�*A�:�A�"#\�:�#\�J%�Z�%�,
�Z�
��j��>�~�/?� �/�3D�FV��!3�5G�I\�^�G�!/�/���G��K�L�G�Q�<�< �$�	Rrr
)�
__future__r�dnf.clirr�dnf.i18nr�dnf.module.exceptionsr�dnf.utilrr�sys�osr6rX�dnf.module.module_base�dnf.exceptionsrr
rjrr�<module>rsA��(&�&��3���
�	�
�
���yR�H�$�$�yRr

Youez - 2016 - github.com/yon3zu
LinuXploit