%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/cyg.pyo

�
���^c@@s�dZddlmZmZmZddlZeje�Zd�Z	ddd�Zddd�Zdddd�Z
d	efd
��YZdS(u�
Installation of Cygwin packages.

A state module to manage cygwin packages. Packages can be installed
or removed.

.. code-block:: yaml

    dos2unix:
      cyg.installed
i(tabsolute_importtprint_functiontunicode_literalsNcC@s
dtkS(u;
    Only load if cyg module is available in __salt__.
    ucyg.list(t__salt__(((s3/usr/lib/python2.7/site-packages/salt/states/cyg.pyt__virtual__sux86_64cC@sAi|d6dd6dd6id6}|dkrFt|d<d|d<|Stjd	j|��td
|d|d|�s�t|d<d
|d<|Std||�}||kr�t|d<d|d<|Stdr�dj|�|d<|Std|d|d|�r)t|d<d|d|<d|d<nt|d<d|d<|S(u7
    Make sure that a package is installed.

    name
        The name of the package to install

    cyg_arch : x86_64
        The cygwin architecture to install the package into.
        Current options are x86 and x86_64

    mirrors : None
        List of mirrors to check.
        None will use a default mirror (kernel.org)

    CLI Example:

    .. code-block:: yaml

        rsync:
          cyg.installed:
            - mirrors:
              - http://mirror/without/public/key: ""
              - http://mirror/with/public/key: http://url/of/public/key
    unameuresultuucommentuchangesux86ux86_64u8The 'cyg_arch' argument must be one of 'x86' or 'x86_64'u)Installed State: Initial Mirror list: {0}ucyg.check_valid_packagetcyg_archtmirrorsuInvalid package name.ucyg.listuPackage is already installed.utestu)The package {0} would have been installeducyg.installu	Installedu"Package was successfully installeduCould not install package.N(ux86ux86_64(tNonetFalsetLOGtdebugtformatRtTruet__opts__(tnameRRtrettpkgs((s3/usr/lib/python2.7/site-packages/salt/states/cyg.pyt	installeds:"


	





	



cC@si|d6dd6dd6id6}|dkrFt|d<d|d<|Std	|d
|d|�szt|d<d|d<|S|td
||�kr�t|d<d|d<|Stdr�dj|�|d<|Std||�rt|d<d|d|<d|d<nt|d<d|d<|S(u:
    Make sure that a package is not installed.

    name
        The name of the package to uninstall

    cyg_arch : x86_64
        The cygwin architecture to remove the package from.
        Current options are x86 and x86_64

    mirrors : None
        List of mirrors to check.
        None will use a default mirror (kernel.org)

    CLI Example:

    .. code-block:: yaml

        rsync:
          cyg.removed:
            - mirrors:
              - http://mirror/without/public/key: ""
              - http://mirror/with/public/key: http://url/of/public/key
    unameuresultuucommentuchangesux86ux86_64u8The 'cyg_arch' argument must be one of 'x86' or 'x86_64'ucyg.check_valid_packageRRuInvalid package name.ucyg.listuPackage is not installed.utestu'The package {0} would have been removedu
cyg.uninstalluRemovedu!Package was successfully removed.uCould not remove package.N(ux86ux86_64(RRRRR
R(RRRR((s3/usr/lib/python2.7/site-packages/salt/states/cyg.pytremoved^s2"


	








cC@sUidd6dd6dd6id6}|dkrFt|d<d	|d<|Std
r^d|d<|S|sttjd�ntd
d|�}td|d|�r=td
d|�}t||�}t|d<|j�r�d|d<qQt	|j
��|dd<t	|j��|dd<t	|j��|dd<d|d<nt|d<d|d<|S(u>
    Make sure all packages are up to date.

    name : None
        No affect, salt fails poorly without the arg available

    cyg_arch : x86_64
        The cygwin architecture to update.
        Current options are x86 and x86_64

    mirrors : None
        List of mirrors to check.
        None will use a default mirror (kernel.org)

    CLI Example:

    .. code-block:: yaml

        rsync:
          cyg.updated:
            - mirrors:
              - http://mirror/without/public/key: ""
              - http://mirror/with/public/key: http://url/of/public/key
    ucyg.updatedunameuresultuucommentuchangesux86ux86_64u8The 'cyg_arch' argument must be one of 'x86' or 'x86_64'utestu$All packages would have been updatedu#No mirror given, using the default.ucyg.listRu
cyg.updateRuNothing to update.uaddeduremoveduchangedu"All packages successfully updated.uCould not update packages.N(ux86ux86_64(
RRR
R	twarningRt
DictDifferRtsametlisttaddedRtchanged(RRRRtbeforetaftertdiffer((s3/usr/lib/python2.7/site-packages/salt/states/cyg.pytupdated�s0"








RcB@sDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(u�
    Calculate the difference between two dictionaries.

    (1) items added
    (2) items removed
    (3) keys same in both but changed values
    (4) keys same in both and unchanged values
    cC@sf|||_|_g||fD]}t|j��^q \|_|_|jj|j�|_dS(u'
        Iitialize the differ.
        N(tcurrent_dictt	past_dicttsettkeystcurrent_keyst	past_keystintersectiont	intersect(tselfRRtd((s3/usr/lib/python2.7/site-packages/salt/states/cyg.pyt__init__�s7cC@s|j|jkS(u5
        True if the two dicts are the same.
        (RR(R%((s3/usr/lib/python2.7/site-packages/salt/states/cyg.pyR�scC@s|j|jS(u9
        Return a set of additions to past_dict.
        (R!R$(R%((s3/usr/lib/python2.7/site-packages/salt/states/cyg.pyR�scC@s|j|jS(u@
        Return a set of things removed from past_dict.
        (R"R$(R%((s3/usr/lib/python2.7/site-packages/salt/states/cyg.pyR�sc@st�fd��jD��S(u?
        Return a set of the keys with changed values.
        c3@s/|]%}�j|�j|kr|VqdS(N(RR(t.0to(R%(s3/usr/lib/python2.7/site-packages/salt/states/cyg.pys	<genexpr>s(RR$(R%((R%s3/usr/lib/python2.7/site-packages/salt/states/cyg.pyR�sc@st�fd��jD��S(uA
        Return a set of the keys with unchanged values.
        c3@s/|]%}�j|�j|kr|VqdS(N(RR(R(R)(R%(s3/usr/lib/python2.7/site-packages/salt/states/cyg.pys	<genexpr>	s(RR$(R%((R%s3/usr/lib/python2.7/site-packages/salt/states/cyg.pyt	unchangeds(	t__name__t
__module__t__doc__R'RRRRR*(((s3/usr/lib/python2.7/site-packages/salt/states/cyg.pyR�s	
				(R-t
__future__RRRtloggingt	getLoggerR+R	RRRRRtobjectR(((s3/usr/lib/python2.7/site-packages/salt/states/cyg.pyt<module>s	B:A

Zerion Mini Shell 1.0