HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/apt/__pycache__/cdrom.cpython-38.pyc
U

&��c�
�@shdZddlmZzddlmZWnek
r4YnXddlZddlZddlm	Z	Gdd�dej
�Z
dS)z"Classes related to cdrom handling.�)�print_function)�OptionalN)�
CdromProgressc@s:eZdZdZddd�Zd
dd�Zddd	�Zed
d��ZdS)�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.
    NTcCs`tj�|�|dkrt�|_n||_|dk	r:tj�d|�|rNtj�dd�ntj�dd�dS)NzAcquire::cdrom::mountzAPT::CDROM::NoMount�trueZfalse)�apt_pkgr�__init__r�	_progress�config�set)�self�progressZ
mountpointZnomount�r�+/usr/lib/python3/dist-packages/apt/cdrom.pyr5s
zCdrom.__init__cCstj�||p|j�S)zAdd cdrom to the sources.list.)rr�addr	�rr
rrrrEsz	Cdrom.addcCstj�||p|j�S)zIdentify the cdrom.)rr�identr	rrrrrJszCdrom.identc
Cs�|��}|dkrdSt�tj�d�d�}|�tj�d��|D]J}t|��8}|D],}|���	d�sR||krRW5QR�dSqRW5QRXq@dS)z:Check if the cdrom is already in the current sources.list.NFzDir::Etc::sourceparts�*zDir::Etc::sourcelist�#T)
r�globrr
Zfind_dir�appendZ	find_file�open�lstrip�
startswith)rZcd_id�src�fnameZfobj�linerrr�in_sources_listOs
 zCdrom.in_sources_list)NNT)N)N)	�__name__�
__module__�__qualname__�__doc__rrr�propertyrrrrrr$s


r)r!Z
__future__r�typingr�ImportErrorrrZapt.progress.baserrrrrr�<module>s