HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/pecl.cpython-310.pyc
o

�N�gL�@s$dZdd�Z	d
dd�Zdd	�ZdS)a�
Installation of PHP Extensions Using pecl
=========================================

These states manage the installed pecl extensions. Note that php-pear must be
installed for these states to be available, so pecl states should include a
requisite to a pkg.installed state for the package which provides pecl
(``php-pear`` in most cases). Example:

.. code-block:: yaml

    php-pear:
      pkg.installed

    mongo:
      pecl.installed:
        - require:
          - pkg: php-pear
cCsdtvrdSdS)z?
    Only load if the pecl module is available in __salt__
    �	pecl.listZpecl)Fzpecl module could not be loaded)�__salt__�rr�D/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/pecl.py�__virtual__srNF�stablec	Cs"t|t�s
|dur
t|�}|ddid�}d|vr |�d�\}}nd}|}td|�}||vrL|dus8|||vrL|||vrLd|d<d|�d	�|d
<|S|durW|�d|��}tdred|�d
�|d
<|Std||||d�r�d|d<d|d|<d|�d�|d
<|Sd|d<d|�d�|d
<|S)a�
    .. versionadded:: 0.17.0

    Make sure that a pecl extension is installed.

    name
        The pecl extension name to install

    version
        The pecl extension version to install. This option may be
        ignored to install the latest stable version.

    defaults
        Use default answers for extensions such as pecl_http which ask
        questions before installation. Without this option, the pecl.installed
        state will hang indefinitely when trying to install these extensions.

    force
        Whether to force the installed version or not

    preferred_state
        The pecl extension state to install
    N���name�result�comment�changes�/rTr
�Pecl extension z is already installed.r�-�testz would have been installedzpecl.install)�defaults�force�preferred_stateZ	Installedrz was successfully installedFz!Could not install pecl extension �.)�
isinstance�str�splitr�__opts__)	r	�versionrrr�retZchannel�packageZinstalled_peclsrrr�	installeds:��rcCs�|ddid�}|td�vrd|d<d|�d�|d	<|Std
r*d|�d�|d	<|Std|�rDd|d<d
|d|<d|�d�|d	<|Sd|d<d|�d�|d	<|S)zr
    Make sure that a pecl extension is not installed.

    name
        The pecl extension name to uninstall
    NrrrTr
rz is not installed.rrz would have been removedzpecl.uninstallZRemovedrz was successfully removed.Fz Could not remove pecl extension r)rr)r	rrrr�removedcs �r)NFFr)�__doc__rrrrrrr�<module>s


�D