v_c@sddlZddlZddlZdZdZdZdefdYZdefdYZd efd YZ dS( iNcGs4tjd}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(Nit((tfots((s//usr/lib/python2.7/site-packages/yum/igroups.pyt _read_str.s   tInstalledGroupc BsVeZdZdZdZdZedddddd d d ZRS( cCs"||_t|_d|_dS(N(tgidtsett pkg_namestNonet environment(tselfR((s//usr/lib/python2.7/site-packages/yum/igroups.pyt__init__5s  cCs#|dkrdSt|j|jS(Ni(RtcmpR(Rtother((s//usr/lib/python2.7/site-packages/yum/igroups.pyt__cmp__:s cCs"t|}t|j|jS(N(Rtsortedt differenceR(RR((s//usr/lib/python2.7/site-packages/yum/igroups.pyt _additions?s cCs"t|}t|j|jS(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.pytGstfsetcCst|d|S(NR(tsetattr(Rtvalue((s//usr/lib/python2.7/site-packages/yum/igroups.pyRHstfdelcCst|ddS(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 BsVeZdZdZdZdZedddddd d d ZRS( cCs||_t|_dS(N(tevgidRt grp_names(RR(((s//usr/lib/python2.7/site-packages/yum/igroups.pyROs cCs#|dkrdSt|j|jS(Ni(RRR((RR((s//usr/lib/python2.7/site-packages/yum/igroups.pyRSs cCs"t|}t|j|jS(N(RRRR)(RR)((s//usr/lib/python2.7/site-packages/yum/igroups.pyRXs cCs"t|}t|j|jS(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|ddS(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      tInstalledGroupscBseZdZdZdZdZedZdZdZ d dZ dZ 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|jtjs)dSt|j}ytt|}Wntk rbdSX|dkrsdStt|}x|dkr|d8}tt|}||j |j (t grp_filenameRR4R5RR6R R7R'R/R(R)R8tAssertionErrorR,R( RR2R R9R:tevgrpR<tgrpnametmemb((s//usr/lib/python2.7/site-packages/yum/igroups.pyR1s4        cCsdS(N((R((s//usr/lib/python2.7/site-packages/yum/igroups.pytclosescCs| r|j rtStjj|j}tjj|sjyt|Wqjtt fk rf}tSXntj |tj stS|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.pytsaves  cCst|jdd}|jd|jdt|jxvt|jjD]_}|jd|j|jdt|jx(t|jD]}|jd|qWqSW|j t j |jd|jdS(Ns.tmptws1 s%u s%s ( RR3twritetlenR,RtvaluesRRRDRtrename(RR R;tpkgname((s//usr/lib/python2.7/site-packages/yum/igroups.pyRKs  cCs#t|jdd}|jd|jdt|jxt|jjD]}|jd|j|jdt|jxmt|jD]\}|jd|||j kr|j |j |jkr|jdq|jd qWqSW|j t j |jd|jdS( 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.pyRLs  cCst|_||jkr.t||j|s