%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python37/lib/python3.7/site-packages/clconfigure/__pycache__/
Upload File :
Create Path :
Current File : //opt/alt/python37/lib/python3.7/site-packages/clconfigure/__pycache__/packages.cpython-37.pyc

B

�2Lb�@sdddlmZddlZddlZddlZddlmZmZdZdZ	dZ
ed�dd	��Zd
d�Zdd
�Z
dS)�)�absolute_importN)�task�runZuninstalledZ	installedzis not installedz<Changing package '{package_name}' state to '{desired_state}'cCs�t|�}t�d||�||kr.t�d|�dSt�d�|tkrFd}n|tkrTd}nt��td|d|g�t|�}t�d	||�||kr�td
��dS)z�
    Brings package to given state (installed | uninstalled). May be executed more that once,
    does'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...�removeZinstallZyumz-yzAChecking package '%s' state again... package is now in state '%s'zFailed to do required actions)	�_get_package_state�logging�debug�info�
STATE_REMOVED�STATE_INSTALLED�NotImplementedErrorr�RuntimeError)Z
desired_stateZpackage_nameZ
current_state�action�r�E/opt/alt/python37/lib/python3.7/site-packages/clconfigure/packages.py�set_package_states 
rcCs:tdd|g�}t|jkrtS|jdkr*tStd|��dS)zJ
    Gets current package state.
    Either installed or uninstalled.
    Zrpmz-qrzUnknown package %s statusN)r�_PACKAGE_NOT_INSTALLED�stdoutr
Zexitcoderr
)�packageZresprrrr.s

rcCsdd�t�d�D�S)zN
    Gets installed alt-phps
    return: list ['php44', 'php54', 'php80']
    cSsg|]}t�d|�r|�qS)z^php\d+$)�re�match)�.0Zphprrr�
<listcomp>@sz/get_list_installed_alt_phps.<locals>.<listcomp>z/opt/alt)�os�listdirrrrr�get_list_installed_alt_phps;sr)Z
__future__rrrrZclconfigurerrr
rrrrrrrrr�<module>s

Zerion Mini Shell 1.0