Your IP : 172.28.240.42


Current Path : /usr/share/apt-xapian-index/plugins/
Upload File :
Current File : //usr/share/apt-xapian-index/plugins/relations.pyc

ó
b3Rc@s€y"ddlZddlZeZWnek
r;eZnXddlZddlZddlZddd„ƒYZ	d„Z
dS(iÿÿÿÿNt	RelationscBsGeZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCsYtddddddddd	d
ƒtdddddddd
d	dƒtddddddddd	dƒtddddddddd	dƒtddddddddd	dƒtddddddddd	dƒtdddd dddd!d	d"ƒg|_g|jD]+}|d|d	|d	jd#ƒ f^q|_tjd$ƒ|_dS(%NtidxtXRDtqpsreldep:ttypetbooltdescsRelation: dependstldescs)Depends: relationship, package names onlytXRRsrelrec:sRelation: recommendss,Recommends: relationship, package names onlytXRSsrelsug:sRelation: suggestss*Suggests: relationship, package names onlytXREsrelenh:sRelation: ehnancess*Enhances: relationship, package names onlytXRPsrelpre:sRelation: pre-dependss-Pre-Depends: relationship, package names onlytXRBsrelbre:sRelation: breakss(Breaks: relationship, package names onlytXRCsrelcon:sRelation: conflictss+Conflicts: relationship, package names onlyt:s
\s*[|,]\s*(tdicttprefix_desctfindtprefixestretcompiletre_split(tselftd((s0/usr/share/apt-xapian-index/plugins/relations.pyt__init__s.>cKs§tddd|jƒ}|jdtƒrqts4|Stjjdƒ}tj	j
|ƒs\|Stj	j|ƒ}nd}d}td|dd	ƒg|d
<||d<|S(sû
        Return general information about the plugin.

        The information returned is a dict with various keywords:

         timestamp (required)
           the last modified timestamp of this data source.  This will be used
           to see if we need to update the database or not.  A timestamp of 0
           means that this data source is either missing or always up to date.
         values (optional)
           an array of dicts { name: name, desc: description }, one for every
           numeric value indexed by this data source.

        Note that this method can be called before init.  The idea is that, if
        the timestamp shows that this plugin is currently not needed, then the
        long initialisation can just be skipped.
        t	timestampiRtsystemsDir::Cache::pkgcaches(stdin)tpathRs	APT indextsources(RRtgettTruetHAS_APTtapt_pkgtconfigt	find_filetosRtexiststgetmtime(Rtkwtrestfiletts((s0/usr/share/apt-xapian-index/plugins/relations.pytinfo&s
cCsdS(s5
        If needed, perform long initialisation tasks here.

        info is a dictionary with useful information.  Currently it contains
        the following values:

          "values": a dict mapping index mnemonics to index numbers

        The progress indicator can be used to report progress.
        N((RR*tprogress((s0/usr/share/apt-xapian-index/plugins/relations.pytinitIscCstddddddƒS(s+
        Return documentation information for this data source.

        The documentation information is a dictionary with these keys:
          name: the name for this data source
          shortDesc: a short description
          fullDoc: the full description as a chapter in ReST format
        tnamesPackage relationshipst	shortDescsDebian package relationshipstfullDocsj
            Indexes one term per relationship declared with other packages. All
            relationship terms have prefixes starting with XR plus an extra
            prefix letter per relationship type.

            Terms are built using only the package names in the relationship
            fields: versioning and boolean operators are ignored.
            (R(R((s0/usr/share/apt-xapian-index/plugins/relations.pytdocVs	cCsBx;|jj|ƒD]'}|j||jddƒdƒqWdS(sf
        Extract all package names from @val and index them as terms with prefix
        @pfx
        iiN(Rtsplittadd_termtNone(RtpfxtvalR0R-((s0/usr/share/apt-xapian-index/plugins/relations.pyt
_index_rellscCs‡|j}|dkrdS|j}|dkr2dSxN|jD]C\}}|j|dƒ}|dkrlq<n|j|||ƒq<WdS(sÂ
        Update the document with the information from this data source.

        document  is the document to update
        pkg       is the python-apt Package object for this package
        N(t	candidateR3trecordRRR6(RtdocumenttpkgtvertrecR4tfieldR5((s0/usr/share/apt-xapian-index/plugins/relations.pytindexts		cCsUxN|jD]C\}}|j|dƒ}|dkr:q
n|j|||ƒq
WdS(s7
        Update the document with the information from this data source.

        This is alternative to index, and it is used when indexing with package
        data taken from a custom Packages file.

        document  is the document to update
        pkg       is the Deb822 object for this package
        N(RRR3R6(RR9R:R4R=R5((s0/usr/share/apt-xapian-index/plugins/relations.pytindexDeb822„s

(	t__name__t
__module__RR*R,R0R6R>R?(((s0/usr/share/apt-xapian-index/plugins/relations.pyR
s		#	
			cKstƒS(s.
    Create and return the plugin object.
    (R(R&((s0/usr/share/apt-xapian-index/plugins/relations.pyR,“s((taptR RRtImportErrortFalseR#tos.pathRRR,(((s0/usr/share/apt-xapian-index/plugins/relations.pyt<module>s


‰