%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/uaclient/entitlements/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/uaclient/entitlements/__pycache__/esm.cpython-312.pyc

�

��>f�����ddlZddlmZmZmZddlmZmZmZddl	m
Z
mZmZddl
mZddlmZddlmZddlmZdd	lmZGd
�dej.�ZGd�d
e�ZGd�de�Zy)�N)�Tuple�Type�Union)�api�messages�system)�APT_KEYS_DIR�DEB822_REPO_FILE_CONTENT�KEYRINGS_DIR)�ESM_APT_ROOTDIR)�repo)�
UAEntitlement)�CanDisableFailure)�set_filename_extensionc���eZdZejj
Zedee	e
dffd��Zdejdef�fd�Zdd�Zdd�Z�xZS)	�ESMBaseEntitlement�return.c��ddlm}m}||fS)Nr)�ROSEntitlement�ROSUpdatesEntitlement)�uaclient.entitlements.rosrr)�selfrrs   �;/usr/lib/python3/dist-packages/uaclient/entitlements/esm.py�dependent_servicesz%ESMBaseEntitlement.dependent_servicess��	
�
&�~�6�6��progressc�z��ddlm}t�|�
|�}|r"||j�|j�|S�Nr)�update_motd_messages)�uaclient.timer.update_messagingr�super�_perform_enable�cfg�disable_local_esm_repo)rrr�enable_performed�	__class__s    �rr"z"ESMBaseEntitlement._perform_enables7���H� �7�2�8�<��� ����*��'�'�)��rc
���tj�j}|jj	d�sJ�|jtd�d}t
tjjt|jz�d�}t
tjjt|jz�d�}tjj|�stjj|�rydj|��}dj||��}tj|tj||t |j"d�	��y)
Nzesm-�sources�listz$https://esm.ubuntu.com/{name}/ubuntu)�namez0{series}-{name}-security {series}-{name}-updates)�seriesr*�)�url�suites�keyrings_dir�keyring_file�deb_src)r�get_release_infor+r*�
startswith�lenr�os�path�normpathr�	repo_file�exists�format�
write_filer
r�
repo_key_file)rr+�esm_name�sources_repo_filename�list_repo_filename�esm_urlr.s       r�setup_local_esm_repoz'ESMBaseEntitlement.setup_local_esm_repo"s.���(�(�*�1�1���y�y�#�#�F�+�+�+��9�9�S��[�]�+�� 6��G�G����$�.�.�0�
�
�	!
��4��G�G����$�.�.�0�
�
�	
���7�7�>�>�/�0�B�G�G�N�N��5
�
�8�?�?�X�?�N��C�J�J���K�
��
	���!�$�+�+���)�!�/�/��
�		
rc�x�tjjttz|j
z�}t
j|�tjjt|jz�}t
jt|d��t
jt|d��y)Nr(r))
r5r6r7rr	r<r�ensure_file_absentr8r)rr0�
repo_filenames   rr$z)ESMBaseEntitlement.disable_local_esm_repoKs����w�w�'�'��l�*�T�-?�-?�?�
��	�!�!�,�/����(�(��d�n�n�,�
�
�	�!�!�"�=�)�<�	
�	�!�!�"�=�&�9�	
r)rN)�__name__�
__module__�__qualname__r�urls�
ESM_HOME_PAGE�help_doc_url�propertyrrrrr�ProgressWrapper�boolr"rAr$�
__classcell__�r&s@rrr
s^����=�=�.�.�L�
�7�E�$�}�*=�s�*B�$C�7��7� ��(;�(;� �� �'
�R
rrc���eZdZdZdZejZejZ	ejZdZde
jdeeedefff�fd�Z�xZS)�ESMAppsEntitlement�
UbuntuESMAppszesm-appszubuntu-pro-esm-apps.gpgrrNc���ddlm}t�|�
|�\}}|r6||j�tj�r|j�||fSr)r rr!�disabler#r�is_current_series_ltsrA�rrr�disable_performed�failr&s     �rrTzESMAppsEntitlement.disableesO���	I�"'�'�/�(�";���4�� ����*��+�+�-��)�)�+� �$�&�&r)rErFrG�originr*r�ESM_APPS_TITLE�title�ESM_APPS_DESCRIPTION�description�ESM_APPS_HELP_TEXT�	help_textr<rrLrrMrrrTrNrOs@rrQrQ]sh���
�F��D��#�#�E��/�/�K��+�+�I�-�M�
'��+�+�
'�	�t�U�4�!2�2�3�3�	4�
'�
'rrQc���eZdZdZdZejZejZ	ejZdZde
jdeeedefff�fd�Z�xZS)�ESMInfraEntitlementz	esm-infra�	UbuntuESMzubuntu-pro-esm-infra.gpgrrNc���ddlm}t�|�
|�\}}|r6||j�tj�r|j�||fSr)r rr!rTr#r�is_current_series_active_esmrArVs     �rrTzESMInfraEntitlement.disablezsO���	I�"'�'�/�(�";���4�� ����*��2�2�4��)�)�+� �$�&�&r)rErFrGr*rYr�ESM_INFRA_TITLEr[�ESM_INFRA_DESCRIPTIONr]�ESM_INFRA_HELP_TEXTr_r<rrLrrMrrrTrNrOs@rrararsh����D�
�F��$�$�E��0�0�K��,�,�I�.�M�
'��+�+�
'�	�t�U�4�!2�2�3�3�	4�
'�
'rra)r5�typingrrr�uaclientrrr�uaclient.aptr	r
r�uaclient.defaultsr�uaclient.entitlementsr
�uaclient.entitlements.baser�(uaclient.entitlements.entitlement_statusr�
uaclient.utilr�RepoEntitlementrrQra�rr�<module>rrsX��	�%�%�*�*�M�M�-�&�4�F�0�M
��-�-�M
�`'�+�'�*'�,�'r

Zerion Mini Shell 1.0