%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/modules/ |
Current File : //lib/python2.7/site-packages/salt/modules/layman.pyo |
� ���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d � Z d � Z d � Z d � Z d d � Z d � Z d � Z d S( u Support for Layman i ( t absolute_importt print_functiont unicode_literalsNc C@ s3 t d d k r) t j j j d � r) d St d f S( u; Only work on Gentoo systems with layman installed u osu Gentoou laymanuY layman execution module cannot be loaded: only available on Gentoo with layman installed.( t __grains__t saltt utilst patht whicht False( ( ( s7 /usr/lib/python2.7/site-packages/salt/modules/layman.pyt __virtual__ s %c C@ s8 d } d } t d | � r | St d | � r4 | Sd S( u� Find the correct make.conf. Gentoo recently moved the make.conf but still supports the old location, using the old location first u /etc/make.confu /etc/portage/make.confu file.file_existsN( t __salt__( t old_conft new_conf( ( s7 /usr/lib/python2.7/site-packages/salt/modules/layman.pyt _get_makeconf s c C@ s� t � } t � } d j | � } t d | d t d d �} | d d k rf t j j | d � � n t � } t | � d k r� t | � d k r� d } t � } t d | d � s� t d | | � q� n g | D] } | | k r� | ^ q� } | S( u' Add the given overlay from the cached remote list to your locally installed overlays. Specify 'ALL' to add all overlays from the remote list. Return a list of the new overlay(s) added: CLI Example: .. code-block:: bash salt '*' layman.add <overlay name> u layman --quietness=0 --add {0}u cmd.run_allt python_shellt stdinu yu retcodei u stdoutu source /var/lib/layman/make.confu file.containsu laymanu file.append( t listt list_localt formatR R R t exceptionst CommandExecutionErrort lenR ( t overlayt rett old_overlayst cmdt add_attemptt new_overlayst srclinet makeconf( ( s7 /usr/lib/python2.7/site-packages/salt/modules/layman.pyt add! s $ %c C@ s� t � } t � } d j | � } t d | d t �} | d d k r` t j j | d � � n t � } t | � d k r� d } t � } t d | d � r� t d | | d � q� n g | D] } | | k r� | ^ q� } | S( u Remove the given overlay from the your locally installed overlays. Specify 'ALL' to remove all overlays. Return a list of the overlays(s) that were removed: CLI Example: .. code-block:: bash salt '*' layman.delete <overlay name> u! layman --quietness=0 --delete {0}u cmd.run_allR u retcodei u stdoutu source /var/lib/layman/make.confu file.containsu laymanu file.sedu ( R R R R R R R R R R ( R R R R t delete_attemptR R R ( ( s7 /usr/lib/python2.7/site-packages/salt/modules/layman.pyt deleteD s %u ALLc C@ s) d j | � } t d | d t �d k S( u Update the specified overlay. Use 'ALL' to synchronize all overlays. This is the default if no overlay is specified. overlay Name of the overlay to sync. (Defaults to 'ALL') CLI Example: .. code-block:: bash salt '*' layman.sync u layman --quietness=0 --sync {0}u cmd.retcodeR i ( R R R ( R R ( ( s7 /usr/lib/python2.7/site-packages/salt/modules/layman.pyt synce s c C@ sd d } t d | d t �j d � } g | D]. } t | j � � d k r, | j � d ^ q, } | S( u� List the locally installed overlays. Return a list of installed overlays: CLI Example: .. code-block:: bash salt '*' layman.list_local u+ layman --quietness=1 --list-local --nocoloru cmd.runR u i i ( R R t splitR ( R t outt lineR ( ( s7 /usr/lib/python2.7/site-packages/salt/modules/layman.pyR w s ;c C@ sd d } t d | d t �j d � } g | D]. } t | j � � d k r, | j � d ^ q, } | S( u� List all overlays, including remote ones. Return a list of available overlays: CLI Example: .. code-block:: bash salt '*' layman.list_all u% layman --quietness=1 --list --nocoloru cmd.runR u i i ( R R R"