ok

Mini Shell

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

�
8M�bc@sddlZddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
ddlZddlZddl
mZmZddlmZmZddlZddlZddlmZmZddlZddlZd�Zd	�Zd
�Zdefd��YZd
fd��YZdefd��YZ defd��YZ!defd��YZ"defd��YZ#defd��YZ$d�Z%de&fd��YZ'd�Z(de&fd��YZ)d�Z*e+d kre*�ndS(!i����N(t	miscutils(tarch(tinitReadOnlyTransaction(tYumInstalledPackaget
parsePackages(tPackageSackBasetPackageSackVersion(t
to_unicodet_cGs4tjd�}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/rpmsack.pyt_open_no_umask(s
cGs7tjd�}ztj|�}Wdtj|�X|S(sk Annoying people like to set umask's for root, which screws everything
        up for user readable stuff. iN(R	R
tmakedirs(RR
R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_makedirs_no_umask3s
cGs7yt|�}Wntk
r,}d|fSX|dfS(s1 IOError wrapper BS for open, stupid exceptions. N(RtIOErrortNone(RRte((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_iopen>s
tRPMInstalledPackagecBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCsGt|_tj||d|j�||_||_t|_|`dS(Ntyumdb(	tTruet_has_hdrRt__init__RtidxtrpmdbtFalsethdr(tselftrpmhdrtindexR((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyRIs				cCsf|jr|jS|jj�}|jd|j�}y|j�SWntk
ratj	d�nXdS(NisRpmdb changed underneath us(
RRRt
readOnlyTStdbMatchRtnextt
StopIterationtErrorstPackageSackError(Rttstmi((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_get_hdrSs	
cCsy|jd�r%td||f�n|dkr@|j�}n|j�|_}t|_|dkru||}n|S(NRs%s has no attribute %sR(t
startswithtAttributeErrorR*RRR(Rtvarnametval((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt__getattr___s	
cCs�t�}xY|jD]N\}}}x<|jj|||�D]"}||kr;|j|�q;q;WqWxW|j|jD]E}x<|jj|dd�D]"}||kr�|j|�q�q�WqvWt|�S(s4return list of installed pkgs requiring this packageN(NNN(	tsettprovidesRtgetRequirestaddtfilelisttdirlistRtlist(Rtpkgsettreqntreqftreqevrtpkgtfn((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytrequiring_packagesss	cCsot�}xY|jD]N\}}}x<|jj|||�D]"}||kr;|j|�q;q;WqWt|�S(N(R0tstrong_requiresRtgetProvidesR3R6(RR7R8R9R:R;((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytrequired_packages�s	(t__name__t
__module__RR*R/R=R@(((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyRGs
	
			tRPMDBProblemcBs eZdZd�Zd�ZRS(sJ
    Represents a problem in the rpmdb, from the check_*() functions.
    cKs;||_||_x"|D]}t||||�qWdS(N(R;tproblemtsetattr(RR;RDtkwargstkwarg((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�s		
cCs8|dkrdSt|j|j�p7t|j|j�S(Ni(RtcmpR;RD(Rtother((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt__cmp__�s(RARBt__doc__RRJ(((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyRC�s	tRPMDBProblemDependencycBseZd�ZRS(cCsa|jdkr,d|jtd�|jfSd|jtd�|jdjtt|j��fS(Ntrequiress%s %s %sshas missing requires ofs%s %s %s: %sshas installed conflictss, (	RDR;Rtmissingtfoundtjointmaptstrt	conflicts(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt__str__�s
(RARBRT(((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyRL�stRPMDBProblemDuplicatecBseZd�Zd�ZRS(cKstj||d|�dS(Nt	duplicate(RCR(RR;RF((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�scCstd�|j|jfS(Ns%s is a duplicate with %s(RR;RV(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyRT�s(RARBRRT(((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyRU�s	tRPMDBProblemObsoletedcBseZd�Zd�ZRS(cKstj||d|�dS(Nt	obsoleted(RCR(RR;RF((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�scCstd�|j|jfS(Ns%s is obsoleted by %s(RR;t	obsoleter(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyRT�s(RARBRRT(((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyRW�s	tRPMDBProblemProvidescBseZd�Zd�ZRS(cKstj||d|�dS(NR1(RCR(RR;RF((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�scCstd�|j|jfS(Ns%%s provides %s but it cannot be found(RR;tprovide(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyRT�s(RARBRRT(((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyRZ�s	tRPMDBPackageSackcBs�eZdZiejejejfd6ejejej	fd6ej
ejejfd6ej
ejejfd6ZeZddWdWdd�Zd�ZeedW�Zd	�Zd
�Zd�Zd�Zd
�Zdd�Zd�Zdd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&e'j(Z)dWdWd�Z*dWd�Z+e,e-d��Z.e,d��Z/dWdWe-d�Z0d�Z1d �Z2d!�Z3d"�Z4d#�Z5d$�Z6d%�Z7d&�Z8d'�Z9d(�Z:d)�Z;d*�Z<d+�Z=d,�Z>d-�Z?d.�Z@d/�ZAd0�ZBd1�ZCd2�ZDd3�ZEed4�ZFd5�ZGd6�ZHd7�ZId8�ZJe-id9�ZKe,d:��ZLe-d;�ZMgd<�ZNdWdWdWdWdWd=�ZOd>�ZPdWd?�ZQd@�ZRdWdWdWdWdWdA�ZSdB�ZTdC�ZUdD�ZVdE�ZWdF�ZXdG�ZYdWdWdWdWdWdH�ZZdI�Z[dJ�Z\dK�Z]e,dL��Z^dWdXdM�Z_dN�Z`dWdYdO�ZadP�ZbdQ�ZcdWdR�ZddS�ZegdT�ZfdU�ZgdV�ZhRS(Zs*
    Represent rpmdb as a packagesack
    RMR1RSt	obsoletest/s/var/lib/yumcCs�||_i|_i|_t�|_i|_t|_t�|_t�|_	t�|_
g|_i|_i|_
t|_|dkr�|d}n|j|�tjj|�j|j�s�|d||_n	||_ttd�rtjd�}nd}tjj|d|�|_d|_d|_i|_d|_||_t|_d|_ iid6id6id6id	6|_!tjj|jd
�}tjj|d�}t"d|d
|�|_#dS(Ns/rpmdb-indexesR^texpandMacros%_dbpaths/var/lib/rpmR1RMRSR]s/yumdbs/versiontdb_pathtversion_path($troott_idx2pkgt	_name2pkgR0t_pkgnames_loadedt_tup2pkgRt_completely_loadedt_pkgname_failst_pkgmatch_failst_provmatch_failst_simple_pkgtup_listt_get_pro_cachet_get_req_cachet_loaded_gpg_keysRtsetCacheDirR	tpathtnormpathR+t_persistdirthasattrtrpmR_t
_rpmdbpatht_have_cached_rpmdbv_datat_cached_conflicts_datat_trans_cache_storeR(t
releasevert
auto_closet_cached_rpmdb_mtimet_cachetRPMDBAdditionalDataR(RRbRytcachedirt
persistdirtdbpathtaddldb_pathRa((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�sN									

								
cCs�|js<|jdt�}|dk	r<|j�|_q<n|js~x6|j�D]%\}}|jj|j|��qRWn|jS(sTGetter for the pkglist property. 
        Returns a list of package tuples.
        t
load_packagesN(RktpreloadPackageChecksumsRRtkeyst
_get_packagestappendt
_hdr2pkgTuple(RtcsumpkgtupsRR)((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_get_pkglists		 cCs�i|_i|_t�|_i|_t|_t�|_t�|_t�|_	g|_
i|_i|_t
dk	r�t
j�niid6id6id6id6|_d|_d|_|j�d|_dS(s� Drop all cached data, this is a big perf. hit if we need to load
            the data back in again. Also note that if we ever call this while
            a transaction is ongoing we'll have multiple copies of packages
            which is _bad_. R1RMRSR]N(RcRdR0ReRfRRgRiRhRjRkRlRmtmiscRtunshare_dataR|RvRwttransactionResetR{(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytdropCachedDatas,							

		
cCs�t|_t�|_t�|_g|_i|_i|_tdk	rUtj
�niid6id6id6id6|_d|_d|_
|j�|jd}tjj|�|_d�}g}x�|D]�}|jj|j�||j|j�|jtjkrq|jj|j�|j|�|jrq|j|j}||j |j!�||j|j�qqn|jtj"kr�||j |j#j!�||j|j�q�q�Wx�|D]�}|j\}}}	}
}|j$||	|
||�}|s|j%d|�q�n|d}|j#j&�}
|
dkr;q�nt'|
d�t'|
d	�}}d
|j(j)ks�d|j(j)kr�q�n||j(j)d
<||j(j)d<q�WdS(
s� Drop cached data that is assocciated with the given transaction,
            this tries to keep as much data as possible and even does a
            "preload" on the checksums. This should be called once, when a
            transaction is complete. R1RMRSR]s	/PackagescSs||kr||=ndS(sZ Make sure we never traceback here, because it screws our yumdb
                if we do. N((txty((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt	_safe_del[ssdCDPT(pkg checksums): %siit
checksum_typet
checksum_dataN(*RRgR0RiRjRkRlRmR�RR�R|RvRwR�RuR	RptgetmtimeR{RetdiscardtnameRdtoutput_statet	constantstTS_INSTALL_STATESRhR�t	reinstallRftpkgtupRcRtTS_REMOVE_STATEStpotsearchNevrat_deal_with_bad_rpmdbcachetreturnIdSumRRt
yumdb_infot_read_cached_data(Rttxmbrst
rpmdbfnameR�tprecachettxmbrtipotntaRtvtrR;tcsumtTtD((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytdropCachedDataPostTransaction8sd					

		

	

	
	
!cCs�tjj|�j|j�s5|jd||_n
d||_t|d�r|tjj|jd�}||jj_	ndS(s Sets the internal cachedir value for the rpmdb, to be the
            "rpmdb-indexes" directory in the persisent yum storage. R^Rs/versionN(
R	RpRqR+Rbt	_cachedirRsRtconfRa(RR~Ra((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyRo�s
cCsL|js!td|j�|_n|jjsEtd|j�|_n|jS(NRb(R(RRbR(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR"�s
	cCsdS(N((R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytbuildIndexes�sterrorcCsdS(N((Rtfailure((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt
_checkIndexes�scCsdS(N((Rtobj((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt
delPackage�stlikec
Cs�i}|jdd}|jd|tj|fg�}x9|D]1\}}|j||�}|j|j|�q?W|j|�}	x!|	D]}|j|j|�q�W|j�S(NR1itpatterns(	t	DEP_TABLER�RttRPMMIRE_GLOBt_makePackageObjectt
setdefaulttpkgidtsearchFilestvalues(
RR�t
query_typetresultttagR)RRR;tfileresults((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt	searchAll�s!
cCsji}tjj|�}xE|jd|�D]1\}}|j||�}|j|j|�q+W|j�S(s;search the filelists in the rpms for anything matching namet	basenames(R	RpRqR�R�R�R�R�(RR�R�RRR;((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR��scCsq|j|j|�}|dk	r&|Stj|�\}}\}}}t}	tj|�ret}	ni}|j|d}
x�|j	|
tj
|��D]h\}}|j||�}
|	s�|
j||||||ff�r|
||
j
<qq�|
||
j
<q�W|dkrP|ddkrP|j|�}x|D]}|||j
<q6Wn|j�}||j||<|S(NiR1R^(R|tgetRR�tstring_to_prco_tupleRtre_globRR�R�tto_utf8R�t	checkPrcoR�R�R�(RR�tprcotypeR�R�tfRR�R�tglobR�RRR�R�R;((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt
searchPrco�s,!	($
cCsB||jkrgS|j|d�}|s>|jj|�n|S(NR1(RjR�R3(RR�R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytsearchProvides�scCs|j|d�S(NRM(R�(RR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytsearchRequires�scCs|j|d�S(NR](R�(RR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytsearchObsoletes�scCs|j|d�S(NRS(R�(RR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytsearchConflicts�scCs|jS(N(tpkglist(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt
simplePkgList�scCsj|s
dS|\}}|jd|d|�}|sGtjd|�ngtj|�D]}|j^qWS(NR�RsNo Package Matching %s(t_searchR&R'R�tnewestInListR�(RtnaTupR�R�RtallpkgR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytreturnNewestByNameArchscCsB|s
dS|jd|�}|s5tjd|�ntj|�S(NR�sNo Package Matching %s(R�R&R'R�R�(RR�tallpkgs((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytreturnNewestByNamescCs�|st|�tjkr dSg}xm|D]e}|s?q-n|d}|dkr^d}n|rs|j�}n|j|tj||�f�q-W|S(Nit?t*t[(R�R�R�(tlenR�tPATTERNS_MAXRtlowerR�R�tcompile_pattern(R�tignore_caseRtpattqpat((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_compile_patternss

	#cCs?|dkrtSx(|D] \}}|d}|dkrBd}nt|�}|dd}|rq|j�}n|dk	r�||kr�||dkr�qn||d�r�tS|d|�r�tS|d|�r�tS|d|�r�tS|d|�rtS||d	|�rtS|d
|d|�rtSqWtS(
s< This is basically parsePackages() but for rpm hdr objects. tepocht0R�is)%(name)s-%(version)s-%(release)s.%(arch)ss%(name)s.%(arch)ss%(name)s-%(version)ss %(name)s-%(version)s-%(release)ss*:%(name)s-%(version)s-%(release)s.%(arch)ss	%(name)s-s!:%(version)s-%(release)s.%(arch)sN(RRRRR�R(t
repatternsRR�R�trepatR�tqname((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_match_repattern/s:
	(	
c
Cs||jr�|r�g}xz|D]k}|j|g�}|s{|rEPntj|�rXPnd|krhPnd|kr{Pq{n|j|�qW|Sng}|r|rg}xY|D]Q}||jkr�q�n||jkr�|j|j|�q�n|j|�q�W|}|s|Sn|js�|j	||�}xB|j
�D]4\}	}
|j||	|�rC|j|	|
�qCqCW|dk|_n|jj�}|jr�g|D]}|jdkr�|^q�}n|rxt|||�}|jj|d�|r|d|d|}n|d|d}xG|D]<}x3|D]+}|j|krB|jj|j�qBqBWq5Wn|S(s�Returns a list of packages. Note that the packages are
           always filtered to those matching the patterns/case. repoid is
           ignored, and is just here for compatibility with non-rpmdb sacks. t-t.s
gpg-pubkeyiiiN(RgtsearchNamesR�R�textendRiReRdR�R�R�R�R�RRcR�RnR�RtupdateR3(
RtrepoidR�R�RR�tpkgsttpatstrpatsRRt
pkgobjlistR;((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytreturnPackagesRs`	
	

		+

!cCs�|jdkr�i}x�|jd�D]u\}}|tjsDq%n|j||�}|||j<|jrrq%n||_t	|_|j
t|_|`q%W|j�|_n|jS(s� Load the packages which have conflicts from the rpmdb, newer
            versions of rpm have an index here so this is as fast as
            cached (we test rpm version at cache write time). tconflictnameN(
RwRR�RttRPMTAG_CONFLICTNAMER�R�RRRRSRR�(RR�RRR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt _uncached_returnConflictPackages�s 

				
cCs�tj|jtj�sdS|jd}t|dd�}|jd|�|jdt|��x9t|�D]+}x"|jD]}|jd|�q�WqqW|j	�tj
|d|�dS(Ns
/conflictss.tmptws%s
s%u
(R	taccessR�tW_OKRtwriteR�tsortedR�tclosetrename(RR�trpmdbvtconflicts_fnametfoR;tvar((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_write_conflicts_new�s

cCs*|jdt�d}|j||�dS(Nt	main_onlyi(t
simpleVersionRR(RR�R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_write_conflicts�scCs�|jdkr�i}x�|jd�D]u\}}|tjsDq%n|j||�}|||j<|jrrq%n||_t	|_|j
t|_|`q%W|j�|_n|jS(s� Load the packages which have obsoletes from the rpmdb, this is
            needed because newer rpm's have obsoletes imply conflicts. tobsoletenameN(
t_cached_obsoletes_dataRR�RttRPMTAG_OBSOLETENAMER�R�RRRR]RR�(RR�RRR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt _uncached_returnObsoletePackages�s 

				
cCs�tj|jtj�sdS|jd}t|dd�}|jd|�|jdt|��x9t|�D]+}x"|jD]}|jd|�q�WqqW|j	�tj
|d|�dS(Ns
/obsoletess.tmpR�s%s
s%u
(R	R�R�R�RR�R�R�R�RR(RR�Rtobsoletes_fnameRR;R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_write_obsoletes_new�s

cCs*|jdt�d}|j||�dS(NRi(RRR(RR�R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_write_obsoletes�scCsxtj|jd�tj|jd�tj|jd�tj|jd�tj|jd�tjd|�dS(s� This shouldn't be called, but people are hitting weird stuff so
            we want to deal with it so it doesn't stay broken "forever". s/versions
/conflictss
/obsoletess/file-requiress/pkgtups-checksumssRpmdb checksum is invalid: %sN(R�tunlink_fR�R&R'(Rtcaller((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR��s
cCsR|js
dSd�}|jd|}t|�\}}|dkrIdS|j�}|jdt�d}|s�||d kr�dSg}y�t||��}	xq|	dkr|	d8}	||�||�||�||�||�f}
t|
d�|j|j	|
��q�W|j�dkr+dSWnt
k
rM|j|�dSX|S(	NcSs|j�d S(Ni����(treadline(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt	_read_strsR^Rii����iit(t__cache_rpmdb__RR�RRRRtintR�tsearchPkgTuplet
ValueErrorR�(RtfnameRt
full_fnameRRtfrpmdbvRRtpkgtups_numR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt
_read_pkglists4		
!

cCs|jd�|_|jS(NRS(RRw(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_read_conflicts3scCs|jr||jd<ndS(NRS(RRx(RR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt transactionCacheConflictPackages7s	cCsD|j�}|dkr@|j�}|jr@|j|�q@n|S(s0 Return a list of packages that have conflicts. N(RRR�RR	(RR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytreturnConflictPackages;s	cCs|jr||jd<ndS(NR](RRx(RR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt transactionCacheObsoletePackagesEs	cCs|jd�|_|jS(NR](RR(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_read_obsoletesIscCsD|j�}|dkr@|j�}|jr@|j|�q@n|S(s0 Return a list of packages that have obsoletes. N(R#RR
RR(RR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytreturnObsoletePackagesMs	cCs�|jsi|_dSd|jkrE|jd}|j||�nd|jkrt|jd}|j||�nd|jkr�|jd}|j||�nd|jkr�|jd}|j||�ni|_dS(s� We are going to do a transaction, and the parameter will be the
            rpmdb version when we finish. The idea being we can update all
            our rpmdb caches for that rpmdb version. NRSR]s
file-requiresspkgtups-checksums(RRxRRt_write_file_requirest_write_package_checksums(RRR�tdata((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyttransactionResultVersionWs 		



cCs
i|_dS(s� We are going to reset the transaction, because the data we've added
            already might now be invalid (Eg. skip-broken, or splitting a
            transaction). N(Rx(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�rscCsa|j�}|jdd�}g}x6|D].}t|_|j|j||j���q+W|S(s/ Return packages of the gpg-pubkeys ... hacky. R�s
gpg-pubkey(R"R#RRnR�R�tinstance(RR(R)RR((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytreturnGPGPubkeyPackagesys
	#cCsXd�}|jst�t|jd�\}}|dkrAd
S|jdt�d}|j�}|sz||d kr~dSi}i}y�t||��}x�|dkrP|d8}||�||�||�||�||�f}	t|	d�t||��}
x?|
dkrL|
d8}
||�}|j	|	g�j
|�qWq�Wt||��}
x�|
dkr|
d8}
||�}t||��}xt|dkr|d8}||�||�||�||�||�f}	t|	d�|j	|g�j
|	�q�WqfW|j�dkr+dSWntk
rM|jd	�d
SX||fS(NcSs|j�d S(Ni����(R(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�ss/file-requiresRii����iiRs
file requires(NN(NN(NN(NN(
RtAssertionErrorRR�RRRRRR�R�RR�(RRRRRRtiFRtiFPRR�t	files_numR((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_read_file_requires�sP	
!
!

!!

cCs�|jr:|j�\}}|dk	r:|t�|fSni}t�}t�}x�|j�D]�}x�|jD]�\}}}	|jd�s�qon|j|jg�j	|�||kro|j
|||	�}
|j|�|
s�|j|�q�qoqoWq_Wt�}x!|j�D]}|j
|�qWi}
x=|D]5}g|j
|�D]}|j^qN}||
|<q8W|||
f}|jr�|jdt�d}|j||�n|S(s� Get a cached copy of the fileRequiresData for
            depsolving/checkFileRequires, note the giant comment in that
            function about how we don't keep this perfect for the providers of
            the requires. R^RiN(RR/RR0R�RMR+R�R�R�R?R3t
itervaluesR�RRR%(RR,R-tinstalledFileRequirestinstalledUnresolvedFileRequirestresolvedR;R�tflagtevrtdeptfileRequirestfnamestinstalledFileProvidersRtpkgtupsRR((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytfileRequiresData�s<			
	
%		cCs=|js
dS|s|rdS|||f}||jd<dS(Ns
file-requires(RRx(RR1R2tinstalledFileProvidestproblemsR'((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyttransactionCacheFileRequires�s		cCs�tj|jtj�sdS|\}}}|r5dSt|jdd�}|jd|�|jdt|��x�t|�D]w}x|D]}|jd|�q�Wt||�}	|jdt|	��x%t|	�D]}
|jd|
�q�Wq�W|jdt|��x�t|�D]w}
|jd|
�t||
�}|jdt|��x6t|�D](}x|D]}|jd|�qwWqjWqW|j	�tj
|jd|jd�dS(Ns/file-requires.tmpR�s%s
s%u
s/file-requires(R	R�R�R�RR�R�R�R0RR(RtrpmdbversionR'R1R2R<RR�Rt	filenamesRR:((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR%�s4


c	Csd|js
dSd�}t|jd�\}}|dkr?dS|jdt�d}|j�}|sx||d kr|dSi}y�t||��}x�|dkr5|d8}||�||�||�||�||�f}	t|	d�||�}
||�}|
d	kr"d||	<q�|
|f||	<q�W|j�d
krLdSWntk
rn|j	d�dSX|sy|Sx�|D]�}	||	dkr�q�n|	\}}
}}}|j
|||||
�}|s�|j	d|||||
f�q�n|d}||	\}
}d
|jjks�d|jjkr<q�n|
|jjd
<||jjd<q�WdS(sI As simpleVersion() et. al. requires it, we "cache" this yumdb data
            as part of our rpmdb cache. We cache it with rpmdb data, even
            though someone _could_ use yumdb to alter it without changing the
            rpmdb ... don't do that.
            NOTE: This is also used as a cache of pkgtups in the rpmdb. NcSs|j�d S(Ni����(R(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR&ss/pkgtups-checksumsRii����iiR�Rs
pkg checksumsspkg checksums: %s-%s:%s-%s.%sR�R�(
RRR�RRRRRRR�R�R�R�(RR�RRRRRR�RR�R�R�R�R�R�R�R;((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�s\		
!



	
cCs|js
dS||jd<dS(Nspkgtups-checksums(RRx(Rtpkg_checksum_tups((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt transactionCachePackageChecksums`s	cCstj|jtj�sdS|}t|jdd�}|jd|�|jdt|��xst|�D]e\}}x|D]}|jd|�q�W|dkr�d}nx|D]}|jd|�q�WqmW|j	�tj
|jd|jd�dS(Ns/pkgtups-checksums.tmpR�s%s
s%u
R�s/pkgtups-checksums(R�R�(R	R�R�R�RR�R�R�RRR(RR?R'RARR�tTDR((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR&fs 
	

cCs�|jdk	r|jS|js#dS|jd}|jd}tjj|�r�tjj|�r�tjj|�}tjj|�}||kr�t	|�\}}|dkr�dS|j
�d }||_q�n|jS(s. Return the cached string of the main rpmdbv. s/versions	/Packagesi����N(RvRRR�RuR	RptexistsR�RR(RtrpmdbvfnameR�tnmtimetomtimeRRR((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_get_cached_simpleVersion_mainys 	

$cCs8t|�|_|jsdS|jdkr/dS|jd}tjj|�sRdStjj	|�}|j|krwdS|j
d}tj|j
tj�s�tjj|j
�r�dSyt
|j
�Wq�ttfk
r�}dSXnt|dd�}|j|j�|jd�|j�tj|d|�dS(Ns	/Packagess/versions.tmpR�s
(RRRvRR{RRuR	RpRDR�R�R�R�RRtOSErrorRR�RR(RRR�R{RERR((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_put_cached_simpleVersion_main�s0	



c
Csd�}|r;|r;|j�}|dk	r;|igSnt�}i}i}i}xvt|j��D]b}	|	j}
d}d|
kr�d|
kr�|
j|
jf}n|j|	|�x^|D]V}|	j	||kr�||krt�||<i||<n||j|	|�q�q�W|r(qind}
d}d|	jkrtd|	jj
}
d|	jkrt|	jj}qtn|||
||	|�x>|D]6}|	j	||kr�||||
||	|�q�q�WqiW|jdkr�|j
|�n|r||||gS||gS(	s5 Return a simple version for all installed packages. cSso|j|i�}|jdt��}|j||�|dk	rk|j|t��}|j||�ndS(N(R�RRR�(tireposR�trevR;R�tirevstrpsv((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_up_revs�sR�R�t	installedt	from_repot@tfrom_repo_revisionN(RHRRR�R�R�R�R�R�R�RQRSRvRJ(RRtgroupsRORtmainRKt	main_grpstirepos_grpsR;tydbiR�tgroupR�RL((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�sL	

		



%cCskd}x^|D]V}xM|D]E}t||�}|r|j�j|�dkr|d7}PqqWq
W|S(Nii����i(RR�tfind(tfieldst
searchstringsRtcounttstfieldtvalue((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_find_search_fields�s

!
cCs�|std�|�}ng}x]|j�D]O\}}|j|||�}|dkr.|j|j||�|f�q.q.W|S(NcSs
|j�S(N(R�(R�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt<lambda>�si(RQR�RaR�R�(RR[R\tloweredRRRR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt"searchPrimaryFieldsMultipleStrings�s&cCs4g}x'|D]}|j|jd|��q
W|S(NR�(R�R�(Rtnamest
returnListR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�s
cCs|j|||||�S(N(R�(RR�R�tvertrelR((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�scCsdS(N((Rtarchlist((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytexcludeArchsscCsA|j�}g|jdt�D]\}}|j||�^qS(Ntheaders(R"treturnLeafNodesRR�(RR�R(thR)((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyRlscoss|j�}|j||�}x2|D]*}|ddkr%||j�fVq%q%W~|jro|jj�ndS(sLdbMatch() wrapper generator that yields (header, index) for matches
        R�s
gpg-pubkeyN(R"R#R)RzR(R(RRtkwdsR(R)Rm((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�s
	c	CsA|dk	r||jkrgS|||||f}||jkrQ|j|gSt�}g}|jsx||jkr!|dk	r�|jj|g�}	|	s�|jj|�q�n|j	�}	xY|	D]Q}
xHdD]3}||dk	r�||t
|
|�kr�Pq�q�W|j|
�q�W|S|j�}|dk	rN|j
d|�}
n6|dk	ro|j
d|�}
n|j
�}
t|_t}x�|
D]�\}}|j||�}
|jj|
j�t}xHdD]3}||dk	r�||t
|
|�kr�Pq�q�W|j|
�q�W|r=|dk	r=|jj|�n|S(	s4List of matching packages, to zero or more of NEVRA.RRhRgR�R�N(sarchsrelsversepoch(sarchsrelsversepoch(RRhRftlocalsRgReRdR�R3R�tgetattrR�R"R�RRR�R�(RR�R�RgRhRR�tlocRR�R�R�R(R)tdoneRR((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�!sL	

)	
)cCs�||jkr|j|St|||�}||j|<|jj|jg�j|�||j|j<|jr�|j	dkr�|jd}tj
j|�|_	n|S(Ns	/Packages(RcRRdR�R�R�RfR�RR{RRuR	RpR�(RRR!R�R�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�Xs

cCs�tj|d�}tj|d�}tjt|d��}tjt|d��}|d}|dkrwd}nt|�}tj|�}tj|||||f�S(NR�RtversiontreleaseR�R�(R�t
share_dataRRR(RRR�RRgRhR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�es
	cCstjdtdd�|jS(NscgetPkgList() will go away in a future version of Yum.
Please access this via the pkglist attribute.t
stackleveli(twarningstwarntDeprecationWarningR�(R((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt
getPkgListts	
cCs9tjdtdd�g|j�D]\}}|^q#S(Ns6getHdrList() will go away in a future version of Yum.
Rvi(RwRxRyR�(RRR((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt
getHdrList{s	
cCs_tjdtdd�g}x3|jD](\}}}}}|j||f�q&Wtj|�S(Ns>getNameArchPkgList() will go away in a future version of Yum.
Rvi(RwRxRyR�R�Rtunique(RtlstR�RR�RgRh((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytgetNameArchPkgList�s	
cCsYtjdtdd�g}x-|jD]"\}}}}}|j|�q&Wtj|�S(Ns:getNamePkgList() will go away in a future version of Yum.
Rvi(RwRxRyR�R�RR|(RR}R�RR�RgRh((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytgetNamePkgList�s	
cCsTtjdtdd�g|jd|d|d|d|d|�D]}|j^qAS(	Ns@returnTuplebyKeyword() will go away in a future version of Yum.
RviR�RR�RgRh(RwRxRyR�R�(RR�RR�RgRhR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytreturnTupleByKeyword�s	
c	Cs�tjdtdd�|\}}}}}|jd|d|d|d|d|�}t|�d	kr{|d	}|jgSgSdS(
Ns?returnHeaderByTuple() will go away in a future version of Yum.
RviR�RR�RgRhi(RwRxRyR�R�R(	RtpkgtupleR�R�RR�R�R}titem((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytreturnHeaderByTuple�s	
*

cCsotjdtdd�|\}}}}}|d	kr@d}ng|j|||||�D]}|j^q\S(
s?returns a list of header indexes based on the pkgtuple provideds>returnIndexbyTuple() will go away in a future version of Yum.
Rviis(none)RR�N(Nis(none)R(RwRxRyRR�R(RR�R�RR�RsRtR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytreturnIndexByTuple�s	
	cCs
t�dS(N(tNotImplementedError(RR(((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytaddDB�scCs�|dkrd}nt|�tjkrEtj|�\}}}n>t|�tjtjfkru|\}}}nd}}}|tj	|�tj	|�tj	|�tj	|�ff}tj	|�S(s2 Given random stuff, generate a usable dep tuple. iN(
Rttypettypest
StringTypeRtstringToVersiont	TupleTypetListTypeR�Ru(R�tflagsRstr_etr_vtr_rtdeptup((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt
_genDeptup�s	c
Cs�tj|�}|j|||�}||jkr>|j|S|dd}|j|�}i}xk|D]c}|ddkr�|dkr�|ddfg||<qhn|jd|�}	|	rh|	||<qhqhW||j|<|S(s�searches the rpmdb for what provides the arguments
           returns a list of pkg objects of providing packages, possibly emptyiiiR^R1N(NNN(R�RuR�RlR�Rt
matchingPrcos(
RR�R�RsR�R�R�R�R�thits((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR?�s 

cCs)g|j|||�D]}|j^qS(N(R?R�(RR�R�RsR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytwhatProvides�sc
Cs�tj|�}|j|||�}||jkr>|j|S|dd}|j|�}i}xk|D]c}|ddkr�|dkr�|ddfg||<qhn|jd|�}	|	rh|	||<qhqhW||j|<|S(ssearches the rpmdb for what provides the arguments
           returns a list of pkgtuples of providing packages, possibly emptyiiiR^RMN(NNN(R�RuR�RmR�RR�(
RR�R�RsR�R�R�R�R�R�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR2�s 

cCs)g|j|||�D]}|j^qS(N(R2R�(RR�R�RsR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytwhatRequiresscCski}xRtj�D]D}x;tj|�D]*}x!|j|�D]}d||<q?Wq)WqWt|j��S(sqreturns a list of yum installed package objects which own a file
           that are currently running or in use.i(R�treturn_running_pidstget_open_filesR�R�R�(RR�tpidR<R;((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytreturn_running_packagessc	Cs!|dkr|j�}nt�}g}x�t|�D]�}x�|jD]�}|djd�rfqGn||krxqGn|\}}}|j|||�r�|j|�qGntj	j
j||�}tj
|||�}	t|dd|	�}
|j|
�qGWx|jD]	}|djd�r+qn|\}}}|j|||�}i}
xV|D]N}|jd|jdkr�|jd|jdkr�q\n|||
|<q\W|
}|s�qntj	j
j||�}tj
|||�}t|dd|d|�}
|j|
�qWq7W|S(	s& Checks for any missing dependencies. itrpmlibRMRNiRSRON(RR�R0R�R>R+R?R3tyumtdepsolveR�R�Rt
formatRequireRLR�RSR�(RR�t	providersR=R;trreqtreqR�RgRNtprobtcreqtrestnrestconflicting_poRO((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytcheck_dependenciessJ	

4	ccs�d}xvt|j��D]b}|j|kr4qn|jt|j��rRqn|dkrj|}qn||fV|}qWdS(N(RR�R�R�tintersectionR0tprovides_names(Rtignore_providestlastR;((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_iter_two_pkgsBsc	Cs�t|�}g}x�|j|�D]�\}}|j|jkrFq"n|j|�r�||kr�tj|j�r�|jdkr�q"ntj|j�r�|jdkr�q"q�n|jt|d|��q"W|S(s� Checks for any "duplicate packages" (those with multiple versions
            installed), we ignore any packages with a provide in the passed
            provide list (this is how installonlyworks, so we do the same). tnoarchRV(R0R�R�tverEQRtisMultiLibArchR�RU(RR�R=R�R;((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytcheck_duplicatesPs!!	cCs�g}g}x6t|j��D]"}|js4qn|j|�qWxMt|j��D]9}x0|j|�D]}|jt|d|��qnWqXW|S(s@ Checks for any packages which are obsoleted by other packages. RY(R�R�R]R�tobsoletedByRW(Rt
obsoletersR=R;tobspo((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytcheck_obsoletedcs	!cCs�g}xut|j��D]a}xX|jD]M}|\}}}||j|||�kr)|jt|d|��Pq)q)WqW|S(sq For each package, check that a provides search for it's name (and
            everything it provides) finds it. R[(R�R�R1R?R�RZ(RR=R;tprovtupR�R�Rs((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytcheck_providespsN(NNN(NNN(iRARBRKRttRPMTAG_REQUIRENAMEtRPMTAG_REQUIREVERSIONtRPMTAG_REQUIREFLAGStRPMTAG_PROVIDENAMEtRPMTAG_PROVIDEVERSIONtRPMTAG_PROVIDEFLAGSR�tRPMTAG_CONFLICTVERSIONtRPMTAG_CONFLICTFLAGSRtRPMTAG_OBSOLETEVERSIONtRPMTAG_OBSOLETEFLAGSR�RRRRR�tpropertyR�R�R�RoR"R�R�R�R�R�R�R�R�R�R�R�RtcontainsRPR�R�tstaticmethodRR�R�R�R�RR	R
RRR�RRR R!R"R#R$R(R�R*R/R;R>R%R�RBR&RHRJRRaRdR�R�RjRlR�R�R�R�RzR{R~RR�R�R�R�R�R?R�R2R�R�R�R�R�R�R�(((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR\�s�


	1			W						 						#N								$			
			
			
	<	(		&C				#7			7	
				
	
						/		
cCs|jdd�jdd�S(NR^Rt~(treplace(Rp((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt	_sanitize|sR}cBsJeZdZddd�Zd�Zd�Zdddd�Zd�ZRS(sQclass for access to the additional data not able to be stored in the
       rpmdbs/var/lib/yum/yumdbcCs�tj�|_||j_||j_t|j_i|_tj	j
|jj�s�y t|jj�t|j_Wq�t
tfk
r�}q�Xn*tj|jjtj�r�t|j_niid6|_dS(Ntattr(R�t
GenericHolderR�R`RaRtwritablet	_packagesR	RpRDRRRRIR�R�tyumdb_cache(RR`RaR((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�s	cCs`d|jj}tj|�}x:|D]2}tjj|�jd�d}||j|<q&WdS(Ns%s/*/*/R�i(R�R`R�R	RptbasenametsplitR�(RtglbtpkgdirstdR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_load_all_package_paths�s

c	Csu||jkr|j|S|\}}}}}t|�}d|jj|d|||||f}||j|<|S(Ns%s/%s/%s-%s-%s-%s-%si(R�R�R�R`(	RR�R�R�R�RR�R�tthisdir((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt
_get_dir_name�s
cCsd|r!|j|j|j�}n*|rB|rB|j||�}n	td�t|j|d|j�S(s<Return an RPMDBAdditionalDataPackage Object for this packages1Pass something to RPMDBAdditionalData.get_packageR�(R�R�R�RtRPMDBAdditionalDataPackageR�R�(RR�R�R�R�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytget_package�s	cCsdS(s�populate out the dirs and remove all the items no longer in the rpmd
           and/or populate various bits to the currently installed versionN((Rtrpmdbobj((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytsync_with_rpmdb�s	N(	RARBRKRRR�R�R�R�(((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR}�s		
cCs6|r#|ddkr#|d}ntj|�dkS(NiR^i(R�tvalidate_repoidR(R`((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_validate_from_repo�s
R�cBs�eZedddddddddd	g
�Zied6Zdd
�Zdd�Zd�Z	d
�Z
d�Zd�Zd�Z
d�Zd�Zd�Zd�Zd�Zed�Zd�Zdd�ZRS(R�treasontinstalled_byt
changed_byRQRStfrom_repo_timestampRytgroup_membertcommand_linecCs(||_||_i|_||_dS(N(t_conft_mydirR�t_yumdb_cache(RR�tpkgdirR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�s			cCsG||j|<|jdkr dSd}|dk	r>|j}n|dkr]||jkr]dS||jdkr|jd|d}|dk	r�|dk	r�|j|jf|j|jfkr�|jd|dj|�||j|<dSn|jd|d|krdSn||t|g�f|jd|<||j|<dS(s� Create caches for the attr. We have a per. object read cache so at
            worst we only have to read a single attr once. Then we expand that
            with (dev, ino) cache, so hardlink data can be read once for
            multiple packages. NiR�ii(	R�R�Rtst_nlinkt_auto_hardlink_attrstst_devtst_inoR3R0(RR�R`R<tinfotnlinkstsinfo((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_auto_cache�s&
$
#cCs�||jkr�|j|}||jdkrt|jd|dj|�|jd|dst|jd|=qtn|j|=ndS(s( Remove old values from the link cache. R�iN(R�R�(RR<tovalue((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_unlink_yumdb_caches
cCs�|jdkrtS|j|�||jdkr7tS|jd|dsRt�y^t|jd|d�j�}tj|d�t	j
||d�t	j|d|�WntSX|jd|dj|�||j|<t
S(sb If we have a matching yumdb cache, link() to it instead of having
            to open()+write(). R�is.tmpN(R�RRR�R+titerR$R�RR	tlinkRR3R(RR<R`tlfn((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_link_yumdb_caches 
!
cCstjj|jd|�S(s* Given an attribute, return the filename. R^(R	RpRqR�(RR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_attr2fn)scCs_tjj|j�s%t|j�nt|�}||jkrM|j|=n|j|�}|jd�r�t	d||f�n|dkr�t
j|jj
�n|j||�r�dSt
j|d�t|dd�}y|j|�Wn,ttfk
r}t	d||f�nX|j�|j�~tj|d|�|j|||�dS(Ns.tmpsCannot set attribute %s on %sR�R�R�(s
checksum_types
checksum_data(R	RpRDR�RR�R�R�tendswithR,R�RR�RaR�RR�RIRtflushRRR�(RR�R`R<RR((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_write-s.


c	Cs�t|�}||jkr&|j|S|j|�}|jd�rZtd||f�ntj|dt�}|dkr�td||f�n|j	dkr�|j
dk	r�|j|jf}||j
kr�|j
||j
|||�|j|Snt|�\}}|dkr$d|jS|j�}|j�~||jkr~|j|}||�s~td||f�q~n|j	dkr�|j
dk	r�||j
|<n|j
||||�|S(Ns.tmps%s has no attribute %st
ignore_EACCESis<E:%d>s#Invalid value of attribute %s on %s(R�R�R�R�R,R�tstat_fRRR�R�R�R�R�RterrnotreadRt_validators(	RR�R<R�tkeyRRR`tvalid((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_readSs:

cCs�t|�}|j|�}||jkr7|j|=n|j|�tjj|�r�ytj|�Wq�tt	fk
r�t
d||f�q�XndS(sremove the attribute files!Cannot delete attribute %s on %s N(R�R�R�R�R	RpRDtunlinkRRIR,(RR�R<((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt_delete}s

cCs
|j|�S(N(R�(RR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR/�scCs9|jd�s"|j||�ntj|||�dS(NR(R+R�tobjectt__setattr__(RR�R`((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�scCs3|jd�s|j|�ntj||�dS(NR(R+R�Rt__delattr__(RR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR�scCs|j|�}|dk	S(N(R�R(RR�R�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt__contains__�sccs�x|jD]}|Vq
Wxktj|jd�D]S}|t|j�d}||jkrbq0n|r~|jd�r~q0n|Vq0WdS(Ns/*is.tmp(R�R�R�R�R�(Rtshow_hiddenR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt__iter__�s	cCsVx'|jdt�D]}|j|�qWytj|j�Wntk
rQnXdS(NR(RRR�R	trmdirR�RI(RR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pytclean�s
cCs,y|j|�}Wntk
r'|SX|S(sretrieve an add'l data obj(R�R,(RR�tdefaultR�((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR��s

N(RARBR0R�R�R�RRR�R�R�R�R�R�R�R/RRRRRRR�(((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyR��s.	

	
			&	*						cCs,td�}x|j�D]}|GHqWdS(NR^(R\R�(tsacktp((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyRU�st__main__(,RtR�RwR�R	tos.pathtrpmUtilsRRtrpmUtils.transactionRR�R&tpackagesRRtpackageSackRRtfnmatchtretyum.i18nRRR�tyum.depsolveR�RRRRRCRLRURWRZR\R�RR}R�R�RURA(((s//usr/lib/python2.7/site-packages/yum/rpmsack.pyt<module>sN				E
	������	F	�	

Zerion Mini Shell 1.0