%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddlZ	ddl
mZmZddl
mZmZddlZddlmZeje�Zd�Zd�Zd	�Zd
�Zdd�ZdS(u;
Manage software from FreeBSD ports

.. versionadded:: 2014.1.0

.. note::

    It may be helpful to use a higher timeout when running a
    :mod:`ports.installed <salt.states.ports>` state, since compiling the port
    may exceed Salt's timeout.

    .. code-block:: bash

        salt -t 1200 '*' state.highstate
i(tabsolute_importtprint_functiontunicode_literalsN(tSaltInvocationErrortCommandExecutionError(t
_normalizet_options_file_exists(tsixcC@s,tjdd�dkr(dtkr(dStS(NuosuuFreeBSDu
ports.installuports(t
__grains__tgett__salt__tFalse(((s5/usr/lib/python2.7/site-packages/salt/states/ports.pyt__virtual__$s$cC@sPtgtjtjjj|��D]'\}}tj|�t|�f^q"�S(u!
    Repack the options data
    (	tdictRt	iteritemstsalttutilstdatatrepack_dictlistt	text_typeR(toptionstxty((s5/usr/lib/python2.7/site-packages/salt/states/ports.pyt_repack_options*scC@s;djgtj|�D]\}}dj||�^q�S(uv
    Returns the key/value pairs in the passed dict in a commaspace-delimited
    list in the format "key=value".
    u, u{0}={1}(tjoinRRtformat(RRR((s5/usr/lib/python2.7/site-packages/salt/states/ports.pyt_get_option_list6scC@s!|rdjt|��SdSdS(uS
    Common function to get a string to append to the end of the state comment
    u%with the following build options: {0}uwith the default build optionsN(RR(R((s5/usr/lib/python2.7/site-packages/salt/states/ports.pyt_build_option_string>s
cC@si|d6id6td6dj|�d6}yztd|dtdt�}td|dtdt�}|r�|tt|��}n|r�|tt|��}nWn:ttfk
r�}t|d<d	j||�|d<|SX|dk	r�t	|�ni}t
j|�}|j|�gt
jtd
dt��D]}|d^q9}||kr�||kr�|r�|dcd
t|�7<n|S|s�|r�t|d<dj|�|d<|Stdrd|d<dj|�|d<|Sng|D]}||kr�|^q�}	|	rAt|d<dj|dj|	��|d<|Stdr�d|d<dj|�|d<|dct|�7<|S|r�td|dt|�st|d<dj|�|d<|Sn;td|�t|�rt|d<dj|�|d<|Std|�|d<gt
jtd
dt��D]}|d^q1}
tjtdjjjdd�}|s|||
kr�t|d<n|dr�dj|�|d<|r|dcd
t|�7<qn5dj|�|d<|r|dcdj|�7<n|S( u-
    Verify that the desired port is installed, and that it was compiled with
    the desired options.

    options
        Make sure that the desired non-default options are set

        .. warning::

            Any build options not passed here assume the default values for the
            port, and are not just differences from the existing cached options
            from a previous ``make config``.

    Example usage:

    .. code-block:: yaml

        security/nmap:
          ports.installed:
            - options:
              - IPV6: off
    unameuchangesuresultu{0} is already installeducommentuports.showconfigtdefaulttdict_returnuwUnable to get configuration for {0}. Port name may be invalid, or ports tree may need to be updated. Error message: {1}u
pkg.list_pkgstwith_originuoriginu u?{0} does not have any build options, yet options were specifiedutestu{0} will be installedu4The following options are not available for {0}: {1}u, u{0} will be installed uports.configtresetuUnable to set options for {0}uports.rmconfiguUnable to clear options for {0}u
ports.installu	test.pinguports.install_erroruSuccessfully installed {0}uFailed to install {0}u. Error message:
{0}N(tTrueRR
RtnexttiterRRtNoneRtcopytdeepcopytupdateRt
itervaluesRt__opts__RRtsystmodulest
__module__t__context__tpop(tnameRtrettcurrent_optionstdefault_optionstexctdesired_optionsRt	ports_pretbad_optst
ports_postterr((s5/usr/lib/python2.7/site-packages/salt/states/ports.pyt	installedIs�
		

0



%




0

 (t__doc__t
__future__RRRR$tloggingR)tsalt.utils.dataRtsalt.exceptionsRRtsalt.modules.freebsdportsRRtostsalt.extRt	getLoggert__name__tlogRRRRR#R8(((s5/usr/lib/python2.7/site-packages/salt/states/ports.pyt<module>s				

Zerion Mini Shell 1.0