Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/debian/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/debian/deb822.pyc


}Nc@s`ddlmZyddlZejeZWneefk
rLeZnXddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZedgZdZdeejfdYZdefdYZd	eejfd
YZdefdYZd
efdYZdefdYZdefdYZdefdYZdefdYZ de fdYZ!de!fdYZ"de!fdYZ#de fdYZ$de fd YZ%d!e"efd"YZ&d#eefd$YZ'd%e(fd&YZ)e)Z*dS('i(tfunction_deprecated_byNs&/usr/share/keyrings/debian-keyring.gpgs
/usr/bin/gpgvtTagSectionWrappercBs)eZdZdZdZdZRS(sWrap a TagSection object, using its find_raw method to get field values

    This allows us to pick which whitespace to strip off the beginning and end
    of the data, so we don't lose leading newlines.
    cCs
||_dS(N(t_TagSectionWrapper__section(tselftsection((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt__init__:scCs/g|jjD]}|jds|^qS(Nt#(Rtkeyst
startswith(Rtkey((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR=scCsZ|jj|}|dkr-t|n||jdd}|jdjdS(Nt:is 	s
(Rtfind_rawtNonetKeyErrortfindtlstriptrstrip(RR	tstdata((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt__getitem__As
(t__name__t
__module__t__doc__RRR(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR3s		t
OrderedSetcBsMeZdZgdZdZdZdZdZeZdZ	RS(sA set-like object that preserves order when iterating over it

    We use this to keep track of keys in Deb822Dict, because it's much faster
    to look up if a key is in a set than in a list.
    cCs7t|_g|_x|D]}|j|qWdS(N(tsett_OrderedSet__sett_OrderedSet__ordertadd(Rtiterabletitem((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRWs	
cCs3||kr/|jj||jj|ndS(N(RRRtappend(RR((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR]scCs$|jj||jj|dS(N(RtremoveR(RR((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRdscCs
t|jS(N(titerR(R((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt__iter__jscCs
||jkS(N(R(RR((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt__contains__nscCs"x|D]}|j|qWdS(N(R(RRR((s1/usr/lib/python2.7/dist-packages/debian/deb822.pytextendvs
(
RRRRRRR!R"RR#(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRPs				t
Deb822DictcBskeZdZdddddZdZdZdZdZdZ	dZ
d	Zd
ZRS(s3A dictionary-like object suitable for storing RFC822-like data.

    Deb822Dict behaves like a normal dict, except:
        - key lookup is case-insensitive
        - key order is preserved
        - if initialized with a _parsed parameter, it will pull values from
          that dictionary-like object as needed (rather than making a copy).
          The _parsed dict is expected to be able to handle case-insensitive
          keys.

    If _parsed is not None, an optional _fields parameter specifies which keys
    in the _parsed dictionary are exposed.
    sutf-8cCsfi|_t|_d|_||_|dk	rt|drQ|j}nt|}y%x|D]\}}|||<qgWWqt	k
rt
|j}t
||}	t	d||	fqXn|dk	rb||_|dkr$|jjg|jjD]}t
|^qqb|jjg|D]$}
|jj|
r4t
|
^q4ndS(NtitemssCdictionary update sequence element #%d has length %d; 2 is required(t_Deb822Dict__dictRt_Deb822Dict__keysRt_Deb822Dict__parsedtencodingthasattrR%tlistt
ValueErrortlenR#Rt_strIthas_key(Rt_dictt_parsedt_fieldsR)R%tktvtthistlen_tf((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRs*			
	5cCs-t|}|jj|||j|<dS(N(R.R'RR&(RR	tvalue((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt__setitem__scCst|}y|j|}WnBtk
ra|jdk	r[||jkr[|j|}qbnXt|try|j|j	}Wqt
k
r}tjd|j	t
tj|}y|j|d}Wnt
k
r|qX|d|_	qXn|S(Ns?decoding from %s failed; attempting to detect the true encodingR)(R.R&R
R(RR't
isinstancetstrtdecodeR)tUnicodeDecodeErrortwarningstwarntUnicodeWarningtchardettdetect(RR	R8tetresult((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRs*
	

cCsBt|}|jj|y|j|=Wntk
r=nXdS(N(R.R'RR&R
(RR	((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt__delitem__s
cCst|}||jkS(N(R.R'(RR	((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR/scCs g|jD]}t|^q
S(N(R'R;(RR	((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRscCs:ddjg|jD]\}}d||f^qS(Ns{%s}s, s%r: %r(tjoinR%(RR3R4((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt__repr__scCsi|j}|j|j}|j||ks<tSx&|D]}||||krCtSqCWtS(N(RtsorttFalsetTrue(Rtothertmykeyst	otherkeysR	((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt__eq__s


cCs|j|}|S(N(t	__class__(Rtcopy((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRPsN(
RRRRRR9RRER/RRGRNRP(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR$|s			!	
				
tDeb822cBs"eZdddddZdeeddZeeZedZ	ddZ
dZdZdZ
dddZd	ZeeZd
ZeeZdZeeZddZeeZd
ZeeZdZeeZddZdZdZRS(sutf-8c
Cst|dr|}d}nd}tj|d|d|d|d||dk	ry|j||Wqtk
r|qXnd|_dS(sCreate a new Deb822 instance.

        :param sequence: a string, or any any object that returns a line of
            input each time, normally a file().  Alternately, sequence can
            be a dict that contains the initial key-value pairs.

        :param fields: if given, it is interpreted as a list of fields that
            should be parsed (the rest will be discarded).

        :param _parsed: internal parameter.

        :param encoding: When parsing strings, interpret them in this encoding.
            (All values are given back as unicode objects, so an encoding is
            necessary in order to properly interpret the strings.)
        R%R0R1R2R)N(R*RR$Rt_internal_parsertEOFErrortgpg_info(RtsequencetfieldsR1R)R0((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRs	
c
cstrm|rmt|trmtj|}x|D]5}|d|dt|d|}|r1|Vq1q1WnTt|}	||	|d|}
x0t|
dkr|
V||	|d|}
qWdS(sGenerator that yields a Deb822 object for each paragraph in sequence.

        :param sequence: same as in __init__.

        :param fields: likewise.

        :param use_apt_pkg: if sequence is a file(), apt_pkg will be used 
            if available to parse the file, since it's much much faster.  Set
            this parameter to False to disable using apt_pkg.
        :param shared_storage: not used, here for historical reasons.  Deb822
            objects never use shared storage anymore.
        :param encoding: Interpret the paragraphs in this encoding.
            (All values are given back as unicode objects, so an encoding is
            necessary in order to properly interpret the strings.)
        RVR1R)iN(t
_have_apt_pkgR:tfiletapt_pkgtTagFileRR R-(tclsRURVtuse_apt_pkgtshared_storageR)tparserRt	paragraphRtx((s1/usr/lib/python2.7/dist-packages/debian/deb822.pytiter_paragraphs%s
	ccsYt}xL|D]D}|jdr(q
n|rL|jdsCq
nt}n|Vq
WdS(syYields only lines that do not begin with '#'.

        Also skips any blank lines at the beginning of the input.
        Rs
N(RJRRRI(RUtat_beginningtline((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt_skip_useless_linesKs
	csd}tj|d}tj|d}tjd}fd}t|trh|j}nd}d}	x|j|j|D]}
|j|
}|r|r|	||<n||j	dsd}qn|j	d}|j	d}	qn|j|
}|rd|r(|	||<n||j	dsId}qn|j	d}d}	qn|j|
}|r|	d	|
7}	qqqW|r|	||<ndS(
Ns!^(?P<key>[^: \t\n\r\f\v]+)\s*:\s*s(?P<data>\S.*?)\s*$t$s^\s(?P<data>.+?)\s*$csdkp|kS(N(R(R7(RV(s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt<lambda>bstR	Rs
(
tretcompileR:t
basestringt
splitlinesRtgpg_stripped_paragraphRdtmatchtgroup(RRURVtkey_parttsingletmultit	multidatatwanted_fieldtcurkeytcontentRctm((RVs1/usr/lib/python2.7/dist-packages/debian/deb822.pyRR[sJ	


cCs
|jS(N(tdump(R((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt__str__scCs
|jS(N(Rw(R((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt__unicode__scCst||S(sReturn the self[key] as a string (or unicode)

        The default implementation just returns unicode(self[key]); however,
        this can be overridden in subclasses (e.g. _multivalued) that can take
        special values.
        (tunicode(RR	((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt
get_as_stringscCs|dkr!tj}t}nt}|dkr?|j}nx|jD]{}|j|}|sx|ddkrd||f}nd||f}|s|j|j|qL|j|qLW|r|j	SdS(sDump the the contents in the original format

        If fd is None, return a unicode object.

        If fd is not None, attempt to encode the output to the encoding the
        object was initialized with, or the value of the encoding argument if
        it is not None.  This will raise UnicodeEncodeError if the encoding
        can't support all the characters in the Deb822Dict values.
        is
s%s:%s
s%s: %s
N(
RtStringIORJRIR)titerkeysR{twritetencodetgetvalue(RtfdR)t
return_stringR	R8tentry((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRws 	cCs|jdrtStSdS(Ns
(tcountRIRJ(RR((s1/usr/lib/python2.7/dist-packages/debian/deb822.pytis_single_linescCs|j|S(N(R(RR((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt
is_multi_linescCs.|s
|S|s|S|j|r|j|rd}||jdrTd}n|||j|}|j|d}}x8|dD],}||krqn|||}|}qW|S|j|r$|j|r$x=|jtD],}||jtkr|d|}qqW|StdS(Nt s, iis
(RRtsplitRHRRkRJR,(Rts1ts2tdelimtLtprevtmergedR((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt
_merge_fieldss.	

cCs|dkr|}|}n|}|}||kr\||kr\|j||||}n8||kru||}n||kr||}nt|dkr|||<dS|S(N(Rt_mergeFieldsR
(RR	td1td2tx1tx2R((s1/usr/lib/python2.7/dist-packages/debian/deb822.pytmerge_fieldss 	


c
Csg}g}g}d}tjd}tjd}t}xc|D][}|jd}|r||j|rsqCq|t}n|j|}	|	s|dkr|j|s|j|q|sPqq|dkr|j|rd}q|j|q|dkr|j|qqC|	jddkrC|	jd	}n&|	jdd
kri|j|Pn|j|sC|s|j|q|j|qCqCWt|r|||fSt	ddS(
sReturn a (gpg_pre, payload, gpg_post) tuple

        Each element of the returned tuple is a list of lines (with trailing
        whitespace stripped).
        tSAFEs5^-----(?P<action>BEGIN|END) PGP (?P<what>[^-]+)-----$s^$s
sSIGNED MESSAGEt	SIGNATUREtactiontBEGINtwhattENDsonly blank lines found in inputN(
RhRiRJtstripRmRIRRnR-RS(
RUt
gpg_pre_linestlinestgpg_post_lineststatetgpgret
blank_linet
first_lineRcRv((s1/usr/lib/python2.7/dist-packages/debian/deb822.pytsplit_gpg_and_payloadsL
		

cCs|j|dS(Ni(R(R[RU((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRlZscCsOt|dstdn|jdkrHtj|jd||_n|jS(sReturn a GpgInfo object with GPG signature information

        This method will raise ValueError if the signature is not available
        (e.g. the original text cannot be found).

        :param keyrings: list of keyrings to use (see GpgInfo.from_sequence)
        traw_textsoriginal text cannot be foundtkeyringsN(R*R,RTRtGpgInfot
from_sequenceR(RR((s1/usr/lib/python2.7/dist-packages/debian/deb822.pytget_gpg_info_scCsq|jdrtdnxL|jdD]:}|sJtdn|djs/tdq/q/WdS(sRaise ValueError if value is not a valid value for key

        Subclasses that do interesting things for different keys may wish to
        override this method.
        s
svalue must not end in '\n'isvalue must not have blank linesis$each line must start with whitespaceN(tendswithR,Rktisspace(RR	R8Rc((s1/usr/lib/python2.7/dist-packages/debian/deb822.pytvalidate_inputts	cCs'|j||tj|||dS(N(RR$R9(RR	R8((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR9sN(RRRRRJRIRatclassmethodtstaticmethodRdRRRxRyR{RwRRtisSingleLineRtisMultiLineRRRtmergeFieldsRRlRRR9(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRQs4	!!3				)			$	<		RcBskeZdZdZdZdZed
dZed
d
d	Z	e
d
ZedZRS(s%A wrapper around gnupg parsable output obtained via --status-fd

    This class is really a dictionary containing parsed output from gnupg plus
    some methods to make sense of the data.
    Keys are keywords and values are arguments suitably splitted.
    See /usr/share/doc/gnupg/DETAILS.gztGOODSIGtEXPSIGt	EXPKEYSIGt	REVKEYSIGtBADSIGcCs|jdp|jdS(sIs the signature valid?RtVALIDSIG(R/(R((s1/usr/lib/python2.7/dist-packages/debian/deb822.pytvalidscCsdS(s>Return the primary ID of the signee key, None is not availableN((R((s1/usr/lib/python2.7/dist-packages/debian/deb822.pytuidsc	Cs|}t|tr*|jd}nt|trK|jd}n||_||_d}x|D]}|j|sqjn|t|}|jd}|jd}|| }||j	kr||djdd}n||djd}|||<qjW|S(sCreate a new GpgInfo object from gpg(v) --status-fd output (out) and
        optionally collect stderr as well (err).
        
        Both out and err can be lines in newline-terminated sequence or regular strings.s
s	[GNUPG:] Ri(
R:RjRtoutterrRR-RRtuidkeys(	R[RRtntheadertlRR	R8((s1/usr/lib/python2.7/dist-packages/debian/deb822.pytfrom_outputs(			

c	
Cs|p	t}|ptg}t|}|jddgx!|D]}|jd|gqAWd|krvtdntj|dtjdtjdtj}t|t	r|j
|\}}n|j
|j|\}}|j||S(s}Create a new GpgInfo object from the given sequence.

        :param sequence: sequence of lines or a string

        :param keyrings: list of keyrings to use (default:
            ['/usr/share/keyrings/debian-keyring.gpg'])

        :param executable: list of args for subprocess.Popen, the first element
            being the gpgv executable (default: ['/usr/bin/gpgv'])
        s--status-fdt1s	--keyrings'cannot access any of the given keyringststdintstdouttstderr(
tGPGV_DEFAULT_KEYRINGStGPGV_EXECUTABLER+R#tIOErrort
subprocesstPopentPIPER:Rjtcommunicatet_get_full_stringR(	R[RURt
executabletargsR3tpRR((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRs

cCsdt|}y|j}Wntk
r0dSXd}|jdrOd}n|||j|S(sReturn a string from a sequence of lines.

        This method detects if the sequence's lines are newline-terminated, and
        constructs the string appropriately.
        Rgs
(R tnextt
StopIterationRRF(RUt
sequence_iterRtjoin_str((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRs
	cOs|jt|||S(s]Create a new GpgInfo object from the given file.

        See GpgInfo.from_sequence.
        (RRX(R[ttargetRtkwargs((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt	from_files(sGOODSIGRRRRN(
RRRRRRRRRRRRR(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRs		$$tPkgRelationcBsheZdZejdZejdZejdZejdZe	dZ
edZRS(sInter-package relationships

    Structured representation of the relationships of a package to another,
    i.e. of what can appear in a Deb882 field like Depends, Recommends,
    Suggests, ... (see Debian Policy 7.1).
    s^\s*(?P<name>[a-zA-Z0-9.+\-]{2,})(\s*\(\s*(?P<relop>[>=<]+)\s*(?P<version>[0-9a-zA-Z:\-+~.]+)\s*\))?(\s*\[(?P<archs>[\s!\w\-]+)\])?\s*$s\s*,\s*s\s*\|\s*s\s*csdfdfdjj|j}tjj|}tfd|S(s|Parse a package relationship string (i.e. the value of a field like
        Depends, Recommends, Build-Depends ...)
        csvg}xijj|jD]O}t|r[|ddkr[|jt|dfq|jt|fqW|S(Nit!i(t_PkgRelation__blank_sep_RERRR-RRIRJ(trawtarchstarch(R[(s1/usr/lib/python2.7/dist-packages/debian/deb822.pytparse_archsscsjj|}|r|j}i|dd6}|ddkpR|ddksp|d|df|d<n
d|d<|ddkrd|d<n|d|d<|Stjd|IJi|d6dd6dd6SdS(NtnametreloptversionRRsLdeb822.py: WARNING: cannot parse package relationship "%s", returning it raw(t_PkgRelation__dep_RERmt	groupdictRtsysR(RRmtpartstd(RR[(s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt	parse_rel)s 

cs
t|S(N(tmap(tor_deps(R(s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRf?s(t_PkgRelation__comma_sep_RERRRt_PkgRelation__pipe_sep_RE(R[Rttl_depstcnf((RRR[s1/usr/lib/python2.7/dist-packages/debian/deb822.pytparse_relationss

cs@dfdfd}tjt||dS(sFormat to string structured inter-package relationships
        
        Perform the inverse operation of parse_relations, returning a string
        suitable to be written in a package stanza.
        cSs"|\}}|r|Sd|SdS(NR((t	arch_spectexclR((s1/usr/lib/python2.7/dist-packages/debian/deb822.pytpp_archHsc	s|d}|jdr>|ddk	r>|d|d7}n|jdr|ddk	r|dtjt|d7}n|S(NRRs (%s %s)Rs [%s](R/RtstringRFR(tdepR(R(s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt
pp_atomic_depOs
'cstjt|dS(Ns | (RRFR(tdeps(R(s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRfWss, (RRFR(trelst	pp_or_dep((RRs1/usr/lib/python2.7/dist-packages/debian/deb822.pyR;As	(
RRRRhRiRRRRRRRR;(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR	s	't_lowercase_dictcBseZdZdZRS(s4Dictionary wrapper which lowercase keys upon lookup.cCstj||jS(N(tdictRtlower(RR	((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR^s(RRRR(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR[st_PkgRelationMixincBs&eZdZdZedZRS(srPackage relationship mixin

    Inheriting from this mixin you can extend a Deb882 object with attributes
    letting you access inter-package relationship in a structured way, rather
    than as strings. For example, while you can usually use pkg['depends'] to
    obtain the Depends string of package pkg, mixing in with this class you
    gain pkg.depends to access Depends as a Pkgrel instance

    To use, subclass _PkgRelationMixin from a class with a _relationship_fields
    attribute. It should be a list of field names for which structured access
    is desired; for each of them a method wild be added to the inherited class.
    The method name will be the lowercase version of field name; '-' will be
    mangled as '_'. The method would return relationships in the same format of
    the PkgRelation' relations property.

    See Packages and Sources as examples.
    cOshti|_t|_xI|jD]>}|j}|j|rSd|j|<q"g|j|<q"WdS(N(Rt_PkgRelationMixin__relationsRIt#_PkgRelationMixin__parsed_relationst_relationship_fieldsRR/R(RRRRtkeyname((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRus	cshjsatfdjj}x(|D] }tj|j|<q1Wt_njS(s?Return a dictionary of inter-package relationships among the current
        and other packages.

        Dictionary keys depend on the package kind. Binary packages have keys
        like 'depends', 'recommends', ... while source packages have keys like
        'build-depends', 'build-depends-indep' and so on. See the Debian policy
        for the comprehensive field list.

        Dictionary values are package relationships returned as lists of lists
        of dictionaries (see below for some examples).

        The encoding of package relationships is as follows:
        - the top-level lists corresponds to the comma-separated list of
          Deb822, their components form a conjuction, i.e. they have to be
          AND-ed together
        - the inner lists corresponds to the pipe-separated list of Deb822,
          their components form a disjunction, i.e. they have to be OR-ed
          together
        - member of the inner lists are dictionaries with the following keys:
          - name:       package (or virtual package) name
          - version:    A pair <operator, version> if the relationship is
                        versioned, None otherwise. operator is one of "<<",
                        "<=", "=", ">=", ">>"; version is the given version as
                        a string.
          - arch:       A list of pairs <polarity, architecture> if the
                        relationship is architecture specific, None otherwise.
                        Polarity is a boolean (false if the architecture is
                        negated with "!", true otherwise), architecture the
                        Debian archtiecture name as a string.

        Examples:

          "emacs | emacsen, make, debianutils (>= 1.7)"     becomes
          [ [ {'name': 'emacs'}, {'name': 'emacsen'} ],
            [ {'name': 'make'} ],
            [ {'name': 'debianutils', 'version': ('>=', '1.7')} ] ]

          "tcl8.4-dev, procps [!hurd-i386]"                 becomes
          [ [ {'name': 'tcl8.4-dev'} ],
            [ {'name': 'procps', 'arch': (false, 'hurd-i386')} ] ]
        csj|dkS(N(RR(R(R(s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRfs(RtfilterRRRRRJ(Rt	lazy_relsR((Rs1/usr/lib/python2.7/dist-packages/debian/deb822.pyt	relationss+	
(RRRRtpropertyR(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRbs	t_multivaluedcBs)eZdZdZdZdZRS(s7A class with (R/W) support for multivalued fields.

    To use, create a subclass with a _multivalued_fields attribute.  It should
    be a dictionary with *lower-case* keys, with lists of human-readable
    identifiers of the fields as the values.  Please see Dsc, Changes, and
    PdiffIndex as examples.
    cOstj|||x|jjD]\}}y||}Wntk
rSq#nX|j|r}g||<||j}nt||<||j}x<t	d|jD]%}|tt||j
qWq#WdS(N(RQRt_multivalued_fieldsR%R
RRR$tupdateRRRktzipR(RRRtfieldRVtcontentstupdater_methodRc((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRs



cCs/|j|jkrntj|||dS(N(RRRQR(RR	R8((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRscCso|j}||jkr[tj}t||drJ||g}n|jd||}|j|}y
|j}Wntk
ri}nXx|D]}x|D]}t||}	y|||}
Wntk
r|	}nX|
t	|	d|	}d|kr"t
d|n|jd|qW|jdqW|jjdSt
j||SdS(NRs
Rs5'\n' not allowed in component of multivalued field %ss %s(RRR|R*R~t_fixed_field_lengthstAttributeErrorRzR
R-R,RRRQR{(RR	tkeylRtarraytordert
field_lengthsRR`t	raw_valuetlengthR8((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR{s6










(RRRRRR{(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRs		
t_gpg_multivaluedcBseZdZdZRS(sA _multivalued class that can support gpg signed objects

    This class's feature is that it stores the raw text before parsing so that
    gpg can verify the signature.  Use it just like you would use the
    _multivalued class.

    This class only stores raw text if it is given a raw string, or if it
    detects a gpg signature when given a file or sequence of lines (see
    Deb822.split_gpg_and_payload for details).
    cOsy|d}Wn#tk
r3|jdd}nX|dk	rlt|tr[||_qlt|drmqly|j|\}}}Wntk
rg}}}nX|r1|r1t	j	}|j
dj||j
d|j
dj||j
d|j
dj||j|_nyt
|}||d<Wqltk
rh||d<qlXntj|||dS(NiRUR%s
s

(t
IndexErrortgetRR:RjRR*RRSR|R~RFRR+RR(RRRRURRRR((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRs6




(RRRR(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRs
tDsccBs>eZidddgd6dddgd6dddgd6ZRS(tmd5sumtsizeRtfilestsha1schecksums-sha1tsha256schecksums-sha256(RRR(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR5stChangescBsMeZidddddgd6dddgd6dddgd	6Zd
ZRS(RRRtpriorityRRRschecksums-sha1Rschecksums-sha256cCs|ddd}y|jd\}}Wntk
rDd}nX|djdri|dd }n|dd}d	|||dfS(
s>Return the path in the pool where the files would be installedRiRt/tmaintsourcetlibis
pool/%s/%s/%s(RR,R(RRRt
subsectiontsubdir((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt
get_pool_pathDs

(RRRR#(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR=s
t
PdiffIndexcBsSeZiddgd6dddgd6dddgd6ZedZdZRS(tSHA1Rssha1-currenttdatessha1-historyssha1-patchescCsWi}xJ|jD]?}t||dr/qn|j|}i|d6||<qW|S(NRR(RR*t_get_size_field_length(Rtfixed_field_lengthsR	R((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR
cscCs7g||D]}tt|d^q}t|S(NR(R-R;tmax(RR	Rtlengths((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR'os-(RRRRR
R'(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR$\s
tReleasecBs}eZdZidddgd6dddgd6dddgd6ZdZdZedeZed	Zd
Z	RS(sRepresents a Release file

    Set the size_field_behavior attribute to "dak" to make the size field
    length only as long as the longest actual value.  The default,
    "apt-ftparchive" makes the field 16 characters long regardless.
    RRRRRsapt-ftparchivecCs(|dkrtdn	||_dS(Nsapt-ftparchivetdaks<size_field_behavior must be either 'apt-ftparchive' or 'dak'(sapt-ftparchiveR,(R,t_Release__size_field_behavior(RR8((s1/usr/lib/python2.7/dist-packages/debian/deb822.pytset_size_field_behaviorscCs|jS(N(R-(R((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRfscCs>i}x1|jD]&}|j|}i|d6||<qW|S(NR(RR'(RR(R	R((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR
s
cCs]|jdkrdS|jdkrYg||D]}tt|d^q-}t|SdS(Nsapt-ftparchiveiR,R(tsize_field_behaviorR-R;R)(RR	RR*((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR's
-(
RRRRR-R.RR/R
R'(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR+ts			tSourcescBs,eZdZdddddgZdZRS(s$Represent an APT source package lists
build-dependssbuild-depends-indepsbuild-conflictssbuild-conflicts-indeptbinarycOs*tj|||tj|||dS(N(RRR(RRR((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRs(RRRRR(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR0stPackagesc	Bs8eZdZddddddddd	g	Zd
ZRS(s$Represent an APT binary package listtdependsspre-dependst
recommendstsuggeststbreakst	conflictstprovidestreplacestenhancescOs*tj|||tj|||dS(N(RQRR(RRR((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRs(RRRRR(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR2s
		t_CaseInsensitiveStringcBs2eZdZdZdZdZdZRS(sCase insensitive string.
    cCs7tj||}|j|_t|j|_|S(N(R;t__new__Rt	str_lowerthashtstr_lower_hash(R[tstr_R((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR<scCs|jS(N(R?(R((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt__hash__scCs|j|jkS(N(R=R(RRK((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRNscCs|jS(N(R=(R((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyRs(RRRR<RARNR(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyR;s
			(+tdeprecationRRYRZRJRWtImportErrorRRIRAtosRhRRRR>R|tUserDictt	frozensetRRtobjectt	DictMixinRRR$RQRRRRRRRRRR$R+R0R2R;R;R.(((s1/usr/lib/python2.7/dist-packages/debian/deb822.pyt<module>sH

,zRZH1*