%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/softwareproperties/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/softwareproperties/__pycache__/ppa.cpython-312.pyc

�

��f1%����ddlmZddlmZddlmZmZmZddlm	Z	m
Z
mZddlm
Z
ddlmZddlmZddlmZd	Zd
Zee�j,ee�j,ddgZd
dgZGd�de	�Zy)�)�gettext)�	Launchpad)�NotFound�
BadRequest�Unauthorized)�ShortcutHandler�ShortcutException�InvalidShortcutException)�SourcesListShortcutHandler)�URIShortcutHandler)�Deb822SourceEntry)�urlparsez5https://ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/z=https://private-ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/zppa.launchpad.netzprivate-ppa.launchpad.net�main�
main/debugc���eZdZd�fd�	Zed��Zed��Zed��Zed��Zed��Z	ed��Z
d�fd�	Z�fd	�Zd
�Z
d�Zd�Zd
�Zd�Z�xZS)�PPAShortcutHandlerc����tt|�
|fddi|��||_d|_d|_d|_d|_d|_|j|�sKd|_
t|j|�|j|�f�std�|z}t|��|j �d|j"��|_|j'�|jr
	|j(|j,s�|j.}|s$dg}|j(j0rt3d�|j(j4rt6nt8}|j;|j |j"�	�}t=dd
�}|j>g|_ |g|_!|jDg|_#||_$|jKtM|��yy#t*$rttd���wxYw)N�deb822TFz%ERROR: '%s' is not a valid ppa formatz-ubuntu-zERROR: Can't find pparzDPPA publishes dbgsym, you may need to include 'main/debug' component)�team�ppa�)'�superr�__init__�_lp_anon�_signing_key_data�_lp�_lpteam�_lpppa�_is_sourceslist�
_match_ppar�any�
_match_uri�_match_sourceslist�_r
�teamname�ppaname�	_filebase�	_set_auth�lpppar	�
_source_entry�
components�publish_debug_symbols�print�private�PRIVATE_PPA_URI_FORMAT�PPA_URI_FORMAT�formatr
�binary_type�types�uris�dist�suites�comps�_set_source_entry�str)
�self�shortcut�login�kwargs�msgr7�
uri_format�uri�entry�	__class__s
         ��8/usr/lib/python3/dist-packages/softwareproperties/ppa.pyrzPPAShortcutHandler.__init__4s����
� �$�0��Q�$�Q�&�Q�!�	��
�!%������������$������x�(� �D�K������1��/�/��9�;�<��@�A�H�L��.�s�3�3�+/�=�=�$�,�,�G����������
K��
�
��!�!��O�O�E������:�:�3�3��`�a�48�:�:�3E�3E�/�>�J��#�#����D�L�L�#�I�C�%�d�B�/�E��+�+�,�E�K���E�J� �I�I�;�E�L��E�K��"�"�3�u�:�.�#"��%�
K�.�q�1H�/I�J�J�
K�s�G
�
G(c���|js`|jrtj}ntj}||j
�d|jj��dd��|_|jS)N�.�
production�devel)�service_root�version)rrr�login_anonymously�
login_with�
__module__rB�__name__)r:�
login_funcs  rC�lpzPPAShortcutHandler.lphsX���x�x��}�}�&�8�8�
�&�1�1�
�!�T�_�_�d�n�n�>U�>U�"V�/;�*1�3�D�H��x�x��c�V�|js7	|jj|j�|_|jS|jS#t$r$td�|jz}t
|��t$r$td�|jz}t
|��wxYw)Nz8ERROR: user/team '%s' not found (use --login if private)z"ERROR: invalid user/team name '%s')rrO�peopler%rr$r	r�r:r>s  rC�lpteamzPPAShortcutHandler.lpteamts����|�|�
-�#�w�w�~�~�d�m�m�<����|�|��t�|�|���
�
-��S�T�W[�Wd�Wd�d��'��,�,��
-��=�>����N��'��,�,�
-�s�*A�AB(c�p�|js8	|jj|j��|_|jS|jS#t$r0td�|j|jfz}t|��t$r$td�|jz}t|��wxYw)N)�namez5ERROR: ppa '%s/%s' not found (use --login if private)zERROR: invalid ppa name '%s')	rrT�getPPAByNamer&rr$r%r	rrSs  rCr)zPPAShortcutHandler.lpppa�s����{�{�
-�"�k�k�6�6�D�L�L�6�I����{�{��t�{�{����
-��P�Q��
�
�t�|�|�4�5��'��,�,��
-��7�8�4�<�<�G��'��,�,�
-�s�+A�A$B5c�.�|jjS�N)r)�description�r:s rCrZzPPAShortcutHandler.description�s���z�z�%�%�%rPc�.�|jjSrY)r)�web_linkr[s rCr]zPPAShortcutHandler.web_link�s���z�z�"�"�"rPc��|js�|jj�}|jj}|st	td��ned|vrt	td��nL||j
|�vr9td�|dj|j
|��fz}t|��||_|jS)NzHWarning: could not get PPA signing_key_fingerprint from LP, using anyway�redactedzAPrivate PPA fingerprint redacted, using key anyway (LP: #1879781)z6Fingerprints do not match, not importing: '%s' != '%s'�,)	rr)�getSigningKeyData�signing_key_fingerprintr-r$�fingerprints�joinr	)r:�key�fingerprintr>s    rC�trustedparts_contentz'PPAShortcutHandler.trustedparts_content�s����%�%��*�*�.�.�0�C��*�*�<�<�K���a�b�c�d��{�*��a�[�\�]� �D�$5�$5�c�$:�:��Q�R�#�S�X�X�d�.?�.?��.D�%E�F�G��'��,�,�%(�D�"��%�%�%rPc����tt|�|��}||jk7s|jr|Stt
|j�t
dg�z
�|_|S)N)�pkgtyper)rr�SourceEntry�source_typer+�list�setr7)r:rirArBs   �rCrjzPPAShortcutHandler.SourceEntry�sY����(�$�;�G�;�L���d�&�&�&�$�/�/��L�
�3�u�{�{�+�c�<�.�.A�A�B����rPc����tt|�|�t|j	�j
�tt�z
}|r'ttd�dj|�z�yy)Nz*Warning: components '%s' not valid for PPA� )
rrr8rmrjr7�PPA_VALID_COMPSr-r$rd)r:�line�
invalid_compsrBs   �rCr8z$PPAShortcutHandler._set_source_entry�sZ���
� �$�9�$�?��D�,�,�.�4�4�5��O�8L�L�
���!�@�A�C�H�H�]�D[�[�\�rPc�*�|jd�\}}}|j�dk(sy|jd�\}}}|jd�}d|vr.|jd�\}}}|j�dk7ryd|vry||_|xsd|_y)N�:rF�/�~�ubuntuT)�
rpartition�lower�	partition�lstripr%r&)r:r;�prefixr$rr%r&rws        rCr zPPAShortcutHandler._match_ppa�s���#�.�.�s�3����C��|�|�~��&��!$���s�!3���1�g��?�?�3�'���'�>�#*�#4�#4�S�#9� �V�Q���|�|�~��)���g�~�� ��
��'�%���rPc�V�	|jt|��S#t$rYywxYw)NF)�_match_handlerrr
)r:r;s  rCr"zPPAShortcutHandler._match_uri�s0��	��&�&�'9�(�'C�D�D��'�	��	�s��	(�(c�h�	|jt|��}d|_|S#t$rYywxYw)NFT)r~rr
r)r:r;�handlers   rCr#z%PPAShortcutHandler._match_sourceslist�s@��	��)�)�*D�X�*N�O�G� $������(�	��	�s�%�	1�1c��t|j�j�}|jtvry|j
j
�j
d�jd�}t|�dkry|d|_	|d|_
|j|_|j|_|j|j�j �y)NFru�r�T)rrjr@�hostname�PPA_VALID_HOSTNAMES�path�strip�split�lenr%r&�username�	_username�password�	_passwordr8rq)r:r��parsedr�s    rCr~z!PPAShortcutHandler._match_handler�s����'�-�-�/�3�3�4�����"5�5���{�{� � �"�(�(��-�3�3�C�8���t�9�q�=���Q���
��A�w��� �)�)��� �)�)������w�2�2�4�9�9�:�rPc��|js|jjsy|jr
|jry	|j
j
|j
jj�}|j|j��}t|�}|j|_|j|_y#t$r0td�|j|j fz}t#|��wxYw)N)�archivezMCould not find PPA subscription for ppa:%s/%s, you may need to request access)rr)r.r�r�rOrR�merV�getArchiveSubscriptionURLrr�r�rr$r%r&r	)r:r��urlr�r>s     rCr(zPPAShortcutHandler._set_auth�s����=�=��
�
� 2� 2���>�>�d�n�n��	-���������
�
���0�B��.�.�t�z�z�.�B�C��c�]�F�#�_�_�D�N�#�_�_�D�N���	)��d�e��M�M�4�<�<�0�1�C�#�C�(�(�	)�s�AC�9C:)FrY)rMrL�__qualname__r�propertyrOrTr)rZr]rgrjr8r r"r#r~r(�
__classcell__)rBs@rCrr3s����2/�h�	��	��
��
������&��&��#��#��&��&�"	�]��(���"-rPrN)rr$�launchpadlib.launchpadr�lazr.restfulclient.errorsrrr�"softwareproperties.shortcuthandlerrr	r
�softwareproperties.sourceslistr�softwareproperties.urir�aptsources.sourceslistr
�urllib.parserr0r/r�r�rpr�rPrC�<module>r�s~��.!�,�J�J�J�J�E�5�4�!�I��X���^��%�%��
#�$�-�-������<�(��M-��M-rP

Zerion Mini Shell 1.0