%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/runners/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/runners/winrepo.pyo

�
���^c@@s'dZddlmZmZmZddlZddlmZyddlZWne	k
rmddl
ZnXddlmZm
Z
ddlZddlZddlZddlZddlZddlZddlZeje�ZdZejjjZdZded	�Z de!e!d
�Z"dS(
u(
Runner to manage Windows software repo
i(tabsolute_importtprint_functiontunicode_literalsN(tsix(tCommandExecutionErrortSaltRenderErroru
ssl_verifyurefspecsubranchc	C@s�|dkrt}n|d}|d}i}tjj|�sQtj|�ntjj|t	�}xAtj
jj|�D]*\}}}x|D]}	|	jd�r�y=tj
jtjj||	�||d|d|d�}
WnEtk
r+}tjdtjj||	��tjd|�q�nX|
r�i}x/tj|
�D]\}
}tjd	|
�x�tj|�D]�\}}tjd
|
|�t|tj�s�|
|
j|�|
|
tj|�<nt|t�sTdjtjj||	��}tj|�|rtytji|d6d
�WqNtk
rJtjd|�qNXqtqtn|
||d<qtWqHW|jdi�j |
�|jdi�j |�q�q�q�Wq|Wtj
j!j"tjj||�d��}|j#t$j%|��WdQX|S(uw
    Generate winrepo_cachefile based on sls files in the winrepo_dir

    opts
        Specify an alternate opts dict. Should not be used unless this function
        is imported into an execution module.

    fire_event : True
        Fire an event on failure. Only supported on the master.

    CLI Example:

    .. code-block:: bash

        salt-run winrepo.genrepo
    uwinrepo_diruwinrepo_cachefileu.slsurendererurenderer_blacklisturenderer_whitelistuFailed to render %s.u
Error: %s.u'Compiling winrepo data for package '%s'u(Compiling winrepo data for %s version %suFailed to compile {0}.uerroruprogressu^Attempted to fire the an event with the following error, but event firing is not supported: %su	full_nameurepouname_mapuw+bN(&tNonet__opts__tostpathtexiststmakedirstsalttloadertrendert__salt__tutilstos_walktendswithttemplatetcompile_templatetjoinRtlogtdebugRt	iteritemst
isinstancetstring_typestpopt	text_typetdicttformatt
__jid_event__t
fire_eventt	NameErrorterrort
setdefaulttupdatetfilestfopentwritetmsgpacktdumps(toptsR twinrepo_dirtwinrepo_cachefiletrett	rendererstroott_R%tnametconfigtexctrevmaptpkgnametversionstversiontrepodatatmsgtrepo((s8/usr/lib/python2.7/site-packages/salt/runners/winrepo.pytgenrepo+sr	

%
	
'


'cC@s�|dkrt}n|d}|d}||f|d|dfg}i}xx|D]p\}}ttjjjtjjjf�si}	x�|D]x}
d|
kr�|
jd�d}n|
}d}y|
j	�j�\}}
Wnt
k
r�|
}
nXtjj
||�jdd	�}|r�td
dd|
d
|ddd|dtdt�}t|t�r�tdjdj
|����nd|kr�tt|��}||}q�nCtjj|�}|jd|
d
|ddd|dtdt�}|d|	|d<q�W|j|	�qVy[tjjj||dtdtdtd|�}|j�|ro|j �n|j!�Wn9t"k
r�}dj|�}t#j$|dt%j&�|SX|j|j'�qVW|S(u�
    Checkout git repos containing Windows Software Package Definitions

    opts
        Specify an alternate opts dict. Should not be used unless this function
        is imported into an execution module.

    clean : False
        Clean repo cachedirs which are not configured under
        :conf_master:`winrepo_remotes`.

        .. warning::
            This argument should not be set to ``True`` if a mix of git and
            non-git repo definitions are being used, as it will result in the
            non-git repo definitions being removed.

        .. versionadded:: 2015.8.0

    CLI Examples:

    .. code-block:: bash

        salt-run winrepo.update_git_repos
        salt-run winrepo.update_git_repos clean=True
    uwinrepo_diruwinrepo_remotesuwinrepo_remotes_nguwinrepo_dir_ngu/i����uHEADu.u_ustate.singleu
git.latestR1trevtbranchuwinrepottargettforce_checkouttforce_resetu%Failed up update winrepo remotes: {0}u
unameuresulttper_remote_overridestper_remote_onlytglobal_onlyt
cache_rootu%Failed to update winrepo_remotes: {0}texc_info_on_loglevelN((RRtanyRRtgitfstGITPYTHON_VERSIONtPYGIT2_VERSIONtsplittstript
ValueErrorRR	RtreplaceRtTrueRtlistRRtnexttitertminiontMasterMiniontstatesR$tWinRepotPER_REMOTE_OVERRIDEStPER_REMOTE_ONLYtGLOBAL_ONLYt
fetch_remotestclear_old_remotestcheckoutt	ExceptionRR"tloggingtDEBUGtwinrepo_dirs(R*tcleant
masterlessR+twinrepo_remotestwinrepo_cfgR-tremotestbase_dirtwinrepo_resulttremote_infot
targetnameR<t
remote_urlt	gittargettresulttkeytmminiontwinrepoR3R9((s8/usr/lib/python2.7/site-packages/salt/runners/winrepo.pytupdate_git_repos�s~	

	


!
			

(u
ssl_verifyurefspecs(ubranch(#t__doc__t
__future__RRRRtsalt.extRR(tImportErrortmsgpack_puretsalt.exceptionsRRtsalt.utils.filesRtsalt.utils.gitfstsalt.utils.pathR]tsalt.miniontsalt.loadert
salt.templatet	getLoggert__name__RRVRRGRWRXRRNR;tFalseRo(((s8/usr/lib/python2.7/site-packages/salt/runners/winrepo.pyt<module>s*
X

Zerion Mini Shell 1.0