%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/sos/policies/distros/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/sos/policies/distros/__pycache__/ubuntu.cpython-312.pyc

�

i��d�
��^�ddlmZddlmZddlmZddlmZddlm	Z	ddl
Z
Gd�de�Zy)	�)�UbuntuPlugin)�DebianPolicy)�SnapPackageManager)�DpkgPackageManager)�MultiPackageManagerNc�z��eZdZdZdZddgZdZdZdZdZ	dZ
		d�fd	�	Zedd
��Z
d�Z�fd�Zd
�Z�fd�Z�xZS)�UbuntuPolicy�Ubuntu�	Canonical)zCommunity Websitezhttps://www.ubuntu.com/)zCommercial Supportzhttps://www.canonical.comzb/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/sbin:/usr/local/bin:/snap/binz,https://files.support.canonical.com/uploads/�ubuntu�putc���tt|�||||��ttt
g|j|��|_|jjd�ddk(rd|_	|xjtgz
c_
y)N)�sysroot�init�
probe_runtime�remote_exec)�primary�	fallbacks�chrootr�	sosreport�pkg_manager�snapz	/snap/bin)�superr	�__init__rrrr�package_manager�pkg_by_name�sos_bin_path�valid_subclassesr)�selfrrrr�	__class__s     ��=/usr/lib/python3/dist-packages/sos/policies/distros/ubuntu.pyrzUbuntuPolicy.__init__!s����
�l�D�*�7��9F�7B�	+�	D� 3�&�)�*��<�<�#�	 %������+�+���*�,�/5�6� +�D�����,��/��c��|r|j|vS	tdd�5}d|j�vcddd�S#1swYyxYw#t$rYywxYw)z[This method checks to see if we are running on Ubuntu.
           It returns True or False.�/etc/lsb-release�rr
NF)�distro�open�read�IOError)�cls�remote�fps   r!�checkzUbuntuPolicy.check3s\��
��:�:��'�'�	��(�#�.�
-�"��2�7�7�9�,�
-�
-�
-���	��	�s*�A�:�	A�A�A�A�	A�Ac��	tdd�5}|j�}|D]<}d|vs�t|jd�dj	��ccddd�S	ddd�y#1swYyxYw#t
tf$rYywxYw)z7 Returns the version stated in DISTRIB_RELEASE
        r$r%�DISTRIB_RELEASE�=�NF)r'�	readlines�int�split�stripr)�
ValueError)rr,�lines�lines    r!�dist_versionzUbuntuPolicy.dist_versionAs���	��(�#�.�
?�"������!�?�D�(�D�0�"�4�:�:�c�?�1�#5�#;�#;�#=�>�>�	
?�
?�?�
?�
�
?�
����$�	��	�s?�A6�A*�,A*�	A6�A*�!A6�*A3�/A6�3A6�6B�Bc���|jj|j�r|j|jfSt
t|��S�N)�
upload_url�
startswith�_upload_url�_upload_user�_upload_passwordrr	�get_upload_https_auth)rr s �r!rAz"UbuntuPolicy.get_upload_https_authNsB����?�?�%�%�d�&6�&6�7��%�%�t�'<�'<�=�=���t�B�D�Dr"c�n�|jj|j�ry|j�S)NzCanonical Support File Server)r<r=r>�get_upload_url)rs r!�get_upload_url_stringz"UbuntuPolicy.get_upload_url_stringTs,���?�?�%�%�d�&6�&6�7�2��&�&�(�(r"c�*��|jr%|jj|j�rP|js|jStj
j
|j�}|j|zStt|�'�Sr;)
r<r=r>�upload_archive_name�os�path�basenamerr	rC)r�fnamer s  �r!rCzUbuntuPolicy.get_upload_urlZsq������$�/�/�"<�"<�T�=M�=M�"N��+�+��'�'�'��G�G�$�$�T�%=�%=�>�E��#�#�e�+�+��\�4�7�9�9r")NNTN)�)�__name__�
__module__�__qualname__r&�vendor�vendor_urls�PATHr>r?r@�_upload_methodr�classmethodr-r9rArDrC�
__classcell__)r s@r!r	r	so���
�F�
�F�8�;��K�9�D�@�K��L����N�>B�!�0�$�����E�)�:�:r"r	)�sos.report.pluginsr�sos.policies.distros.debianr�"sos.policies.package_managers.snapr�"sos.policies.package_managers.dpkgr�sos.policies.package_managersrrGr	�r"r!�<module>r[s'��,�4�A�A�=�	�M:�<�M:r"

Zerion Mini Shell 1.0