%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/states/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/states/makeconf.pyc

�
���^c@@scdZddlmZmZmZddlmZd�Zd�Zdddd�Z
d�ZdS(	u�
Management of Gentoo make.conf
==============================

A state module to manage Gentoo's ``make.conf`` file

.. code-block:: yaml

    makeopts:
      makeconf.present:
        - value: '-j3'
i(tabsolute_importtprint_functiontunicode_literals(tsixcC@sdtkrdStS(uC
    Only load if the makeconf module is available in __salt__
    umakeconf.get_varumakeconf(t__salt__tFalse(((s8/usr/lib/python2.7/site-packages/salt/states/makeconf.pyt__virtual__scC@s\|dkrt�St|t�sRt|tj�rC|j�}qRt|�}nt|�S(u
    Force var to be a set
    N(tNonetsett
isinstancetlistRtstring_typestsplit(tvar((s8/usr/lib/python2.7/site-packages/salt/states/makeconf.pyt	_make_setscC@sTiid6dd6|d6td6}|j�}td|�}|dkr#|dkr#|dkr#|dk	r�d}|j|�|d<qPtdr�d	}|j|�|d<d|d<qPtd
|d�}||ddkrd}|j|�|d<t|d<qPd
}|j|�|d<n-|dk	r |dk	rf||krfd}|j||�|d<qPtdr�d}|j||�|d<d|d<qPtd
||�}td|�}	|	dks�|	|kr�d}|j|�|d<t|d<qPd}||d<|j|�|d<n0|dk	s8|dk	rPt|�}
t|�}t|�}t|
j	|��dkr�d}|j|�|d<t|d<qPt
�}
t
�}|dk	r�|
j|�}
n|dk	r�|j	|�}nt|
�dkr+t|�dkr+d}|j|�|d<qPtdr�dj|�}t|
�dkrr|djt|
��7}nt|�dkr�|djt|��7}n|d7}||d<d|d<qPx|
D]}td||�q�Wx|D]}td||�q�Wtd|�}	ii|d6|	d6|6|d<d}|j|�|d<n|S(uB
    Verify that the variable is in the ``make.conf`` and has the provided
    settings. If value is set, contains and excludes will be ignored.

    name
        The variable name. This will automatically be converted to upper
        case since variables in ``make.conf`` are in upper case

    value
        Enforce that the value of the variable is set to the provided value

    contains
        Enforce that the value of the variable contains the provided value

    excludes
        Enforce that the value of the variable does not contain the provided
        value.
    uchangesuucommentunameuresultumakeconf.get_varu,Variable {0} is already present in make.confutestu&Variable {0} is to be set in make.confumakeconf.set_varunewu*Variable {0} failed to be set in make.confuVariable {0} set in make.confu*Variable {0} is already "{1}" in make.confu/Variable {0} is to be set to "{1}" in make.confu Variable {0} is set in make.confiu6Variable {0} cannot contain and exclude the same valueu$Variable {0} is correct in make.confuVariable {0} is set tou
 append "{0}"u trim "{0}"u
 in make.confumakeconf.append_varumakeconf.trim_varuoldN(
tTruetupperRRtformatt__opts__RRtlentintersectionRt
differenceR
(tnametvaluetcontainstexcludestrett
upper_namet	old_valuetmsgtchangest	new_valuetcontains_settexcludes_sett
old_value_sett	to_appendtto_trim((s8/usr/lib/python2.7/site-packages/salt/states/makeconf.pytpresent)s�

$







		$






cC@s
iid6dd6|d6td6}|j�}td|�}|d
krfd}|j|�|d<n�tdr�d	}|j|�|d<d
|d<nstd
|�td|�}|d
k	r�d}|j|�|d<t|d<n#d}|j|�|d<t|d<|S(u�
    Verify that the variable is not in the ``make.conf``.

    name
        The variable name. This will automatically be converted to upper
        case since variables in ``make.conf`` are in upper case
    uchangesuucommentunameuresultumakeconf.get_varu-Variable {0} is already absent from make.confutestu0Variable {0} is set to be removed from make.confumakeconf.remove_varu0Variable {0} failed to be removed from make.confu'Variable {0} was removed from make.confN(RRRRRRR(RRRRRR((s8/usr/lib/python2.7/site-packages/salt/states/makeconf.pytabsent�s.





N(t__doc__t
__future__RRRtsalt.extRRRRR%R&(((s8/usr/lib/python2.7/site-packages/salt/states/makeconf.pyt<module>
s		|

Zerion Mini Shell 1.0