Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/axi/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/axi/indexer.pyc


a3Rc@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZdZdddYZdefdYZdddYZd	dd
YZdddYZd
ddYZdddYZdddYZdefdYZdefdYZdS(iNs/var/lib/apt/liststAddoncBs)eZdZdZdZdZRS(s 
    Indexer plugin wrapper
    cKstjj||_tjj|jd|_tj}z<tjjtjj|t	j
d|j||_Wd|t_Xy|jj||_
Wn#tk
r|jj|_
nX|j
r
y|j
j||_Wq
tk
r	|j
j|_q
XndS(Nisaxi.plugin_(tostpathtbasenametfilenametsplitexttnametsystappendtdirnametimptload_sourcetmoduletinittobjt	TypeErrortinfo(tselftfnametkwtoldpath((s//usr/lib/python2.7/dist-packages/axi/indexer.pyt__init__+s 	 

	
cCs&t|jdr"|jjndS(Ntfinished(thasattrRR(R((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR>scKs2t|jdd}|dk	r.||ndS(Ntsend_extra_info(tgetattrRtNone(RRtfunc((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRBs(t__name__t
__module__t__doc__RRR(((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR's		tPluginscBseZdZdZRS(cKsd|kr|j|d<n|jdd}g|_xttjtjD]}|dd	ksS|j	drqSntj
jtj|}tj
j|sqSn|r|j
d|nt||}|jdkrS|j|qSqSWdS(
sj
        Read the plugins, in sorted order.

        Pass all the keyword args to the plugin init
        tlangstprogressit.t_s.pysReading plugin %s.N(R"R#(tscan_available_languagestgetRtdisabledtsortedRtlistdirtaxit	PLUGINDIRtendswithRtjointisfiletverboseRRR(RRR!Rtfullnametaddon((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRHs	 cCspt}tjd}xQtjtD]@}|j|}|sIq(n|jtj	|j
dq(W|S(Ns_i18n_Translation-([^-]+)$i(tsettretcompileRR(t
APTLISTDIRtsearchtaddturllibtunquotetgroup(RR ttfiletftmo((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR$]s	#(RRRR$(((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRGs	tProgresscBsVeZdZdZdZdZdZdZdZdZ	dZ
RS(	s*
    Normal progress report to stdout
    cCsd|_t|_t|_dS(N(RttasktFalsethalfwayt
is_verbose(R((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRps		cCs.||_d|jGtjjt|_dS(Ns%s...(R>RtstdouttflushtTrueR@(RR>((s//usr/lib/python2.7/dist-packages/axi/indexer.pytbegints	
cCs+d|j|fGtjjt|_dS(Ns
%s... %d%%(R>RRBRCRDR@(Rtpercent((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR!ys
cCsd|jGHt|_dS(Ns
%s: done.  (R>R?R@(R((s//usr/lib/python2.7/dist-packages/axi/indexer.pytend}scGs5|js
dS|jrHndj|GHt|_dS(Nt (RAR@R,R?(Rtargs((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR.s		cGs0|jr
Hntjdj|IJt|_dS(NRH(R@RtstderrR,R?(RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pytnotices	cGs0|jr
Hntjdj|IJt|_dS(NRH(R@RRJR,R?(RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pytwarnings	cGs0|jr
Hntjdj|IJt|_dS(NRH(R@RRJR,R?(RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pyterrors	(RRRRRER!RGR.RKRLRM(((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR=ls							t
BatchProgresscBsVeZdZdZdZdZdZdZdZdZ	dZ
RS(	s*
    Machine readable progress report
    cCs
d|_dS(N(RR>(R((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRscCs%||_d|jGtjjdS(Ns
begin: %s
(R>RRBRC(RR>((s//usr/lib/python2.7/dist-packages/axi/indexer.pyREs	cCsd|GtjjdS(Nsprogress: %d/100
(RRBRC(RRF((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR!scCsd|jGHtjjdS(Ns	done: %s
(R>RRBRC(R((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRGscGs#ddj|GHtjjdS(Nsverbose: %sRH(R,RRBRC(RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR.scGs#ddj|GHtjjdS(Ns
notice: %sRH(R,RRBRC(RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRKscGs#ddj|GHtjjdS(Nswarning: %sRH(R,RRBRC(RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRLscGs#ddj|GHtjjdS(Ns	error: %sRH(R,RRBRC(RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRMs(RRRRRER!RGR.RKRLRM(((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRNs							tSilentProgresscBsMeZdZdZdZdZdZdZdZdZ	RS(s
    Quiet progress report
    cCsdS(N((RR>((s//usr/lib/python2.7/dist-packages/axi/indexer.pyREscCsdS(N((RRF((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR!scCsdS(N((R((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRGscGsdS(N((RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR.scGsdS(N((RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRKscGstjdj|IJdS(NRH(RRJR,(RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRLscGstjdj|IJdS(NRH(RRJR,(RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRMs(
RRRRER!RGR.RKRLRM(((s//usr/lib/python2.7/dist-packages/axi/indexer.pyROs						tClientProgresscBs eZdZdZdZRS(sZ
    Client-side progress report, reporting progress from another running
    indexer
    cCsKtjtjtj|_|jjd|jjtj||_	dS(N(
tsockettAF_UNIXtSOCK_STREAMtsockt
settimeoutRtconnectR)tXAPIANDBUPDATESOCKR!(RR!((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRscCst}xtr|jjd}ytj|}Wn"tk
rX|jjddSX|d}|d}|dkr|jj	|t}q	|dkr|s|jj	|dt}n|jj|dq	|dkr|s|jj	|dt}n|jj
|dq	|dkr=|jj|q	|d	kr\|jj|q	|d
kr{|jj|q	|dkrPq	|jjd|d
j
tt|fq	WdS(NisThe other update has stoppediiRER!RGR.RKRMtalldonesHunknown action '%s' from other update-apt-xapian-index.  Arguments: '%s's, (R?RDRTtrecvtpickletloadstEOFErrorR!RMRERGR.RKR,tmaptrepr(RthasBeguntmsgRItaction((s//usr/lib/python2.7/dist-packages/axi/indexer.pytloops@	


			(RRRRRb(((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRPs	tServerSenderProgresscBskeZdZddZdZdZdZdZdZ	dZ
dZd	Zd
Z
RS(s;
    Server endpoint for client-server progress report
    cCs||_||_dS(N(RTR>(RRTR>((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRs	cCs|jtjddS(NRX(salldone(t_sendRZtdumps(R((s//usr/lib/python2.7/dist-packages/axi/indexer.pyt__del__scCs"y|jj|WnnXdS(N(RTtsend(Rttext((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRdscCs,||_|jtjd|jfdS(NRE(R>RdRZRe(RR>((s//usr/lib/python2.7/dist-packages/axi/indexer.pyREs	cCs&|jtjd|j|fdS(NR!(RdRZReR>(RRF((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR!scCs#|jtjd|jfdS(NRG(RdRZReR>(R((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRGscGs|jtjd|dS(NR.(sverbose(RdRZRe(RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR.
scGs|jtjd|dS(NRK(snotice(RdRZRe(RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRKscGs|jtjd|dS(NRL(swarning(RdRZRe(RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRLscGs|jtjd|dS(NRM(serror(RdRZRe(RRI((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRMsN(RRRRRRfRdRER!RGR.RKRLRM(((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRcs								tServerProgresscBsheZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZRS(sT
    Send progress report to any progress object, as well as to client indexers
    cCsd|_|g|_tj|_ytj|jWntk
rHnXt	j	t	j
t	j|_|jj
t	jt	jd|jjtj|jjt|jjddS(Nii(RR>tproxiedR)RWtsockfileRtunlinktOSErrorRQRRRSRTt
setsockoptt
SOL_SOCKETtSO_REUSEADDRtbindtsetblockingR?tlisten(Rtmine((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRs	
cCs!|jjtj|jdS(N(RTtcloseRRlRk(R((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRf's
cCsly3|jjd}|jjt||jWn2tjk
rg}|jdt	j
krhqhnXdS(Ni(RTtacceptRjRRcR>RQRMRIterrnotEAGAIN(RRTte((s//usr/lib/python2.7/dist-packages/axi/indexer.pyt_check*s 
cCs8|j||_x|jD]}|j|qWdS(N(RzR>RjRE(RR>tx((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRE2s
	cCs/|jx|jD]}|j|qWdS(N(RzRjR!(RRFR{((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR!6s
cCs,|jx|jD]}|jqWdS(N(RzRjRG(RR{((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRG9s
cGs/|jx|jD]}|j|qWdS(N(RzRjR.(RRIR{((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR.<s
cGs/|jx|jD]}|j|qWdS(N(RzRjRK(RRIR{((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRK?s
cGs/|jx|jD]}|j|qWdS(N(RzRjRL(RRIR{((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRLBs
cGs/|jx|jD]}|j|qWdS(N(RzRjRM(RRIR{((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRMEs
(
RRRRRfRzRER!RGR.RKRLRM(((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRis									t
ExecutionTimecBs8eZdZddlZddZdZdZRS(s
    Helper that can be used in with statements to have a simple
    measure of the timing of a particular block of code, e.g.
    with ExecutionTime("db flush"):
        db.flush()
    iNtcCs
||_dS(N(R(RR((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRRscCstj|_dS(N(ttimetnow(R((s//usr/lib/python2.7/dist-packages/axi/indexer.pyt	__enter__TscCs#d|jtj|jfGHdS(Ns%s: %s(RR~R(Rttypetvaluetstack((s//usr/lib/python2.7/dist-packages/axi/indexer.pyt__exit__Vs(RRRR~RRR(((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR|Js
	tIndexercBseZdZedZdZdZdZdZdZ	ee
dZdZd	Z
d
ZdZdZd
ZdZdZidZddZejdZejdZejdZRS(s
    The indexer
    cCso||_||_t|dt|_d|_d|_d|_d|_	|j
tj|j
tj
dS(NRAi(R!tquietaptRR?R.tds_timestampRt	apt_cachetpluginstlockfdtensure_dir_existsR)tXAPIANDBPATHtXAPIANCACHEPATH(RR!R((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR]s						cCs[ytj|WnCtk
rV}|jtjkr;qWtjj|sWqWnXdS(sY
        Create a directory if missing, but do not complain if it already exists
        N(RtmkdirRmRwtEEXISTRtisdir(RtpathnameRy((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRnscCs>|jdk	rtdn|j||j|_dS(s
        Wrap the apt-cache in some proxy object.

        This is used to give tests some control over the apt cache results
        s'the cache has already been instantiatedN(RRtRuntimeErrortaptcache(Rtwrapper((s//usr/lib/python2.7/dist-packages/axi/indexer.pyt_test_wrap_apt_cache}s
cCs|jsddl}ddl}|jrUd|jjjfdY}|}nd}|j|j	dt
d||_n|jS(NitAptSilentProgresscBs&eZdZdZddZRS(cSsdS(N((R((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRscSsdS(N((R((s//usr/lib/python2.7/dist-packages/axi/indexer.pytdonescSsdS(N((RRF((s//usr/lib/python2.7/dist-packages/axi/indexer.pytupdatesN(RRRRRR(((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRs		tmemonlyR!(Rtapttapt_pkgRR!Rht
OpProgressRtinit_configtCacheRD(RRRRtaptprogress((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRs		
cCstjtjtjtjB|_y7tj|jtj	tj
Bt|j|_t
SWn>tk
r}|jtjks|jtjkrtSnXdS(s
        Lock the session to prevent further updates.

        @returns
          True if the session is locked
          False if another indexer is running
        N(RtopenR)tXAPIANDBLOCKtO_RDWRtO_CREATRtfcntltlockftLOCK_EXtLOCK_NBRiR!RDtIOErrorRwtEACCESRxR?(RRy((s//usr/lib/python2.7/dist-packages/axi/indexer.pytlocks	"$cCs-|jjdt|j}|jdS(s{
        Attach to a running indexer and report its progress.

        Return when the other indexer has finished.
        s8Another update is already running: showing its progress.N(R!RKRPRb(Rt
childProgress((s//usr/lib/python2.7/dist-packages/axi/indexer.pytslavesc	Cstd|jd||_t|jdkrK|jjdtjtStg|jD]}|j	d^qX|_
y7tjj
tjrtjjtj}nd}Wn-tk
r}d}|jjd|nX|jr'|jjdtj|j
|jjdtj|n|dkrt|j
d	t|d	kr|rv|jjd
tjq|jjdtjtSn|jjdtjd
t\|_|_t|jjd}xz|jD]o}xf|j	jdgD]O}|d|jkr qn||j|d<|d7}|d|j|d<qWqW|jjdx3|jD](}|jjtd|j|jqrWtS(s
        Setup indexing: read plugins, check timestamps...

        @param force: if True, reindex also if the index is up to date

        @return:
          True if there is something to index
          False if there is no need of indexing
        R!tsystemisNo indexing plugins found in %st	timestampsRReading current timestamp failed: %s. Assuming the index has not been created yet.sMost recent dataset:    %s.sMost recent update for: %s.g?s?The index %s is up to date, but rebuilding anyway as requested.sThe index %s is up to datesAggregating value information.tquietitvaluesRtdescsInitializing plugins.(RR!RtlenRKR)R*R?tmaxRRRRtexistst
XAPIANDBSTAMPtgetmtimeRmR.R~tctimetintRtreadValueDBRDRtvalues_descR%RR
tdict(	RtforceRR{t
cur_timestampRyt
values_seqR0tv((s//usr/lib/python2.7/dist-packages/axi/indexer.pyt
setupIndexingsD,
	  /
&cCsqtj}|j|j|jd|jj|jd|jx$|jD]}|j	j
||qPW|S(sH
        Get a xapian.Document for the given apt package record
        itXP(txapiantDocumenttset_dataRt	add_valuet	candidatetversiontadd_termRRtindex(RtpkgtdocumentR0((s//usr/lib/python2.7/dist-packages/axi/indexer.pytget_document_from_aptscCsqtj}|j|d|jd|d|jd|dx$|jD]}|jj||qPW|S(sK
        Get a xapian.Document for the given deb822 package record
        tPackageitVersionR(RRRRRRRtindexDeb822(RRRR0((s//usr/lib/python2.7/dist-packages/axi/indexer.pytget_document_from_deb822sccs|j}t|}xt|D]\}}|js@q%n|jr{d|jkr{|jjdd|kr{q%n|ddkr|jjd||n|j|Vq%WdS(s=
        Generate Xapian documents from an apt cache
        t:iiidN(	RRt	enumerateRt	installedRtsplitR!R(RtcachetcounttidxR((s//usr/lib/python2.7/dist-packages/axi/indexer.pytgen_documents_apt(s	
+ccsyddlm}Wn!tk
r7ddlm}nXt}x|D]}t|}tj|jd}xt	|j
j|D]\}}|d}	|	|krqn|j|	|dkr|ddkr|j
}
|jjd|
|n|j|VqWqHWdS(Ni(tdeb822iRiiid(tdebianRtImportErrort
debian_bundleR1RRtfstattfilenoRtDeb822titer_paragraphsR6ttellR!R(RtfnamesRtseenRtinfdttotalRRRtcur((s//usr/lib/python2.7/dist-packages/axi/indexer.pytgen_documents_deb822:s"
	
%

cCs'i}i}i}|jjd|j}xt|jdD]\}}|ddkr{|jjd||n|j|j}	|	j}
|	jd}|j	|
s||
j
r|j||
<qD||
j
j|kr|j||
<qD|j||
<qDW|jj|||fS(s&
        Compare the apt cache to the database and return dicts
        of the form (pkgname, docid) for the following states:

        unchanged - no new version since the last update
        outdated - a new version since the last update
        obsolete - no longer in the apt cache
        sReading Xapian indexR}iiid(
R!REtget_doccountRtpostlisttget_documenttdocidtget_datat	get_valuethas_keyRRRG(RRtdbt	unchangedtoutdatedtobsoleteRRtmtdocRtdbver((s//usr/lib/python2.7/dist-packages/axi/indexer.pytcompareCacheToDbOs$	"
cCs
dtjkS(NtXAPIAN_CJK_NGRAM(Rtenviron(R((s//usr/lib/python2.7/dist-packages/axi/indexer.pytis_cjk_enabledqsc
Cs2ytj|tj}Wn'tjk
rB}|jjddSX|jr|jddkr|jjdt	j
|jS|j}t
|}|j||\}}}|jjdt
|t
|t
|f|jjdx'|jD]}	|	jd|d	|qWxt|D]\}
}|
d
dkre|jjd|
|n|jstq.n|j|krq.q.|j|kr|j||j|j|q.|j|j|q.Wx!|jD]}|j|qWx|jD]}	|	jqW|j|jjdS(
s"
        Update the index
        s!DB Update failed, database lockedNt	cjk_ngramt1s1The index %s is not CJK-compatible, rebuilding itsBUnchanged versions: %s, oudated version: %s, obsolete versions: %ssUpdating Xapian indexRRiiid(RtWritableDatabasetDB_CREATE_OR_OPENtDatabaseLockErrorR!RLRtget_metadataRKR)tXAPIANINDEXtrebuildRRRR.RERRRRRtreplace_documentRtadd_documentRtdelete_documentRRCRG(
RRRRyRRRRRtaRRR((s//usr/lib/python2.7/dist-packages/axi/indexer.pytupdateIndextsD!
			#
cCstjjtjs/|jjd|jSttjj	j
\}}|j|tjjtjsttjdj
n|jdkrtjtj|j|jfndS(Ns7No Xapian index built yet: falling back to full rebuildtwi(RRRR)RR!RKRRtreadlineRRRRuRtutime(Rtdbkindtdbpath((s//usr/lib/python2.7/dist-packages/axi/indexer.pytincrementalUpdates
!
cCs|jjdtj|tj}|jrD|jddnx!|jD]}|jd|qNWx|D]}|j	|qoWx|jD]}|j
qW|j|jjdS(sT
        Create a new Xapian index with the content provided by the plugins
        sRebuilding Xapian indexRRRN(
R!RERRtDB_CREATE_OR_OVERWRITERtset_metadataRRRRRCRG(RRt	documentst	addoninfoRRR((s//usr/lib/python2.7/dist-packages/axi/indexer.pyt
buildIndexs

csxOtjdD]>}d|tjjtj}tjj|sPqqW|rjj|}n6x'j	D]}|j
djqtWj}j
||jjdttjdd}|dItjj|IJ|jtjtjdtjfd}|tj|tjtjjtjspttjdjnjd	krtjtjjjfnjjjdS(
Nisindex.%dRsInstalling the new index.s.tmpRtautocsxtj|D]{}|jds+qn|kr=qntjj||}tjj|sjqnjjd|tj	|qWdS(Nsindex.sRemoving old index %s.(
RR(t
startswithRR,RR!R.tshutiltrmtree(tdirtfiletfullpath(ttmpidxfnameR(s//usr/lib/python2.7/dist-packages/axi/indexer.pytcleanoldcachessi(t	itertoolsRRRR,R)RRRRRRRRR!R.RRtabspathRutrenameRRRR	twriteValuest
writePrefixestwriteDoc(RtpkgfilesRtdbdirt	generatorRtoutR((RRs//usr/lib/python2.7/dist-packages/axi/indexer.pyRs4




"

c

Cs|jjd|t|dd}|tjdjIJt}x|jD]}x|jj	dgD]}|j	dd}|dkrqon|j	dd}|j	dd}|j	d	d}	|j|t}
|r|
jd|n|r|
jd|n|	ro|
jd	|	qoqoWqSWxgt|j
d
dD]J\}}|d||j	dd
|j	dd
|j	d	dfIJqSW|jtj|d|dS(s@
        Write the prefix information on the given file
        s!Writing prefix information to %s.s.tmpRs
        # This file contains the information about keyword prefixes used in the
        # APT Xapian index.
        #
        # Xapian allows to prefix some terms so they can be told apart from
        # normal keywords: this is used for example with Debtags tags, and
        # stemmed forms.
        #
        # This file lists terms with their index prefix, their queryparser
        # prefix, whether queryparser should treat it as boolean or
        # probabilistic and a short description.
        tprefixesRtqpRRtkeycSs|dS(Ni((R{((s//usr/lib/python2.7/dist-packages/axi/indexer.pyt<lambda>%ss
%s	%s	%s	# %st-s(description is missing)N(R!R.RttextwraptdedenttlstripRRRR%Rt
setdefaultR't	iteritemsRuRR(
RRR$R%R0tpRR&RRtoldRR((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRs8
	(
cCs|jjd|t|dd}|tjdjIJxPt|jjddD]0\}}|j	|}|d|||fIJq_W|j
tj|d|dS(	s?
        Write the value information on the given file
        s Writing value information to %s.s.tmpRs
        # This file contains the mapping between names of numeric values indexed in the
        # APT Xapian index and their index
        #
        # Xapian allows to index numeric values as well as keywords and to use them for
        # all sorts of useful querying tricks.  However, every numeric value needs to
        # have a unique index, and this configuration file is needed to record which
        # indices are allocated and to provide a mnemonic name for them.
        #
        # The format is exactly like /etc/services with name, number and optional
        # aliases, with the difference that the second column does not use the
        # "/protocol" part, which would be meaningless here.
        R'cSs|dS(Ni((R{((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR(Ess
%s	%d	# %sN(
R!R.RR*R+R,R'RR.RRuRR(RRR$RRR((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR0s
+

c
Cs|jjd|g}x|jD]v}yP|jj}|dkry|jtd|dd|dd|dnWq$|jjd|j	q$Xq$Wt
|dd}|tjdj
tjtjfIJx*|D]"}|d	|d|dfIJqW|tjd
IJxO|D]G}||dIJ|dt|dIJ|tj|dIJ|Jq!W|jtj|d|dS(
s;
        Write the documentation in the given file
        sWriting documentation to %s.Rt	shortDesctfullDocs!Skipping documentation for plugins.tmpRsL
        ===============
        Database layout
        ===============

        This Xapian database indexes Debian package information.  To query the
        database, open it as ``%s/index``.

        Data are indexed either as terms or as values.  Words found in package
        descriptions are indexed lowercase, and all other kinds of terms have an
        uppercase prefix as documented below.

        Numbers are indexed as Xapian numeric values.  A list of the meaning of the
        numeric values is found in ``%s``.

        The data sources used for indexing are:
        s	 * %s: %ss
        This Xapian index follows the conventions for term prefixes described in
        ``/usr/share/doc/xapian-omega/termprefixes.txt.gz``.

        Extra Debian data sources can define more extended prefixes (starting with
        ``X``): their meaning is documented below together with the rest of the data
        source documentation.

        At the very least, at least the package name (with the ``XP`` prefix) will
        be present in every document in the database.  This allows to quickly
        lookup a Xapian document by package name.

        The user data associated to a Xapian document is the package name.


        -------------------
        Active data sources
        -------------------

        t=N(R!R.RRRRRRRKRRR*R+R,R)RtXAPIANDBVALUESRRuRR(RRtdocinfoR0RR$td((s//usr/lib/python2.7/dist-packages/axi/indexer.pyR Ms4



 
	

N(RRRR?RRRRRRRDRRRRRRRRRRRRR)tXAPIANDBPREFIXESRR4RtXAPIANDBDOCR (((s//usr/lib/python2.7/dist-packages/axi/indexer.pyRYs*		
			
A					"		1	3.((((((((R)RRR
RQRwRR*RRRR~R2R7tcPickleRZR4RtlistRR=RNRORPRcRitobjectR|R(((s//usr/lib/python2.7/dist-packages/axi/indexer.pyt<module>s0 %*/7