%PDF- %PDF-
Direktori : /lib/python3/dist-packages/sos/report/plugins/__pycache__/ |
Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/dnf.cpython-312.pyc |
� i��d� � �0 � d dl mZmZmZ G d� dee� Zy)� )�Plugin�RedHatPlugin� PluginOptc �N � e Zd ZdZdZdZdZdZdZ e ddd � � gZ d� Zd� Zd � Z y)� DNFPlugina� The DNF plugin collects information for the dnf package manager and how it is configured for local system. By default, this plugin will collect configuration files from /etc/dnf, repo files defined in /etc/yum.repos.d/, module information, and various 'dnf list' commands. When using the 'history-info' option, detailed transaction information will be collected for the most recent 50 dnf transactions, and will be saved to the sos_commands/dnf/history-info directory. zdnf package manager�dnf)�system�packagemanager�sysmgmt)�/etc/dnf/dnf.conf)r �history-infoFz$collect detailed transaction history)�default�descc � � |sy |j � D ]6 }d|v s�|j � d }|dk7 s�!| j d|z d�� �8 y )Nz[i]r zHint:zdnf module info �dnf_module_info��tags)� splitlines�split�add_cmd_output)�self�modules�line�modules �8/usr/lib/python3/dist-packages/sos/report/plugins/dnf.py�get_modules_infozDNFPlugin.get_modules_info( sa � ��� �&�&�(� @�D���}�����a����W�$��'�'�(:�V�(C�->� (� @� @� c � � | j ddi� | j g d�� | j dg d��� | j d� r| j d� n3| j d � | j d � | j d� | j dd �� | j g d�� | j dddg�� | j dddg�� | j d� | j ddg� | j g d�� | j d� s| j dd�� n�| j dd�� }d}|d rE|d j � D ]/ } t |j d� d j � � } n t d t |d z d!� � D ] }| j d"|z dd#�$� � d%}| j |� }| j |d � y # t $ r Y ��w xY w)&Nz/etc/dnf/modules.d/.*.module�dnf_modules)z /etc/dnf/z /etc/yum.confz/etc/yum/pluginconf.d/z/etc/yum/vars/z/etc/yum.repos.d/)�yum_repos_d�dnf_repos_d�dnf_repor �all_logsz/var/log/dnf.*z/var/log/dnf.log*z/var/log/dnf.librepo.log*z/var/log/dnf.rpm.log*zdnf module list�dnf_module_list)z dnf --versionzdnf list extraszpackage-cleanup --dupeszpackage-cleanup --problemszdnf list installed�yum_list_installed�dnf_list_installedzdnf -C repolist�yum_repolist�dnf_repolistzdnf -C repolist --verbosez/etc/pki/entitlement/key.pemz/etc/pki/entitlement/*-key.pem)z/etc/pki/product/*.pemz/etc/pki/consumer/cert.pemz/etc/pki/entitlement/*.pemr zdnf history�dnf_history����output�|r � �2 zdnf history info %d�dnf_history_info)�subdirr zdnf module list --installed)� add_file_tags� add_copy_spec� get_optionr �add_forbidden_path�collect_cmd_outputr �intr �strip� ValueError�range�minr )r �history�transactionsr �tr_id� module_cmdr s r �setupzDNFPlugin.setup4 sU � ����*�M� � � ��� � � ���.� J� � L� �?�?�:�&����/�0����2�3����:�;����6�7����-�!2� � 4� ��� � � ���0�"6�8L�!M� � O� ���-�"0�.�!A� � C� ���7�8����*�,�! � � ��� � � ���~�.���� �M��B��-�-�m�3@� .� B�G��L��x� �#�H�-�8�8�:� �D��'*�4�:�:�c�?�1�+=�+C�+C�+E�'F���� �q�#�l�1�n�b�"9�:� =���#�#�$9�E�$A�+9�);� $� =� =� 3� ��)�)�*�5�����g�h�/�0�� &� ���s �/+G:�: H�Hc �f � d}d}dD ] }| j |||� � | j d||� y )Nz(password(\s)*=(\s)*)(\S+)\nz\1********\n)z/etc/yum.repos.d/*z/etc/dnf/vars/*r )�do_path_regex_sub�do_file_sub)r �regexp�repl�fs r �postproczDNFPlugin.postproc~ sD � � 1����:� 4�A��"�"�1�f�d�3� 4� ���,�f�d�;r N)�__name__� __module__�__qualname__�__doc__� short_desc�plugin_name�profiles�files�packagesr �option_listr r? rF � r r r r sL � �� '�J��K�6�H�"�E��H� �.�%�=� ?��K� @�H1�T<r r N)�sos.report.pluginsr r r r rQ r r �<module>rS s �� ?� >�G<��� G<r