ok
Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/clconfigure/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/clconfigure/__pycache__/packages.cpython-311.pyc |
� ;G�fL � �� � d dl Z d dlZd dlZd dlmZmZ dZdZ ed� � d� � � Z ed� � d� � � Z ed � � dde defd �� � Zd� Z d� ZdS )� N)�task�run�uninstalled� installedz Erasing package '{package_name}'c � � t ddd| g� � t | � � }t j d| |� � t |k rt d� � �d S )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_packager s_ � ����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 |� � }t j d||� � | |k rt j d|� � dS t j d� � | t k rd}n| t k rd}nt � � �t d|d|g� � t |� � }t j d ||� � | |k rt d � � �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 �debugr r �STATE_INSTALLED�NotImplementedErrorr r )� desired_stater r �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�� �%�%��:�;�;�;� &�%r z'(Re)installing package '{package_name}'Fr � reinstallc � � t | � � }|t k r |rddd| g}n|t k rddd| g}nd S t |� � d S )Nr r r r )r r r r )r r �state�cmds r �install_packager$ 6 s^ � ��l�+�+�E�����I���k�4��6��� �-� � ��i��|�4�������H�H�H�H�Hr c �X � t dd| g� � }|j dk rt nt S )zJ Gets current package state. Either installed or uninstalled. r z-qvr )r �exitcoder r )�package�resps r r r B s. � � ��u�g�&�'�'�D�"�m�q�0�0�?�?�m�Cr c �>