Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/clconfigure/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/clconfigure/__pycache__/packages.cpython-311.pyc

�

ܨfs
����ddlmZddlZddlZddlZddlmZmZdZdZ	ed��d���Z
ed��d	���Zed
��dded
e
fd���Zd�Zd�ZdS)�)�absolute_importN)�task�run�uninstalled�	installedz Erasing package '{package_name}'c��tddd|g��t|��}tjd||��t|krtd���dS)N�rpmz-ez--nodeps�AChecking package '%s' state again... package is now in state '%s'�Failed to do required actions)r�get_package_state�logging�info�
STATE_REMOVED�RuntimeError)�package_name�
current_states  �py/clconfigure/packages.py�
erase_packagers_�����j�,�/�0�0�0�%�l�3�3�M��L�T�Vb�dq�r�r�r��
�%�%��:�;�;�;�&�%�z<Changing package '{package_name}' state to '{desired_state}'c��t|��}tjd||��||krtjd|��dStjd��|tkrd}n|t
krd}nt
���td|d|g��t|��}tjd	||��||krtd
���dS)z�
    Brings package to given state (installed | uninstalled).
    May be executed more than once, doesn't crash on future calls
    z7Checking package '%s' state... package is in state '%s'z"No actions needed for package '%s'Nz(State does not match target, changing...�remove�install�yum�-yr
r)	rr
�debugrr�STATE_INSTALLED�NotImplementedErrorrr)�
desired_staterr�actions    r�set_package_stater s���&�l�3�3�M��M�K�\�[h�i�i�i��
�%�%��
�:�L�I�I�I����L�;�<�<�<��
�%�%����	�/�	)�	)����!�#�#�#�����l�+�,�,�,�%�l�3�3�M��L�T�Vb�dq�r�r�r��
�%�%��:�;�;�;�&�%rz'(Re)installing package '{package_name}'Fr�	reinstallc��t|��}|tkr	|rddd|g}n|tkrddd|g}ndSt|��dS)Nrr!rr)rrrr)rr!�state�cmds    r�install_packager%7s^���l�+�+�E�����I���k�4��6���	�-�	�	��i��|�4�������H�H�H�H�Hrc�X�tdd|g��}|jdkrtntS)zJ
    Gets current package state.
    Either installed or uninstalled.
    r	z-qvr)r�exitcoderr)�package�resps  rrrCs.��
��u�g�&�'�'�D�"�m�q�0�0�?�?�m�Crc�>�d�tjd��D��S)zN
    Gets installed alt-phps
    return: list ['php44', 'php54', 'php80']
    c�<�g|]}tjd|���|��S)z^php\d+$)�re�match)�.0�phps  r�
<listcomp>z/get_list_installed_alt_phps.<locals>.<listcomp>Qs)��P�P�P�C�R�X�k�3�5O�5O�P�C�P�P�Prz/opt/alt)�os�listdir�rr�get_list_installed_alt_phpsr4Ls#��
Q�P�2�:�j�1�1�P�P�P�Pr)F)�
__future__rr
r1r,�clconfigurerrrrrr �str�boolr%rr4r3rr�<module>r9s��'�&�&�&�&�&�����	�	�	�	�	�	�	�	�!�!�!�!�!�!�!�!��
�����(�)�)�<�<�*�)�<���D�E�E�<�<�F�E�<�6��/�0�0�
�
�#�
�$�
�
�
�1�0�
�D�D�D�Q�Q�Q�Q�Qr

Hacked By AnonymousFox1.0, Coded By AnonymousFox