/usr/lib/python2.6/site-packages/yum
NameSizeModeActions
callbacks.py46660755editdlrm
callbacks.pyc52780644editdlrm
callbacks.pyo52780644editdlrm
comps.py207700755editdlrm
comps.pyc175680644editdlrm
comps.pyo175680644editdlrm
config.py372920755editdlrm
config.pyc374700644editdlrm
config.pyo374700644editdlrm
constants.py46980755editdlrm
constants.pyc35750644editdlrm
constants.pyo35750644editdlrm
depsolve.py655120755editdlrm
depsolve.pyc396440644editdlrm
depsolve.pyo395860644editdlrm
Errors.py37800755editdlrm
Errors.pyc81850644editdlrm
Errors.pyo81850644editdlrm
failover.py33720755editdlrm
failover.pyc35910644editdlrm
failover.pyo35910644editdlrm
history.py624680755editdlrm
history.pyc549850644editdlrm
history.pyo547690644editdlrm
i18n.py206830755editdlrm
i18n.pyc165160644editdlrm
i18n.pyo165160644editdlrm
logginglevels.py79860755editdlrm
logginglevels.pyc66200644editdlrm
logginglevels.pyo66200644editdlrm
mdparser.py64080755editdlrm
mdparser.pyc78180644editdlrm
mdparser.pyo78180644editdlrm
metalink.py95060755editdlrm
metalink.pyc91470644editdlrm
metalink.pyo90770644editdlrm
misc.py367160755editdlrm
misc.pyc369260644editdlrm
misc.pyo368850644editdlrm
packages.py824890755editdlrm
packages.pyc796130644editdlrm
packages.pyo795720644editdlrm
packageSack.py418790755editdlrm
packageSack.pyc433720644editdlrm
packageSack.pyo433720644editdlrm
parser.py78070755editdlrm
parser.pyc65450644editdlrm
parser.pyo65450644editdlrm
pgpmsg.py544200755editdlrm
pgpmsg.pyc395980644editdlrm
pgpmsg.pyo395980644editdlrm
pkgtag_db.py49550755editdlrm
pkgtag_db.pyc52110644editdlrm
pkgtag_db.pyo52110644editdlrm
plugins.py250830755editdlrm
plugins.pyc263840644editdlrm
plugins.pyo263840644editdlrm
repoMDObject.py100840755editdlrm
repoMDObject.pyc86170644editdlrm
repoMDObject.pyo86170644editdlrm
repos.py143020755editdlrm
repos.pyc158340644editdlrm
repos.pyo157850644editdlrm
rpmsack.py687620755editdlrm
rpmsack.pyc584470644editdlrm
rpmsack.pyo583080644editdlrm
rpmtrans.py250040755editdlrm
rpmtrans.pyc235000644editdlrm
rpmtrans.pyo234430644editdlrm
sqlitesack.py713790755editdlrm
sqlitesack.pyc557780644editdlrm
sqlitesack.pyo553500644editdlrm
sqlutils.py64220755editdlrm
sqlutils.pyc57890644editdlrm
sqlutils.pyo57890644editdlrm
transactioninfo.py320070755editdlrm
transactioninfo.pyc297180644editdlrm
transactioninfo.pyo297180644editdlrm
update_md.py247140755editdlrm
update_md.pyc212960644editdlrm
update_md.pyo212960644editdlrm
yumRepo.py759780755editdlrm
yumRepo.pyc596180644editdlrm
yumRepo.pyo596180644editdlrm
__init__.py2392050755editdlrm
__init__.pyc1565380644editdlrm
__init__.pyo1563650644editdlrm
Edit: /usr/lib/python2.6/site-packages/yum/misc.pyc (36926B)
;}vXc)@sdZddkZddkZddkZddklZddkZddkZddkZddk Z ddk Z ddk Z ddk Z ddk Z ddkZddkZddkZddkZddkZddkZddgZyddkZeidWnej o dZnXddklZlZddkTyddkZddkZWnej o dZnXy4ddkZe d d d d d gZ!d gZ"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=|djo tiS|djo tiStddS(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.pyt re_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 ~nX|djpt|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 TypeErrortlisttsorttAssertionErrortappend(R(tntutttlasttlastititx((s,/usr/lib/python2.6/site-packages/yum/misc.pytuniques:        t ChecksumscBszeZdZd eedZdZeddZdZ ddZ d Z d d Z d Z 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 RtaddRA(tselft checksumstignore_missingt ignore_nonetdonetsumtypetsumalgo((s,/usr/lib/python2.6/site-packages/yum/misc.pyt__init__s,            cCs|iS(N(RN(RQ((s,/usr/lib/python2.6/site-packages/yum/misc.pyt__len__stfgetcCs|iS((RN(RQ((s,/usr/lib/python2.6/site-packages/yum/misc.pytscCs:|it|7_x|iD]}|i|qWdS(N(RNR;RLtupdate(RQtdataRW((s,/usr/lib/python2.6/site-packages/yum/misc.pyR\s iicCs |i|}|i||S(N(treadR\(RQtfotsizeR]((s,/usr/lib/python2.6/site-packages/yum/misc.pyR^s cCs@h}x3t|i|iD]\}}|i||Qtkeyidt timestampt fingerprinttraw_keythas_sigt valid_sigthashed_subpaksiN(tpgpmsgtdecode_multiple_keyst ExceptionRtstrR;t public_keytkey_idtuser_idtstructtunpackRRRR/tuser_idsRt signatureRtget_hashed_subpaktSIG_SUB_TYPE_CREATE_TIMER$tintRA( Rtmultiplet key_info_objstkeysR{tkeyt 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(ttsRRthdrt installedts((s,/usr/lib/python2.6/site-packages/yum/misc.pyt keyInstalleds    cCstdjotS|pd|}ntii|pti|nt|}|tid          cCstdjptii| ogS|tidtGTs>=tGERtEQtRA(tseqt max_entriesRctnumtbegtend((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.0RG((s,/usr/lib/python2.6/site-packages/yum/misc.pys is i cCs(t|tjoCyt|dWqtj ot|did}qXnLt|tjo|id}n&|djodStdt||i}|i dt }|i dd}|i dd}|i d d }|o(|i d d }|i d 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&R"s<Rs>t"s"t's'N( RRRtUnicodeDecodeErrortencodeR$RtreprtrstripR8t _deletecharsRY(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}tunlinkRwterrnotENOENT(R0R{((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}tstatRwRRtENOTDIRR$(R0R{((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(RsRvR$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.pyt getloginuids  cCsy5titid|otitidnWnEtij o6}tidIJdtid|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,( RRsR%R+R|tlstripRYtextendRRA(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((jRiRR}tos.patht cStringIORRRR%RR-R*RRRRR7RRARR=R?RARR$trpmUtils.miscutilsRRRRtgpgme.editutilR R<RORKRRRti18nRRRRR!R"R#R)R*R,R1R-R4R8R:RIRJRlRfRRRR/RRRR.RRRRRRRR)R6R<RIRJRTRVRaRmRsRtrangeR}RRRRRRRRRRRRRRRRRRRR(((s,/usr/lib/python2.6/site-packages/yum/misc.pyts                                     BM   2  !1  (  # !     .  !    # +