ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/yum/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/yum/igroups.pyc

�
8M�bc@s�ddlZddlZddlZd�Zd�Zd�Zdefd��YZdefd��YZd	efd
��YZ	dS(i����NcGs4tjd�}zt|�}Wdtj|�X|S(sk Annoying people like to set umask's for root, which screws everything
        up for user readable stuff. iN(tostumasktopen(targstoumasktret((s//usr/lib/python2.7/site-packages/yum/igroups.pyt_open_no_umasks
cGs7tjd�}ztj|�}Wdtj|�X|S(sk Annoying people like to set umask's for root, which screws everything
        up for user readable stuff. iN(RRtmakedirs(RRR((s//usr/lib/python2.7/site-packages/yum/igroups.pyt_makedirs_no_umask#s
cCs'x |D]}|d r|d SqWdS(Ni����t((tfots((s//usr/lib/python2.7/site-packages/yum/igroups.pyt	_read_str.s

tInstalledGroupc	BsVeZd�Zd�Zd�Zd�Zedd�dd�dd	�d
d�ZRS(cCs"||_t�|_d|_dS(N(tgidtsett	pkg_namestNonetenvironment(tselfR((s//usr/lib/python2.7/site-packages/yum/igroups.pyt__init__5s	cCs#|dkrdSt|j|j�S(Ni(RtcmpR(Rtother((s//usr/lib/python2.7/site-packages/yum/igroups.pyt__cmp__:scCs"t|�}t|j|j��S(N(Rtsortedt
differenceR(RR((s//usr/lib/python2.7/site-packages/yum/igroups.pyt
_additions?scCs"t|�}t|j|j��S(N(RRRR(RR((s//usr/lib/python2.7/site-packages/yum/igroups.pyt	_removalsCstfgetcCs|jS(N(R(R((s//usr/lib/python2.7/site-packages/yum/igroups.pyt<lambda>GstfsetcCst|d|�S(NR(tsetattr(Rtvalue((s//usr/lib/python2.7/site-packages/yum/igroups.pyRHstfdelcCst|dd�S(NR(RR(R((s//usr/lib/python2.7/site-packages/yum/igroups.pyRIstdocs.Compat. to treat comps groups/igroups the same(t__name__t
__module__RRRRtpropertytgroupid(((s//usr/lib/python2.7/site-packages/yum/igroups.pyR
4s						tInstalledEnvironmentc	BsVeZd�Zd�Zd�Zd�Zedd�dd�dd	�d
d�ZRS(cCs||_t�|_dS(N(tevgidRt	grp_names(RR(((s//usr/lib/python2.7/site-packages/yum/igroups.pyROs	cCs#|dkrdSt|j|j�S(Ni(RRR((RR((s//usr/lib/python2.7/site-packages/yum/igroups.pyRSscCs"t|�}t|j|j��S(N(RRRR)(RR)((s//usr/lib/python2.7/site-packages/yum/igroups.pyRXscCs"t|�}t|j|j��S(N(RRRR)(RR)((s//usr/lib/python2.7/site-packages/yum/igroups.pyR\sRcCs|jS(N(R((R((s//usr/lib/python2.7/site-packages/yum/igroups.pyR`sRcCst|d|�S(NR((R(RR ((s//usr/lib/python2.7/site-packages/yum/igroups.pyRasR!cCst|dd�S(NR((RR(R((s//usr/lib/python2.7/site-packages/yum/igroups.pyRbsR"s.Compat. to treat comps groups/igroups the same(R#R$RRRRR%t
environmentid(((s//usr/lib/python2.7/site-packages/yum/igroups.pyR'Ns						tInstalledGroupscBs�eZd�Zd�Zd�Zd�Zed�Zd�Zd�Z	d
d�Zd�Zed	�Z
d
�Zd�Zed�ZRS(cCs9i|_t|_i|_|j|�|j|�dS(N(tgroupstFalsetchangedtenvironmentst_read_pkg_grpst_read_grp_grps(Rtdb_path((s//usr/lib/python2.7/site-packages/yum/igroups.pyRgs
			
cCs
|d|_tj|jtj�s)dSt|j�}ytt|��}Wntk
rbdSX|dkrsdStt|��}x�|dkr|d8}tt|��}||j	|j
<tt|��}x0|dkr|d8}|jjt|��q�Wq�WdS(Ns
/installedii(
tfilenameRtaccesstR_OKRtintRt
ValueErrorR
R,RRtadd(RR2R
tvert
groups_numtgrptnum((s//usr/lib/python2.7/site-packages/yum/igroups.pyR0os&



c	Csz|d|_tj|jtj�s)dSt|j�}ytt|��}Wntk
rbdSX|dkrsdStt|��}x�|dkru|d8}tt|��}||j	|j
<tt|��}x�|dkrq|d8}t|�}t|�}|jj|�|dks%t
�|dkr�||jksFt
�||jkrn|j
|j|_qnq�q�Wq�WdS(Ns/environmentiittruetfalse(R=R>(tgrp_filenameRR4R5RR6RR7R'R/R(R)R8tAssertionErrorR,R(	RR2R
R9R:tevgrpR<tgrpnametmemb((s//usr/lib/python2.7/site-packages/yum/igroups.pyR1�s4



cCsdS(N((R((s//usr/lib/python2.7/site-packages/yum/igroups.pytclose�scCs�|r|jrtStjj|j�}tjj|�sjyt|�Wqjtt	fk
rf}tSXntj
|tj�s�tS|j�|j
�t|_dS(N(R.R-RtpathtdirnameR3texistsRtIOErrortOSErrorR4tW_OKt_write_pkg_grpst_write_grp_grps(RtforceR2te((s//usr/lib/python2.7/site-packages/yum/igroups.pytsave�s

cCs�t|jdd�}|jd�|jdt|j��xvt|jj��D]_}|jd|j�|jdt|j��x(t|j�D]}|jd|�q�WqSW|j	�t
j|jd|j�dS(Ns.tmptws1
s%u
s%s
(RR3twritetlenR,RtvaluesRRRDRtrename(RR
R;tpkgname((s//usr/lib/python2.7/site-packages/yum/igroups.pyRK�s

cCs#t|jdd�}|jd�|jdt|j��x�t|jj��D]�}|jd|j�|jdt|j��xmt|j�D]\}|jd|�||j	kr�|j	|j
|jkr�|jd�q�|jd	�q�WqSW|j�tj
|jd|j�dS(
Ns.tmpRPs1
s%u
s%s
R=R>strue
sfalse
(RR?RQRRR/RRSR(R)R,RRDRRT(RR
RARB((s//usr/lib/python2.7/site-packages/yum/igroups.pyRL�s

cCs�t|_||jkr.t|�|j|<n|j|}x|D]}|jj|�qBW|dk	r�|j|_|j	j|�n|S(N(
tTrueR.R,R
RR8RR(RR)(RR&RtievgrpR;tpkg_name((s//usr/lib/python2.7/site-packages/yum/igroups.pyt	add_group�s	

cCs)t|_||jkr%|j|=ndS(N(RVR.R,(RR&((s//usr/lib/python2.7/site-packages/yum/igroups.pyt	del_group�s	c	Cs�i}|sgSx�|jd�D]�}|j�}||jkra|j|}|||j<q n|r�tjtj|��j}n$tjtj|�dtj	�j}t
}x=|jj�D],}||j�r�t}|||j<Pq�q�Wq W|j�S(Nt,tflags(
tsplittstripR,Rtretcompiletfnmatcht	translatetmatchtIR-RSRV(	Rt
group_patterntcase_sensitivetreturnstitemt	thisgroupRctdonetgroup((s//usr/lib/python2.7/site-packages/yum/igroups.pyt
return_groups�s&

$
cCs`t|_||jkr.t|�|j|<n|j|}x|D]}|jj|�qBW|S(N(RVR.R/R'R)R8(Rt	evgroupidR)R;tgrp_name((s//usr/lib/python2.7/site-packages/yum/igroups.pytadd_environments	

cCs)t|_||jkr%|j|=ndS(N(RVR.R/(RRm((s//usr/lib/python2.7/site-packages/yum/igroups.pytdel_environments	c	Cs�i}|sgSx�|jd�D]�}|j�}||jkra|j|}|||j<q n|r�tjtj|��j}n$tjtj|�dtj	�j}t
}x=|jj�D],}||j�r�t}|||j<Pq�q�Wq W|j�S(NR[R\(
R]R^R/R(R_R`RaRbRcRdR-RSRV(	Rtevgroup_patternRfRgRhRiRcRjRk((s//usr/lib/python2.7/site-packages/yum/igroups.pytreturn_environments s&

$
N(R#R$RR0R1RDR-RORKRLRRYRZRlRoRpRr(((s//usr/lib/python2.7/site-packages/yum/igroups.pyR+fs			 		
				(
RRaR_RRRtobjectR
R'R+(((s//usr/lib/python2.7/site-packages/yum/igroups.pyt<module>s			

Zerion Mini Shell 1.0