�
\�e
� �N � d Z ddlZddlZddlmZ G d� dej
� Zy)z"Classes related to cdrom handling.� N)�
CdromProgressc � � e Zd ZdZ ddedz dedz deddfd�Zddedz defd�Zddedz defd �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 �> � t j j | � |�t � | _ n|| _ |� t j
j
d|� |r!t j
j
dd� y t j
j
dd� y )NzAcquire::cdrom::mountzAPT::CDROM::NoMount�true�false)�apt_pkgr �__init__r � _progress�config�set)�selfr r r s �+/usr/lib/python3/dist-packages/apt/cdrom.pyr zCdrom.__init__/ st � � �
�
���t�$���*�_�D�N�%�D�N��!��N�N���6�
�C���N�N���4�f�=��N�N���4�g�>� c �^ � t j j | |xs | j � S )zAdd cdrom to the sources.list.)r
r �addr �r r s r r z Cdrom.addC s" |