File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/zypperpkg.cpython-310.pyc
Back
o ;j�{ � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddlmZ ddlmZ ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZmZmZ ddlm Z ej!j"�#� rxddl$Z$e�%e&�Z'dZ(dZ)e)� d �Z*e)� d �Z+dZ,dZ-d Z.dd� Z/G dd� d�Z0e0� Z1G dd� d�Z2dd� Z3dd� Z4d�dd�Z5ej!j6�7e5d�Z8dd� Z9dd� Z:d d!� Z;d"d#� Z<ej!j6�7e<d$�Z=d%d&� Z>d'd(� Z?d�d)d*�Z@d+d,� ZAd�d-d.�ZBd/d0� ZCd�d1d2�ZDd�d3d4�ZEd�d5d6�ZFd�d7d8�ZGd�d9d:�ZHd;d<� ZId�d=d>�ZJd?d@� ZK d�dAdB�ZL d�dCdD�ZMd�dEdF�ZNdGdH� ZO d�dIdJ�ZPd�dKdL�ZQd�dMdN�ZRd�dOdP�ZSd�dQdR�ZTd�dSdT�ZUd�dUdV�ZVdWdX� ZWdYdZ� ZXd[d\� ZYd]d^� ZZd_d`� Z[d�dadb�Z\d�dcdd�Z]d�dedf�Z^d�dgdh�Z_d�didj�Z`dkdl� Zad�dmdn�Zbdodp� Zcd�dqdr�Zddsdt� Zed�dudv�Zfd�dwdx�Zgd�dydz�Zhd�d{d|�Zid�d}d~�Zjd�dd��ZkdS )�a� Package support for openSUSE via the zypper package manager :depends: - ``rpm`` Python module. Install with ``zypper install rpm-python`` .. important:: If you feel that Salt should be using this module to manage packages on a minion, and it is using a different module (or gives an error similar to *'pkg.install' is not available*), see :ref:`here <module-provider-override>`. � N)�minidom)� ExpatError)�CommandExecutionError�MinionError�SaltInvocationError��LooseVersionFz /etc/zyppz/locksz/repos.d�c �.�pkgc C s* t �dd�dkr dS tjj�d�sdS tS )z: Set the virtual pkg module if the os is openSUSE Z os_family� ZSuse)FzBModule zypper: non SUSE OS not supported by zypper package manager�zypper)Fz/Module zypper: zypper package manager not found)� __grains__�get�salt�utils�path�which�__virtualname__� r r �J/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/zypperpkg.py�__virtual__8 s r c @ s e Zd ZdZdddddd�Zdd d dd�Zd ZddgZdZdZ dZ dZdd� Zdd� Z dd� Zdd� Zedd� �Zejdd� �Zedd � �Zejd!d � �Zed"d#� �Zed$d%� �Zed&d'� �Zd(d)� Zd*d+� Zd,d-� Zd.d/� Zd0d1� Zd2d3� Zd4d5� Zd6d7� Zd8S )9�_Zypperz� Zypper parallel caller. Validates the result and either raises an exception or reports an error. Allows serial zypper calls (first came, first won). z.Successful run of zypper with no special info.z'Patches are available for installation.z0Security patches are available for installation.z)Installation successful, reboot required.zHInstallation successful, restart of the package manager itself required.)r �d �e �f �g zNo repositories are defined.zThe ZYPP library is locked.z�Some repository had to be disabled temporarily because it failed to refresh. You should check your repository configuration (e.g. zypper ref -f).a~ Installation basically succeeded, but some of the packages %post install scripts returned an error. These packages were successfully unpacked to disk and are registered in the rpm database, but due to the failed install script they may not work as expected. The failed scripts output might reveal what actually went wrong. Any scripts output is also logged to /var/log/zypp/history.)� � �j �k r z-x�--xmloutz/var/run/zypp.pidz/var/lib/rpm/.rpm.lockzzypper/releasedzzypper/blockedc C s | � � dS )z Constructor N)�_reset��selfr r r �__init__p s z_Zypper.__init__c C sd ddg| _ d| _t� | _d| _tjj�t � �| _ d| _d| _d| _ d| _d| _d| _d| _d| _dS )zD Resets values of the call setup. :return: r z--non-interactiver r FN)�_Zypper__cmd�_Zypper__exit_code�dict�_Zypper__call_result�_Zypper__error_msgr r ZenvironmentZget_module_environment�globals�_Zypper__env�_Zypper__xml�_Zypper__no_lock�_Zypper__no_raise�_Zypper__refresh�_Zypper__ignore_repo_failure�_Zypper__systemd_scope� _Zypper__root�_Zypper__calledr# r r r r"