%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib/python2.7/site-packages/clselect/clselectpython/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib/python2.7/site-packages/clselect/clselectpython/pkgmanager.pyc

�
i�B^c@`s�ddlmZddlmZddlmZddlZddlmZddlmZm	Z	m
Z
mZmZm
Z
defd	��YZdS(
i(tprint_function(tdivision(tabsolute_importN(tBasePkgManageri(tscan_python_versionstis_major_versiont
CONFIG_DIRtcreate_config_dirst	ALT_NAMEStALT_PYTHON_PREFIXt
PkgManagercB`s�eZdZd�ZeZdZdZeZ	dZ
djede	de
g�Zdjede	de
g�Z
d	�Zd
�Zd�Zd�Zd
�Zd�Zed��ZRS(s�
    Class responsible for all interactions with Yum, python version
    installation/removal and gathering info about already installed versions
    cC`st�dS(N(R(tself((sS/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectpython/pkgmanager.pyt_create_config_dirsss        {yum_cmd} list '{alt_names}*' --disablerepo='*' --enablerepo='cloudlinux-*' {disable_testing} 2>/dev/null | grep -io {alt_names}[[:digit:]][[:digit:]] | uniq > {cache_file}.tmp;
        mv {cache_file}.tmp {cache_file};
        rm -f {cache_file}.tmp;
        s)LANG=C yum --disableplugin=fastestmirror s!&>/var/log/cl-python-last-yum.logts-y install s{} s
-y remove cC`st�S(N(R(R((sS/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectpython/pkgmanager.pyt_scan_interpreter_versionsEscC`stdj|jdd��S(Ns{}/.lockt.R
(R	tformattreplace(Rtversion((sS/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectpython/pkgmanager.pyt_get_lock_file_pathHs	cC`s^|j�}|dkr&|j�dStjd|�}g|D]}dj|�^q?}|S(s�
        Should return list of major versions available to install from
        currently enabled repos.
            Note, this can be an empty list if no NodeJS version has been
            released to repos yet or in case of network/repos/yum problem.
        OR
            None if our cache is updating right now because it was
            absent/outdated/corrupted/etc.
        :rtype: list | None
        salt-python(\d+)RN(t_read_yum_cachetNonetupdate_yum_cachetretfindalltjoin(Rtdatat	availableR((sS/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectpython/pkgmanager.pytcheckout_availableLs

"cC`s3t|�sdj|�S|j�}|r/|SdS(s5Do some common pre-installation/uninstallation checkss>Invalid version "{}". It should be two digits separeted by dotN(RRt_check_yum_in_progress(RRt
working_error((sS/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectpython/pkgmanager.pyt_verify_actionascC`s|jj|jdd��S(s�
        Formatting cmd string for install package
        :return: formatted cmd string
        :param version: version of interpreter for installing
        :rtype: str
        RR
(t_install_cmdRR(RR((sS/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectpython/pkgmanager.pyt format_cmd_string_for_installingjscC`s|jj|jdd��S(s�
        Formatting cmd string for removing package
        :return: formatted cmd string
        :param version: version of interpreter for removing
        :rtype: str
        RR
(t_remove_cmdRR(RR((sS/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectpython/pkgmanager.pytformat_cmd_string_for_removingtscC`s&ddlm}|�}|j|�S(sJ
        Check what passed version isn't used any web-application
        i(tApplicationsManager(t$clselect.clselectpython.apps_managerR$tis_version_in_use(RR$tapps_manager((sS/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectpython/pkgmanager.pyt_is_version_in_use~s	(t__name__t
__module__t__doc__RRt_config_dirt
_mk_cache_cmdt_yum_cmdRt
_alt_namest
_redirect_logRR R"RRRRR!R#tstaticmethodR((((sS/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectpython/pkgmanager.pyR
s0	
						
	
(t
__future__RRRRt clselect.baseclselect.pkgmanagerRR
RRRRRR	R
(((sS/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectpython/pkgmanager.pyt<module>s.	

Zerion Mini Shell 1.0