HOME


Mini Shell 1.0
DIR: /lib/python3/dist-packages/apt/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/apt/__pycache__/cdrom.cpython-312.pyc
�

\�e
��N�dZddlZddlZddlmZGd�dej
�Zy)z"Classes related to cdrom handling.�N)�
CdromProgressc	��eZdZdZ			ddedzdedzdeddfd�Zddedzdefd�Zddedzdefd	�Z	e
defd
��Zy)
�Cdroma;Support for apt-cdrom like features.

    This class has several optional parameters for initialisation, which may
    be used to influence the behaviour of the object:

    The optional parameter `progress` is a CdromProgress() subclass, which will
    ask for the correct cdrom, etc. If not specified or None, a CdromProgress()
    object will be used.

    The optional parameter `mountpoint` may be used to specify an alternative
    mountpoint.

    If the optional parameter `nomount` is True, the cdroms will not be
    mounted. This is the default behaviour.
    N�progress�
mountpoint�nomount�returnc�>�tjj|�|�t�|_n||_|� tj
j
d|�|r!tj
j
dd�ytj
j
dd�y)NzAcquire::cdrom::mountzAPT::CDROM::NoMount�true�false)�apt_pkgr�__init__r�	_progress�config�set)�selfrrrs    �+/usr/lib/python3/dist-packages/apt/cdrom.pyrzCdrom.__init__/st��	�
�
���t�$���*�_�D�N�%�D�N��!��N�N���6�
�C���N�N���4�f�=��N�N���4�g�>�c�^�tjj||xs|j�S)zAdd cdrom to the sources.list.)r
r�addr�rrs  rrz	Cdrom.addCs"���}�}� � ��x�'A�4�>�>�B�Brc�^�tjj||xs|j�S)zIdentify the cdrom.)r
r�identrrs  rrzCdrom.identGs"���}�}�"�"�4��)C�T�^�^�D�Drc��|j�}|�ytjtjj	d�dz�}|jtjj
d��|D]M}t|�5}|D]1}|j�jd�r�#||vs�(ddd�y	ddd��Oy#1swY�ZxYw)z:Check if the cdrom is already in the current sources.list.NFzDir::Etc::sourceparts�*zDir::Etc::sourcelist�#T)
r�globr
r�find_dir�append�	find_file�open�lstrip�
startswith)r�cd_id�src�fname�fobj�lines      r�in_sources_listzCdrom.in_sources_listKs����
�
����=���i�i����/�/�0G�H�3�N�O���
�
�7�>�>�+�+�,B�C�D��	$�E��e��
$�� �$�D��;�;�=�3�3�C�8�U�d�]�#�
$�
$�$�
$�
$�	$�
�	
$�
$�s�%C
�-C
�2C
�=C
�
C	)NNT)N)�__name__�
__module__�__qualname__�__doc__r�str�boolrrr�propertyr)�rrrrs����$*.�!%��	?��$�&�?��$�J�?��	?�

�?�(C�M�D�0�C�D�C�E�m�d�2�E�c�E������rr)r-rr
�apt.progress.baserrr1rr�<module>r3s#��,)���+�=�G�M�M�=r