%PDF- %PDF-
Direktori : /lib/python3/dist-packages/aptdaemon/__pycache__/ |
Current File : //lib/python3/dist-packages/aptdaemon/__pycache__/client.cpython-312.pyc |
� ��kd_% � �J � d Z ddlZddlZddlZddlZddlZddlZddlZej j j d�� ddlm Z mZ ddlmZ ddlmZ ddlZdd lmZ dd lmZmZ dZdZ G d � de j4 � Z G d� de� Zeedd�� � Zd� Zdd�Z y)z� The module provides a client to the PackageKit DBus interface. It allows to perform basic package manipulation tasks in a cross distribution way, e.g. to search for packages, install packages or codecs. � NT)�set_as_default)�GObject�GLib� )�enums)�debconf)� deferable)�convert_dbus_exception�TransactionFailed)�AptTransaction� AptClient�get_transaction� get_aptdaemoni�Q c �@ � e Zd ZdZi dej j ej ej ff�dej j ej ej ej ej ej ej ej ej ff�dej j ej ej ff�dej j ej ej ff�dej j ej ej ej ff�dej j ej ej ff�dej j ej ej ff�d ej j ej ej ff�d ej j ej ej ff�dej j ej ej ff�dej j ej ej ff�d ej j ej ej ff�dej j ej ej ej ej ej ej ej ff�dej j ej ej ej ej ej ej ej ff�dej j ej ej ej ej ej ej ej ff�dej j ej ej ff�dej j ej df�ej j ej dfej j ej ej ffej j ej ej ffej j ej ej ffej j ej ej ffej j ej ej ffej j ej ej ffej j ej ej ej ffej j ej ej ej ffd� �Z ej � Zd� Zd*d�Zd� Zd� Zd� Zeed+d�� � Zeed+d�� � Zeed+d�� � Zeed+d�� � Zeed+d�� � Zeed+d �� � Zee d+d!�� � Zee d+d"�� � Zee d+d#�� � Z eed$� � � Z!eed+d%�� � Z"d&� Z#eed+d'�� � Z$eed+d(�� � Z%ee d+d)�� � Z&y),r a�- Represents an aptdaemon transaction. .. note:: This class cannot be inherited since it makes use of a metaclass. .. signal:: allow-unauthenticated -> allow The signal is emitted when :attr:`allow_unauthenticated` changed. :param allow: If unauthenticated packages are allowed to be installed. .. signal:: cancellable-changed -> cancellable The signal is emitted when :attr:`cancellable` changed. :param cancellable: If the transaction can be cancelled now. .. signal:: config-file-conflict -> cur, new The signal is emitted when :attr:`config_file_conflict` changed. :param cur: The path to the current configuration file. :param new: The path to the new configuration file. .. signal:: debconf-socket-changed -> path The signal is emitted when :attr:`debconf_socket` changed. :param path: The path to the socket which will be used to forward debconf communication to the user session. .. signal:: dependencies-changed -> installs, re-installs, removals, purges, upgrades, downgrades, kepts The signal is emitted when :attr:`dependencies` changed. Most likely after :meth:`simulate()` was called. :param installs: List of package which will be installed. :param reinstalls: List of package which will be re-installed. :param removals: List of package which will be removed, :param purges: List of package which will be removed including configuration files. :param upgrades: List of package which will be upgraded. :param downgrades: List of package which will be downgraded to an older version. :param kepts: List of package which will be skipped from upgrading. .. signal:: download-changed -> download The signal is emitted when :attr:`download` changed. :param download: Download size integer in Bytes. .. signal:: error -> error_code, error_details The signal is emitted when an error occured. :param error_code: The error code enumeration, e.g. :data:`aptdaemon.enums.ERROR_NO_CACHE`. :param error_details: The error description string. .. signal:: finished -> exit_state The signal is emitted when the transaction is completed or has failed. :param exit_state: The exit status enumeration string. .. signal:: http-proxy-changed -> uri The signal is emitted when :attr:`http_proxy` changed. :param uri: The URI of the proxy server, e.g. "http://proxy:8080". .. signal:: locale-changed -> locale The signal is emitted when :attr:`locale` changed. :param locale: The language which should be used for messages, eg. "de_DE". .. signal:: meta-data-changed -> meta_data The signal is emitted when :attr:`meta_data` changed. :param meta_data: The latest meta data dictionary. .. signal:: medium-required -> name, device The signal is emitted when :attr:`required_medium` changed. :param name: The name of the volume. :param device: The path of the device in which the volume should be inserted. .. signal:: remove-obsoleted-depends-changed -> remove The signal is emitted when :attr:`remove_obsoleted_depends` changed. :param remove: If obsolete dependencies should also be removed. .. signal:: role-changed -> role The signal is emitted when :attr:`role` changed. :param role: The new role enum, e.g. :data:`~aptdaemon.enums.ROLE_UPDATE_CACHE`. .. signal:: space-changed -> space The signal is emitted when :attr:`space` changed. Most likely after :meth:`simulate()` was called. :param space: Required disk space integer in Bytes. Can be negative if disk space will be freed. .. signal:: packages-changed -> installs, re-installs, removals, purges, upgrades, downgrades The signal is emitted when :attr:`packages` changed. :param installs: List of package which will be installed. :param reinstalls: List of package which will be re-installed. :param removals: List of package which will be removed, :param purges: List of package which will be removed including configuration files. :param upgrades: List of package which will be upgraded. :param downgrades: List of package which will be downgraded to an older version. .. signal:: paused The signal is emitted when the transaction was paused. See :attr:`paused` and :sig:`resumed`. .. signal:: progress-changed -> progress The signal is emitted when :attr:`progress` changed. :param progress: The progress integer. .. signal:: progress-details-changed -> current_items, total_items, currenty_bytes, total_bytes, current_cps, eta The signal is emitted when detailed information of the progress is available. :param current_items: The number of already processed items. :param total_items: The number of all items. :param current_bytes: The number of already downloaded byte. :param total_bytes: The number of bytes which have to be downloaded totally. :param current_cps: The current download speed in bytes per second. :param eta: The elapsed time in seconds to accomplish the task. .. signal:: progress-download-changed -> uri, short_desc, total_size, current_size, msg The signal is emitted when progress information about a single download is available. :param uri: The URI of the file which is downloaded. :param status: The status of the downloade, e.g. :data:`~aptdaemon.enums.DOWNLOAD_AUTH_FAILED`. :param short_desc: A short description of the file. :param total_size: The size of the file in Bytes. :param current_size: How much of the file in Bytes has already be downloaded. :param msg: The status or error description. .. signal:: resumed The signal is emitted when a paused transaction was resumed. See :attr:`paused` and :sig:`paused`. .. signal:: terminal-changed -> path The signal is emitted when :attr:`terminal` changed. :param path: The path to the slave end of the controlling terminal for the underlying dpkg call. .. signal:: terminal-attached-changed -> attached The signal is emitted when :attr:`term_attached` changed. :param attached: If the controlling terminal can be used. .. signal:: unauthenticated-changed -> unauthenticated The signal is emitted when :attr:`unauthenticated` changed. :param unauthenticated: List of unauthenticated packages. .. attribute:: cancellable If the transaction can be currently cancelled. .. attribute:: config_file_conflict If there is a conflict in the configuration file handling during an installation this attribute contains a tuple of the path to the current and the new temporary configuration file. The :meth:`resolve_config_file_conflict()` can be used to resolve the conflict and continue the processing of the transaction. .. attribute:: dependencies List of dependencies lists in the following order: packages to install, to re-install, to remove, to purge, to upgrade, to downgrade and to keep. You have to call :meth:`simulate()` to calculate the dependencies before the transaction will be executed. .. attribute:: download The number of Bytes which have to be downloaed. You have to call :meth:`simulate()` to calculate the download size before the transaction will be executed. .. attribute:: error In the case of a failed transaction this attribute holds the corresponding :exc:`errors.TransactionFailed` instance. .. attribute:: error_code In the case of a failed transaction this attribute is set to the underlying error code, e.g. :data:`enums.ERROR_PACKAGE_DOWNLOAD_FAILED`. .. attribute:: error_details In the case of a failed transaction this attribute contains a detailed error message in the language of the transaction. .. attribute:: exit Contains the exit status enum if the transaction has been completed, e.g. :data:`enums.EXIT_SUCCESS` or :data:`enums.EXIT_FAILED`. .. attribute:: http_proxy The URI to the http proxy server which should be used only for this transaction, e.g. "http://proxy:8080". It is recommended to set the system wide proxy server instead of setting this attribute for every transaction. See :meth:`set_http_proxy()`. .. attribute:: meta_data Dictionary of optional meta data which can be set by client applications. See :meth:`set_meta_data()`. .. attribute:: packages List of package lists which will be explicitly changed in the following order: packages to install, to re-install, to remove, to purge, to upgrade, to downgrade. .. attribute:: paused If the transaction is currently paused, e.g. it is required to insert a medium to install from. .. attribute:: progress An integer ranging from 0 to 101 to describe the progress of the transaction. .. note:: A value of 101 indicates that there cannot be made any assumptions on the progress of the transaction. .. attribute:: remove_obsoleted_depends If dependencies which have been required by a removed package only should be removed, too. .. attribute:: required_medium If a medium should be inserted to continue the fetch phase of a transaction, this attribute contains a tuple of the device path of of the drive which should be used and secondly of the name of the medium. The :func:`provide_medium()` method should be used to notify aptdaemon about an inserted medium and to continue processing the transaction. .. attribute:: role The kind of action which is performed by the transaction, e.g. :data:`enums.ROLE_UPGRADE_SYSTEM`. .. attribute:: space The required disk space in Bytes. Will be negative if space is freed. You have to call :meth:`simulate()` to calculate the download size before the transaction will be executed. .. attribute:: status The enum of the current status, e.g. :data:`enums.STATUS_DOWNLOADING`. .. attribute:: status_details A string describing the current status of the transaction. .. attribute:: tid The unique identifier of the transaction. It is also the D-Bus path of the corresponding transaction object. .. attribute:: term_attached If the the package manager can be controlled using the controlling terminal specified by :func:`set_terminal()`. .. attribute:: unauthenticated List of packages which are going to be installed but are not downloaded from an authenticated repository. You have to call :meth:`simulate()` to calculate the dependencies before the transaction will be executed. �finished�dependencies-changed�download-changed� space-changed�error�role-changed�terminal-attached-changed�cancellable-changed�meta-data-changed�status-changed�status-details-changed�progress-changed�progress-details-changed�progress-download-changed�packages-changed�unauthenticated-changed�paused� ) �resumed�allow-unauthenticated-changed� remove-obsoleted-depends-changed�locale-changed�terminal-changed�debconf-socket-changed�http-proxy-changed�medium-required�config-file-conflictc � � t j | S # t $ r< t j j | |g|��i |��}|t j |<