__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

7�g?����SrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
Jr SSKrSSK
r
SSKJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJ r J!r! SSK"r"SSK#J$r$J%r%J&r& SSK(J)r)J*r*J+r+J,r, SSK-r.SSK/r.\ \\\\0\\\\04r1\ \0\\14r2\r3\\4\34r5\\4\34r6\"SSS	9r7SSK8r8\8Rr S
r:SSK<r<S
r=Sr>S\S
\@4SjrA\R�"S5S5rC\D"S/5rESrF\R�"S5rH"SS\I5rJ"SS\J5rK\!(a\5rLO\R�R0rL"SS\L5rN\!(a\6rOO\R�R2rO"SS\O5rP"SS\P5rQ\!(a\\4\\44rRO\SrR"SS\R5rT"SS 5rU\!(a\\4\4rVO\SrV"S!S"\V5rW\!(a"S#S$\%5rX"S%S&5rY"S'S(5rZ"S)S*\Q5r["S+S,\[5r\"S-S.\\\Y5r]"S/S0\\\Y5r^"S1S2\\\Z\Y5r_"S3S4\[5r`"S5S6\[5ra"S7S8\]\Z5rb"S9S:\Q\Z\Y5rc"S;S<\c5rd"S=S>\R�"S>S?55rf"S@SA\Q5rg"SBSC5rhg!\'a GN4f=f!\'\;4a Sr:GN�f=f!\'a Sr=SSK?r?S
r>GN�!\'a Sr>GNf=ff=f)DaaDictionary-like interfaces to RFC822-like files

The Python deb822 aims to provide a dict-like interface to various RFC822-like
Debian data formats, like Packages/Sources, .changes/.dsc, pdiff Index files,
etc. As well as the generic :class:`Deb822` class, the specialised versions
of these classes  (:class:`Packages`, :class:`Sources`, :class:`Changes` etc)
know about special fields that contain specially formatted data such as
dependency lists or whitespace separated sub-fields.

This module has few external dependencies, but can use python-apt if available
to parse the data, which gives a very significant performance boost when
iterating over big Packages files.

Whitespace separated data within fields are known as "multifields".
The "Files" field in Sources files, for instance, has three subfields, while
"Files" in .changes files, has five; the relevant classes here know this and
correctly handle these cases.

Key lookup in Deb822 objects and their multifields is case-insensitive, but
the original case is always preserved, for example when printing the object.

The Debian project and individual developers make extensive use of GPG
signatures including in-line signatures. GPG signatures are automatically
detected, verified and the payload then offered to the parser.

Relevant documentation on the Deb822 file formats available here.

- `deb-control(5)
  <https://manpages.debian.org/unstable/dpkg-dev/deb-control.5.html>`_,
  the `control` file in the binary package (generated from
  `debian/control` in the source package)
- `deb-changes(5)
  <https://manpages.debian.org/unstable/dpkg-dev/deb-changes.5.html>`_,
  `changes` files that developers upload to add new packages to the
  archive.
- `dsc(5) <https://manpages.debian.org/unstable/dpkg-dev/dsc.5.html>`_,
  Debian Source Control file that defines the files that are part of a
  source package.
- `Debian mirror format <http://wiki.debian.org/RepositoryFormat>`_,
  including documentation for Packages, Sources files etc.

Overview of deb822 Classes
--------------------------

Classes that deb822 provides:

  * :class:`Deb822` base class with no multifields. A Deb822 object holds a
    single entry from a Deb822-style file, where paragraphs are separated by
    blank lines and there may be many paragraphs within a file. The
    :func:`~Deb822.iter_paragraphs` function yields paragraphs from a data
    source.

  * :class:`Packages` represents a Packages file from a Debian mirror.
    It extends the Deb822 class by interpreting fields that
    are package relationships (Depends, Recommends etc). Iteration is forced
    through python-apt for performance and conformance.

  * :class:`Dsc` represents .dsc files (Debian Source Control) that are the
    metadata file of the source package.

    Multivalued fields:

      * Files: md5sum, size, name
      * Checksums-Sha1: sha1, size, name
      * Checksums-Sha256: sha256, size, name
      * Checksums-Sha512: sha512, size, name
      * Package-List: package, package-type, section, priority, _other

  * :class:`Sources` represents a Sources file from a Debian mirror.
    It extends the Dsc class by interpreting fields that
    are package relationships (Build-Depends, Build-Conflicts etc).
    Iteration is forced through python-apt for performance and conformance.

  * :class:`Release` represents a Release file from a Debian mirror.

    Multivalued fields:

      * MD5Sum: md5sum, size, name
      * SHA1: sha1, size, name
      * SHA256: sha256, size, name
      * SHA512: sha512, size, name

  * :class:`Changes` represents a .changes file that is uploaded to "change
    the archive" by including new source or binary packages.

    Multivalued fields:

      * Files: md5sum, size, section, priority, name
      * Checksums-Sha1: sha1, size, name
      * Checksums-Sha256: sha256, size, name
      * Checksums-Sha512: sha512, size, name

  * :class:`PdiffIndex` represents a pdiff Index file (`foo`.diff/Index) file
    from a Debian mirror.

    Multivalued fields:

      * SHA1-Current: SHA1, size
      * SHA1-History: SHA1, size, date
      * SHA1-Patches: SHA1, size, date
      * SHA1-Download: SHA1, size, filename
      * X-Unmerged-SHA1-History: SHA1, size, date
      * X-Unmerged-SHA1-Patches: SHA1, size, date
      * X-Unmerged-SHA1-Download: SHA1, size, filename
      * SHA256-Current: SHA256, size
      * SHA256-History: SHA256, size, date
      * SHA256-Patches: SHA256, size, date
      * SHA256-Download: SHA256, size, filename
      * X-Unmerged-SHA256-History: SHA256, size, date
      * X-Unmerged-SHA256-Patches: SHA256, size, date
      * X-Unmerged-SHA256-Download: SHA256, size, filename

  * :class:`Removals` represents the ftp-master removals file listing when
    and why source and binary packages are removed from the archive.


Input
=====

Deb822 objects are normally initialized from a file object (from which
at most one paragraph is read), a multiline string of Deb822 format, a
string representing a filename, or a pathlib.Path object.
Alternatively, any sequence that returns one line of input at a time
may be used, e.g a list of strings.

PGP signatures, if present, will be stripped.

Example::

    >>> from debian.deb822 import Deb822
    >>> filename = '/var/lib/apt/lists/deb.debian.org_debian_dists_sid_InRelease'
    >>> with open(filename) as fh: # doctest: +SKIP
    ...     rel = Deb822(fh)
    >>> print('Origin: {Origin}\nCodename: {Codename}\nDate: {Date}'.format_map( # doctest: +SKIP
    ...       rel))
    Origin: Debian
    Codename: sid
    Date: Sat, 07 Apr 2018 14:41:12 UTC
    >>> print(list(rel.keys()))   # doctest: +SKIP
    ['Origin', 'Label', 'Suite', 'Codename', 'Changelogs', 'Date',
    'Valid-Until', 'Acquire-By-Hash', 'Architectures', 'Components',
    'Description', 'MD5Sum', 'SHA256']


In the above, the `MD5Sum` and `SHA256` fields are just a very long string. If
instead the :class:`Release` class is used, these fields are interpreted and
can be addressed::

    >>> from debian.deb822 import Release
    >>> filename = '/var/lib/apt/lists/deb.debian.org_debian_dists_sid_InRelease'
    >>> with open(filename) as fh: # doctest: +SKIP
    ...     rel = Release(fh)
    >>> wanted = 'main/binary-amd64/Packages'
    >>> [(l['sha256'], l['size']) for l in rel['SHA256'] if l['name'] == wanted]   # doctest: +SKIP
    [('c0f7aa0b92ebd6971c0b64f93f52a8b2e15b0b818413ca13438c50eb82586665', '45314424')]


Iteration
=========

All classes use the :func:`~Deb822.iter_paragraphs` class method to easily
iterate through each paragraph in a file that contains multiple entries
(e.g. a Packages.gz file).
For example::

    >>> with open('/mirror/debian/dists/sid/main/binary-i386/Sources') as f:  # doctest: +SKIP
    ...     for src in Sources.iter_paragraphs(f):
    ...         print(src['Package'], src['Version'])

The `iter_paragraphs` methods can use python-apt if available to parse
the data, since it significantly boosts performance.
If python-apt is not present and the
file is a compressed file, it must first be decompressed manually. Note that
python-apt should not be used on `debian/control` files since python-apt is
designed to be strict and fast while the syntax of `debian/control` is a
superset of what python-apt is designed to parse.
This function is overridden to force use of the
python-apt parser using `use_apt_pkg` in the :func:`~Packages.iter_paragraphs`
and :func:`~Sources.iter_paragraphs` functions.


Sample usage
============

Manipulating a .dsc file::

   from debian import deb822

   with open('foo_1.1.dsc') as f:
       d = deb822.Dsc(f)
   source = d['Source']
   version = d['Version']

   for f in d['Files']:
       print('Name:', f['name'])
       print('Size:', f['size'])
       print('MD5sum:', f['md5sum'])

    # If we like, we can change fields
    d['Standards-Version'] = '3.7.2'

    # And then dump the new contents
    with open('foo_1.1.dsc2', 'w') as new_dsc:
        d.dump(new_dsc)

(TODO: Improve, expand)

Deb822 Classes
--------------
�N)�Path)�Any�Callable�cast�Dict�	Generator�Iterator�Iterable�IO�List�Mapping�MutableMapping�Optional�overload�Text�Tuple�Type�TypeVar�Union�
TYPE_CHECKING)�Literal�Protocol�	TypedDict)�
OrderedSet�_CaseInsensitiveString�_strI�default_field_sort_key�T_Deb822Dict�
Deb822Dict��boundTF�f�returnc�f�UR5 g![[R4a gf=f)zgtest that a file-like object is really a filehandle

Only filehandles can be given to apt_pkg.TagFile.
TF)�fileno�AttributeError�io�UnsupportedOperation)r"s �//usr/lib/python3/dist-packages/debian/deb822.py�_has_filenor*Is0��
�	���
����B�3�3�4����s��0�0�c��[U5$�N)r)�vs r)�_cached_strIr/Vs
����8�O�z&/usr/share/keyrings/debian-keyring.gpgz
/usr/bin/gpgvz
debian.deb822c��\rSrSrSrSrg)�Erroricz0Base class for custom exceptions in this module.�N��__name__�
__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r3r0r)r2r2cs��:r0r2c��\rSrSrSrSrg)�RestrictedFieldErrorigz>Raised when modifying the raw value of a field is not allowed.r3Nr4r3r0r)r<r<gs��Hr0r<c�X^�\rSrSrSrS
U4SjjrSrS\4SjrS\	S\	4Sjr
S	rU=r$)�TagSectionWrapperiqz�Wrap 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.
c�f>�XlU=(d
 [5Ul[[U]5 gr-)�_TagSectionWrapper__section�_AutoDecoder�decoder�superr>�__init__)�self�sectionrB�	__class__s   �r)rD�TagSectionWrapper.__init__xs&���
!���0�,�.���
���/�1r0c#�# �URR5HnURS5(aMUv� M! g7f�N�#)r@�keys�
startswith�rE�keys  r)�__iter__�TagSectionWrapper.__iter__�s0����>�>�&�&�(�C��>�>�#�&�&��	�)�s
�2A�	Ar#c��[URR5Vs/sHnURS5(aMUPM sn5$s snfrJ)�lenr@rLrMrNs  r)�__len__�TagSectionWrapper.__len__�sG���4�>�>�#6�#6�#8�0�#8�C��>�>�#�.��#8�0�1�	1��0s�A
�A
rOc��URRU5nURRU5nUc[	U5eX3RS5S-SnUR
S5RS5$)N�:�z 	�
)r@�find_rawrB�decode�KeyError�find�lstrip�rstrip)rErO�sraw�s�datas     r)�__getitem__�TagSectionWrapper.__getitem__�so���~�~�&�&�s�+���L�L����%���9��3�-�������Q��� ���{�{�5�!�(�(��.�.r0)�	__sectionrBr-)
r5r6r7r8r9rDrP�intrT�strrcr:�
__classcell__�rGs@r)r>r>qs;�����2��1��1�/�s�/�s�/�/r0r>c��^�\rSrSrSrSU4SjjrSrS\4SjrSr	S	r
S
rSrS\
SS4S
jrS\
SS4SjrS\
S\
SS4SjrS\
S\
SS4SjrSSjrS\
4SjrS\S\4SjrSrSrSrU=r$)ri�aA 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.
Nc��>�0Ul[5UlSUlX@l[UR5Ul[[U]'5 Ub?/n[US5(aUR5nO[U5nUH	upgXpU'M Ub�X lUc@URRURVs/sHn[!U5PM sn5 gURRUV
s/sHo�UR;dM[!U
5PM! sn
5 gg![a2 [UR5n[XX5n	[SX�4-5ef=fs snfs sn
f)N�itemszCdictionary update sequence element #%d has length %d; 2 is required)�_Deb822Dict__dictr�_Deb822Dict__keys�_Deb822Dict__parsed�encodingrArBrCrrD�hasattrrl�list�
ValueErrorrS�extendr/)rE�_dict�_parsed�_fieldsrprl�kr.�this�len_r"rGs           �r)rD�Deb822Dict.__init__�sC������ �l�����
� �
�#�D�M�M�2���
�j�$�(�*����E��u�g�&�&����
���U���
?�!�D�A���G�"���#�M������"�"�T�]�]�#K�]��L��O�]�#K�L����"�"�W�#[�W��T�]�]�HZ�O�L��O�W�#[�\����
?��4�;�;�'���5�;�'�� �/�26��>�?�?�
?��$L��#[s�D'�E&�8E+�E+�'<E#c#�L# �URHn[U5v� M g7fr-)rnrgrNs  r)rP�Deb822Dict.__iter__�s����;�;�C��c�(�N��s�"$r#c�,�[UR5$r-)rSrn�rEs r)rT�Deb822Dict.__len__�s���4�;�;��r0c�l�[U5nURRU5 X RU'gr-)r/rn�addrm)rErO�value�keyis    r)�__setitem__�Deb822Dict.__setitem__�s*���C� ���������!���D�r0c���[U5nURUnUR
R
U5$![a/ URb X R;aURUnNRef=fr-)rrmr\rornrBr[)rErOr�r�s    r)rc�Deb822Dict.__getitem__�sj���S�z��	��K�K��%�E��|�|�"�"�5�)�)���	��}�}�(�T�[�[�-@��
�
�d�+���		�s�7�5A0�.A0c��[U5nURRU5 URU	g![a gf=fr-)rrn�removermr\�rErOr�s   r)�__delitem__�Deb822Dict.__delitem__sB���S�z�������4� �	����D�!���	�
�	�s�
6�
A�Ac�4�[U5nX R;$r-)rrnr�s   r)�__contains__�Deb822Dict.__contains__s���S�z���{�{�"�"r0�fieldc�L�URR[U55 g)z9Re-order the given field so it is "last" in the paragraphN)rn�
order_lastr�rEr�s  r)r��Deb822Dict.order_lasts�������u�U�|�,r0c�L�URR[U55 g)z:Re-order the given field so it is "first" in the paragraphN)rn�order_firstrr�s  r)r��Deb822Dict.order_firsts��������e��-r0�reference_fieldc�`�URR[U5[U55 g)z}Re-order the given field so appears directly after the reference field in the paragraph

The reference field must be present.N)rn�order_beforer�rEr�r�s   r)r��Deb822Dict.order_befores!��	
��� � ��u��u�_�/E�Fr0c�`�URR[U5[U55 g)zRe-order the given field so appears directly before the reference field in the paragraph

The reference field must be present.
N)rn�order_afterrr�s   r)r��Deb822Dict.order_after!s!��
	
������e��e�O�.D�Er0c�Z�Uc[n[[URUS95Ulg)z�Re-order all fields

:param key: Provide a key function (same semantics as for sorted).  Keep in mind that
  Deb822 preserve the cases for field names - in generally, callers are recommended to use
  "lower()" to normalize the case.
N)rO)rr�sortedrnrNs  r)�sort_fields�Deb822Dict.sort_fields(s%���;�(�C� ������!=�>��r0c
��SSRUR5VVs/sHupU<SU<3PM snn5-$s snnf)Nz{%s}�, �: )�joinrl)rErxr.s   r)�__repr__�Deb822Dict.__repr__4s5����	�	�����"N����q�!�#4��"N�O�O�O��"Ns�?�otherc�f�[U5n[U5nX#:XdgUHnXX:wdM g g)NFT)r�)rEr��mykeys�	otherkeysrOs     r)�__eq__�Deb822Dict.__eq__7s;�������5�M�	��"���C��y�E�J�&���
r0c�(�URU5nU$r-ri)rE�copys  r)r��Deb822Dict.copyHs���~�~�d�#���r0)�__dict�__keys�__parsedrBrp)NNN�utf-8r-)r5r6r7r8r9rDrPrfrTr�rcr�r�rgr�r�r�r�r�r�r�boolr��__hash__r�r:rhris@r)rr�s�����"���!�	']�V�
 �� �"�*�$	�#�-��-��-�.��.��.�G�#�G��G��G�F��F�s�F�t�F�
?�P�#�P��C��D���H��r0c�P�\rSrSrSrS'Sjr\(a\"SSS9r\	S(Sj5r
\S5rS	r
\R"\
S
-5r\R"S5rS)SjrS
\4SjrS
\4SjrSrSrS
\4SjrSrSr\S
\4Sj5r\S*Sj5r\S+Sj5r\S,Sj5r\S,Sj5rS,Sjr\S5r\S5rSr S-Sjr!\R"S5r"\S-S j5r#\S-S!j5r$\	S-S"j5r%S-S#jr&S$r'S%r(S&r)g).�Deb822iQuGeneric Deb822 data

:param sequence: a string, or any object that returns a line of
    input each time, normally a file.  Or a filename (as a str) or a
    `pathlib.Path` object. Alternately, sequence can
    be a dict that contains the initial key-value pairs. When
    python-apt is present, sequence can also be a compressed object,
    for example a file object associated to something.gz.

: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.)

:param strict: Dict controlling the strictness of the internal parser
    to permit tuning of its behaviour between "generous in what it
    accepts" and "strict conformance". Known keys are described below.

*Internal parser tuning*

- `whitespace-separates-paragraphs`: (default: `True`)
  Blank lines between paragraphs should not have any whitespace in them
  at all. However:

  - Policy §5.1 permits `debian/control` in source packages to separate
    packages with lines containing whitespace to allow human edited
    files to have stray whitespace. Failing to honour this breaks
    tools such as
    `wrap-and-sort <https://manpages.debian.org/wrap-and-sort>`_
    (see, for example,
    `Debian Bug 715558 <https://bugs.debian.org/715558/>`_).
  - `apt_pkg.TagFile` accepts whitespace-only lines within the
    `Description` field; strictly matching the behaviour of apt's
    Deb822 parser requires setting this key to `False` (as is done
    by default for :class:`Sources` and :class:`Packages`.
    (see, for example,
    `Debian Bug 913274 <https://bugs.debian.org/913274/>`_).

Note that these tuning parameter are only for the parser that is
internal to `Deb822` and do not apply to python-apt's apt_pkg.TagFile
parser which would normally be used for Packages and Sources files.
Nc���0nSn[US5(a[[U5nO[[U5n[RXX2US9 UbUR
XrU5 SUlg![a Nf=f)Nrl)rurvrwrp)	rqr�
Deb822Mapping�
InputDataTyperrD�_internal_parser�EOFError�gpg_info)rE�sequence�fieldsrvrp�strictru�iterables        r)rD�Deb822.__init__�s��������8�W�%�%����1�E��M�8�4�H����D�w�%-�	�	/���
��%�%�h��?���
���
��
�s�A*�*
A7�6A7�T_Deb822r c
#�# �[U[5=(de [U[5=(aN U=(aE SU;=(a9 [U5R5=(a [U5R	5nU=(a [U5=(d UnU(a$[(dSn	[R"U	5 O&U(aU(dSn	[R"U	5 [(anU(ag[U[5(a[U5n[R"USS9n
U
H+nU"U[U[U55US9nU(dM'Uv� M- g/n
SnU(a4[U[[45(de[[USUS	95n
SnOi[U[5(a[UR55n
O:[U[ 5(a[UR55n
O[U5n
U"X�XVS
9nU(dOUv� MU(aU
R#5 gg!U(aU
R#5 ff=f7f)a8Generator 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 can be used
    if available to parse the file, since it's much much faster.  Set
    this parameter to True to enable use of apt_pkg. Note that the
    TagFile parser from apt_pkg is a much stricter parser of the
    Deb822 format, particularly with regards whitespace between
    paragraphs and comments within paragraphs. If these features are
    required (for example in debian/control files), ensure that this
    parameter is set to False.
: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.)
:param strict: dict of settings to tune the internal parser if that is
    being used. See the documentation for :class:`Deb822` for details.
rYz}Parsing of Deb822 data with python3-apt's apt_pkg was requested but this package is not importable. Is python3-apt installed?zjParsing of Deb822 data with python3-apt's apt_pkg was requested but this cannot be done on non-file input.T)�bytes)r�rvrpF�rt�rp)rpr�N)�
isinstancerrg�exists�is_filer*�
_have_apt_pkg�warnings�warn�apt_pkg�TagFiler>rA�iter�open�
splitlinesr��close)�clsr�r��use_apt_pkg�shared_storagerpr��is_filename_like�apt_pkg_allowed�msg�parserrF�	paragraphr��close_fh�xs                r)�iter_paragraphs�Deb822.iter_paragraphs�s����F
�x��&�
C�
��#�
&�B�8�B��H�8L�B�
�(�^�
"�
"�
$�B�)-�h��)?�)?�)A�	�&�
���!�5�%5�	��}�}�,�
�

�M�M�#��
��G�
�
�M�M�#���=�_��(�D�)�)��x�=���_�_�X�T�:�F�!���v�(9�'�<�PX�CY�(Z�)1�3�	��9�#�O�"��H��H�
%�#�%�h��d��<�<�<�<�#�D��4�(�$K�L�H�#�H���#�.�.�#�H�$7�$7�$9�:�H���%�0�0�#�H�$7�$7�$9�:�H� $�H�~�H���H�x�O�A����G�	���N�N�$���8��N�N�$��s%�EI�
I�+B:H>�%I�>I�Ic#��# �SnUHen[U[5(aUR5nURS5(aM@U(aUR	S5(dM_SnUv� Mg g7f)ziYields only lines that do not begin with '#'.

Also skips any blank lines at the beginning of the input.
T�#�
FN)r�rg�encoderMr_)r��at_beginning�lines   r)�_skip_useless_lines�Deb822._skip_useless_linessa������D��$��$�$��{�{�}�����t�$�$����{�{�7�+�+��$���J��s�A/A1z!^(?P<key>[^: \t\n\r\f\v]+)\s*:\s*z(?P<data>(?:\S+(\s+\S+)*)?)\s*$z((?P<source>[^ ]+)( \((?P<version>.+)\))?c�V^�U4Sjn[U[[45(aUR5nSnSnUR	URU5U5H�nURRU5nURRU5n	U	(a@U(aX`U'U	RS5nU"U5(dSnMmU	RS5nM�U(dM�USR5(dM�UR5(aM�USU--
nM� U(aX`U'gg)Nc�$>�TSL=(d UT;$r-r3)r"r�s �r)�wanted_field�-Deb822._internal_parser.<locals>.wanted_field0s����T�>�0�Q�&�[�0r0�rOrbrrY)r�rgr�r��_gpg_stripped_paragraphr�rB�decode_bytes�
_new_field_re�match�group�isspace)
rEr�r�r�r��curkey�content�	linebytesr��ms
  `       r)r��Deb822._internal_parser)s���	1��h��e��-�-��*�*�,�H������5�5��(�(��2�F�<�I��<�<�,�,�Y�7�D��"�"�(�(��.�A���#*��L�������#�F�+�+�!�F���'�'�&�/����t��Q����)�)�$�,�,�.�.��4�$�;�&���+<�.�"��L�r0r#c�0�UR5nUbU$S$�Nr�)�dump�rE�ds  r)�__str__�Deb822.__str__Ts���I�I�K���M�q�)�r�)r0c�b�UR5nUbURUR5$S$)Nr0)r�r�rpr�s  r)�	__bytes__�Deb822.__bytes__Xs)���I�I�K��*+�-�q�x�x��
�
�&�@�S�@r0c��[X5$)z�Return 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.
�rgrNs  r)�
get_as_string�Deb822.get_as_string^s���4�9�~�r0c#�# �UH=nURU5nU(a	USS:XaU<SU<S3nO
U<SU<S3nUv� M? g7f)NrrYrWr�)r)rErOr��entrys    r)�_dump_format�Deb822._dump_formathsH����C��&�&�s�+�E��E�!�H��,�
&)�%�0��&)�5�1���K��s�AAc�@�SRUR55$r�)r�rrs r)�	_dump_str�Deb822._dump_strvs���w�w�t�(�(�*�+�+r0c�r�UR5H#nURURU55 M% gr-)r�writer�)rE�fdrprs    r)�
_dump_fd_b�Deb822._dump_fd_bys,��
�&�&�(�E��H�H�U�\�\�(�+�,�)r0c�T�UR5HnURU5 M gr-)rr)rErrs   r)�
_dump_fd_t�Deb822._dump_fd_t�s"���&�&�(�E��H�H�U�O�)r0c��gr-r3rs r)r��Deb822.dump�s��r0c��gr-r3�rErrp�	text_modes    r)r�r����	
r0c��gr-r3rs    r)r�r�rr0c��gr-r3rs    r)r�r�rr0c��gr-r3rs    r)r�r�rr0c���UcUR5$U(a'UR[[[U55 gUcUR
nUR
[[[U5U5 g)a�Dump the contents in the original format

:param fd: file-like object to which the data should be written
    (see notes below)
:param encoding: str, optional (Defaults to object default).
    Encoding to use when writing out the data.
:param text_mode: bool, optional (Defaults to ``False``).
    Encoding should be undertaken by this function rather than by the
    caller.

If fd is None, returns a unicode object.  Otherwise, fd is assumed to
be a file-like object, and this method will write the data to it
instead of returning a unicode object.

If fd is not none and text_mode is False, the data will be encoded
to a byte string before writing to the file.  The encoding used is
chosen via the encoding parameter; None means to use the encoding the
object was initialized with (utf-8 by default).  This will raise
UnicodeEncodeError if the encoding can't support all the characters in
the Deb822Dict values.
N)rrrrrgrprr�rs    r)r�r�se��@�:��>�>�#�#���O�O�D��C��"�-�.��
�� �=�=���O�O�D��E��B�/��:�r0c�.�URS5(+$)NrY)�count�ras r)�is_single_line�Deb822.is_single_line�s���7�7�4�=� � r0c�6�[RU5(+$r-)r�r&r%s r)�
is_multi_line�Deb822.is_multi_line�s���(�(��+�+�+r0c��U(dU$U(dU$URU5(auURU5(a_SnX-RS5(aSn[X-U-RU55nUS=pVUSSHnXu:XaM
Xc-U-nUnM U$UR	U5(aNUR	U5(a8URS5H!nXqRS5;dMUS-U-nM# U$[e)N� r�rrXTrY)r&r$r��splitr)r�rs)rE�s1�s2�delim�L�prev�merged�items        r)�
_merge_fields�Deb822._merge_fields�s��
��I���I����r�"�"�t�':�':�2�'>�'>�
�E�����t�$�$�����
�R��.�.�u�5�6�A��a�D� �D��!�"����<����$�.������M����b�!�!�d�&8�&8��&<�&<��
�
�d�+���}�}�T�2�2��d��T�)�B�,��I��r0c��UcUnUnOUnUnX;aX;aURXAXQ5nOX;aXAnOX;aXQnO[eUcX`U'gU$r-)r5r\)rErO�d1�d2�x1�x2r3s       r)�merge_fields�Deb822.merge_fieldssq���:��B��B��B��B�
�9����'�'�����9�F�
�Y��W�F�
�Y��W�F��N��:���I���
r0s=^-----(?P<action>BEGIN|END) PGP (?P<what>[^-]+)-----[\r\t ]*$c�:�SU5n[RX!S9$)a�Return a (gpg_pre, payload, gpg_post) tuple

Each element of the returned tuple is a list of lines (with trailing
whitespace stripped).

:param sequence: iterable.
    An iterable that yields lines of data (str, unicode,
    bytes) to be parsed, possibly including a GPG in-line signature.
:param strict: dict, optional.
    Control over the strictness of the parser. See the :class:`Deb822`
    class documentation for details.
c3�p# �UH,n[U[5(aUR5OUv� M. g7fr-)r�rgr�)�.0r�s  r)�	<genexpr>�/Deb822.split_gpg_and_payload.<locals>.<genexpr>Ns'���W�h��:�a��+=�+=�Q�X�X�Z�1�D�h�s�46)r�)r��_split_gpg_and_payload)r�r��_encoded_sequences   r)�split_gpg_and_payload�Deb822.split_gpg_and_payload9s%��*X�h�W���,�,�->�,�N�Nr0c��U(d0n/n/n/nSnURSS5nSnUGH�nURS5nU(a U(aUR5(aM:SnURS5(a[R
R
U5OSn	U(aU(+=(d UR5OU(+n
U	(dlUS:Xa%U
(dURU5 M�U(d O�M�US:XaU
(aSnM�URU5 M�US:XaURU5 GMGMU	RS	5S
:XaU	RS5nO(U	RS	5S:XaURU5  O;U
(aGMkU(dURU5 GM�URU5 GM� U(aX#U4$[S
5e)NsSAFE�whitespace-separates-paragraphsTr�F�-sSIGNED MESSAGEs	SIGNATURE�actionsBEGIN�whatsENDzonly blank lines found in input)
�get�stripr�rMr��_gpgrer��appendr�r�)r�r��
gpg_pre_lines�lines�gpg_post_lines�state�accept_empty_or_whitespace�
first_liner�r��
is_empty_lines           r)rC�Deb822._split_gpg_and_payloadQs�����F��
�������&,�Z�Z�0Q�SW�%X�"��
��D��:�:�g�&�D���t�|�|�~�~��"�
�-1�_�_�T�-B�-B��
�
�#�#�D�)��A�;U��H�6������^b�Zb�M���G�#�(����T�*�,�"� -��/�/�$� '��%�,�,�T�2��l�*�"�)�)�$�/�+��7�7�8�$��0��G�G�F�O�E��W�W�X�&�&�0�"�)�)�$�/��$�}� �%�,�,�T�2�&�-�-�d�3�S�V�!�.�9�9��8�9�9r0c�*�URX5S$)NrX)rC)r�r�r�s   r)r��Deb822._gpg_stripped_paragraph�s���)�)�(�;�A�>�>r0c��[US5(d[S5eURc#[R	UR
US9UlUR$)z�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)
�raw_textzoriginal text cannot be found)�keyrings)rqrsr��GpgInfo�
from_sequencer[)rEr\s  r)�get_gpg_info�Deb822.get_gpg_info�sV���t�Z�(�(��<�=�=��=�=� �$�1�1�$�-�-�;C�2�E�D�M��}�}�r0c��SU;agURS5(a[S5e[UR55HBup4US:XaM
U(d[S5eUSR	5(aM9[S5e g)z�Raise ValueError if value is not a valid value for key

Subclasses that do interesting things for different keys may wish to
override this method.
rYNzvalue must not end in '\n'rzvalue must not have blank linesz$each line must start with whitespace)�endswithrs�	enumerater�r�)rErOr��nor�s     r)�validate_input�Deb822.validate_input�s~���u����>�>�$����:�;�;�
"�%�"2�"2�"4�5�H�B��Q�w��� �!B�C�C���7�?�?�$�$� �!G�H�H�
6r0c�R�URX5 [RXU5 gr-)rerr�)rErOr�s   r)r��Deb822.__setitem__�s �����C�'����t�%�0r0)r�)NNNr�N)NFFr�N�NN�NF)NT)NNFr-)*r5r6r7r8r9rDrrr��classmethodr��staticmethodr��	_key_part�re�compiler��_explicit_source_rer�rgrr�rrrrrrrr�r&r)r5r<rNrErCr�r_rer�r:r3r0r)r�r�Qs%��-�`���!���8��:�X�6��� $�$)�',�!(�#�
a%��a%�J����.5�I��J�J�y�+M�M�N�M�
�*�*�	#���!%� $�)#�V*��*�A�5�A���,�3�,�-���
�c�
��
����
��
����
��
�����
��
�����
��
����,�`�!��!��,��,�%�T�"�J�Z�Z�>�?�F��%)�O��O�.�&*�A:��A:�F�?��?��0I�:1r0r�c�^�\rSrSrSrSrU4SjrS\4SjrS
Sjr	\
SSj5r\
SS	j5r\
S
5r\
S5rSrU=r$)r]i�aA 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 split.
See /usr/share/doc/gnupg/DETAILS.gz)�GOODSIG�EXPSIG�	EXPKEYSIG�	REVKEYSIG�BADSIGc�J>�[[U]
"U0UD6 SUlSUlgr-)rCr]rD�out�err�rE�args�kwargsrGs   �r)rD�GpgInfo.__init__�s%���
�g�t�%�t�6�v�6������r0r#c�$�SU;=(d SU;$)zIs the signature valid?rr�VALIDSIGr3rs r)�valid�
GpgInfo.valid�s���D� �6�J�$�$6�6r0c��g)z>Return the primary ID of the signee key, None is not availableNr3rs r)�uid�GpgInfo.uid�s�r0c�2�U"5n[U[5(aURS5UlOXl[U[5(aURS5UlOX#lSnURH�nURU5(dMU[
U5SnURS5nURS5nUSUnXpR;aXVS-SRSS5nOXVS-SRS5nUS;aM�X�U'M� U$)z�Create a GpgInfo object based on the gpg or gpgv output

Create 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.
rYz	[GNUPG:] Nr,rX)�NEWSI�NEWSIG�KEY_CONSIDERED�PROGRESS)
r�rgr-rxryrMrSrMr]�uidkeys)	r�rxry�n�headerr�rarOr�s	         r)�from_output�GpgInfo.from_output�s��
�E���c�3����I�I�d�O�A�E��E��c�3����I�I�d�O�A�E��E����E�E�D��?�?�6�*�*����F���%�D��:�:�d�#�D��	�	�#��A��r��(�C��k�k�!��q�S�T�
�(�(��a�0���q�S�T�
�(�(��-���G�G���c�F�/�0�r0c�f�U=(d [nU=(d [/n[U5nURSS/5 UHnURSU/5 M SU;a[	S5e[
R"U[
R[
R[
RSS9n[U[5(aUnOURU5nURU5up�SSS5 URWRS5W	RS55$!,(df   N>=f)	abCreate a new GpgInfo object from the given sequence.

:param sequence: sequence of lines of bytes or a single byte 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'])
z--status-fd�1z	--keyringz'cannot access any of the given keyringsF)�stdin�stdout�stderr�universal_newlinesNzunicode-escape)�GPGV_DEFAULT_KEYRINGS�GPGV_EXECUTABLErrrt�IOError�
subprocess�Popen�PIPEr�r��_get_full_bytes�communicater�r[)
r�r�r\�
executabler{rx�p�inprxrys
          r)r^�GpgInfo.from_sequence)s��$�4�4���4�O�#4�
��J������]�C�(�)��A��K�K��a�(�)���d�"��C�D�D�
�
�
��
���
���
���$�
���(�E�*�*����)�)�(�3���}�}�S�)�H�C�
����s�z�z�*:�;�"�z�z�*:�;�=�	=�
�
�s�-=D"�"
D0c��[U5n[U5nSnURS5(aSnX#-UR	U5-$![a gf=f)z�Return a byte string from a sequence of lines of bytes.

This method detects if the sequence's lines are newline-terminated, and
constructs the byte string appropriately.
r0�
)r��next�
StopIterationrbr�)r��
sequence_iterrU�join_strs    r)r��GpgInfo._get_full_bytesWsd���X��
�	��m�,�J������u�%�%��H��$�x�}�}�]�'C�C�C���	��	�s�A�
A�Ac�|�[US5nUR"U/UQ70UD6sSSS5 $!,(df   g=f)zMCreate a new GpgInfo object from the given file.

See GpgInfo.from_sequence.
�rbN)r�r^)r��targetr{r|�target_files     r)�	from_file�GpgInfo.from_filejs4���&�$�
�;��$�$�[�B�4�B�6�B� �
�
�s�-�
;)ryrx)r#Nr-ri)r5r6r7r8r9r�rDr�r�r�rkr�r^rlr�r�r:rhris@r)r]r]�s����+�H�G��7�t�7�M��0��0�d� $�!%�+=��+=�Z�D��D�$�C��Cr0r]c��\rSrSrSr\R"S5r\R"S5r\R"S5r	\R"S5r
\R"S5r\R"S5r\
R"S	S
S/5r\
R"SS
S
/5r\(a"SS\5r\S5r\S5rSrg)�PkgRelationiuz�Inter-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).
z�^\s*(?P<name>[a-zA-Z0-9][a-zA-Z0-9.+\-]*)(:(?P<archqual>([a-zA-Z0-9][a-zA-Z0-9-]*)))?(\s*\(\s*(?P<relop>[>=<]+)\s*(?P<version>[0-9a-zA-Z:\-+~.]+)\s*\))?(\s*\[(?P<archs>[\s!\w\-]+)\])?\s*((?P<restrictions><.+>))?\s*$z\s*,\s*z\s*\|\s*z\s+z>\s*<z#(?P<enabled>\!)?(?P<profile>[^\s]+)�ArchRestriction�enabled�arch�BuildRestriction�profilec�|�\rSrSr%\\S'\\\S'\\\\4\S'\\S\S'\\\S\S'S	r	g
)�PkgRelation.ParsedRelationi��name�archqual�versionzPkgRelation.ArchRestrictionr�zPkgRelation.BuildRestriction�restrictionsr3N)
r5r6r7r8rg�__annotations__rrrr:r3r0r)�ParsedRelationr��sK���I��s�m�#��e�C��H�o�.�.��4� =�>�?�?�"�4��-K�(L�#M�N�Nr0r�c
�,^^^�U4SjmU4SjmUUU4SjnTRRUR55n[TRRU5nUVVs/sHoUVs/sH
ob"U5PM snPM snn$s snfs snnf)zlParse a package relationship string (i.e. the value of a field like
Depends, Recommends, Build-Depends ...)
c��>�/nTRRUR55H=nUSS:HnU(aUSSnURTR	U(+U55 M? U$)Nr�!rX)�_PkgRelation__blank_sep_REr-rMrOr�)�raw�archsr��disabledr�s    �r)�parse_archs�0PkgRelation.parse_relations.<locals>.parse_archs�sh����E��*�*�0�0�����=����7�c�>������8�D����S�0�0�X��t�D�E�	>�
�Lr0c	�>�/nTRRUR5RS55nUH�n/nTRRU5HanTR
R
U5nU(dM'UR5nURTRUSS:gUS55 Mc URU5 M� U$)asplit a restriction formula into a list of restriction lists

Each term in the restriction list is a namedtuple of form:

    (enabled, label)

where
    enabled: bool: whether the restriction is positive or negative
    profile: the profile name of the term e.g. 'stage1'
z<> r�r�r�)
� _PkgRelation__restriction_sep_REr-�lowerrMr��_PkgRelation__restriction_REr��	groupdictrOr�)	r�r��groups�rgrpr��restrictionr��partsr�s	        �r)�parse_restrictions�7PkgRelation.parse_relations.<locals>.parse_restrictions�s�����L��-�-�3�3�C�I�I�K�4E�4E�e�4L�M�F�����#&�#5�#5�#;�#;�D�#A�K��0�0�6�6�{�C�E��u� %��� 1������0�0� %�i� 0�C� 7� %�i� 0���	$B��#�#�E�*�� �r0c�f>�TRRU5nU(aqUR5nUSUSSSSS.nUS(d
US(a
USUS4US'US(aT"US5US'US(aT"US5US'U$[R	S	U5 USSSSS.$)
Nr�r�)r�r�r�r�r��relopr�r�r�r�z8cannot parse package relationship "%s", returning it raw)�_PkgRelation__dep_REr�r��logger�warning)r�r�r�rr�r�r�s    ���r)�	parse_rel�.PkgRelation.parse_relations.<locals>.parse_rel�s�����L�L�&�&�s�+�E�����)��!�&�M� %�j� 1�#� �$(�����>�U�9�%5�$)�'�N�E�)�4D�#E�A�i�L���>� +�E�'�N� ;�A�f�I���(�(:��n�-�)/�A�n�%����N�N�7�8;�
=�� ��� $��
r0)�_PkgRelation__comma_sep_REr-rM�map�_PkgRelation__pipe_sep_RE)	r�r�r��tl_deps�cnf�or_deps�or_depr�r�s	`      @@r)�parse_relations�PkgRelation.parse_relations�sx���		�	 �8	�@�$�$�*�*�3�9�9�;�7���#�#�#�)�)�7�3��IL�M��g��9��v��6�"��9��M�M��9��Ms�&	B�/B�B�Bc�`^^^�SmSmUU4SjmSR[U4SjU55$)z�Format to string structured inter-package relationships

Perform the inverse operation of parse_relations, returning a string
suitable to be written in a package stanza.
c�L�UR(aSOS<UR<3$)Nr�r�)r�r�)�	arch_specs r)�pp_arch� PkgRelation.str.<locals>.pp_arch�s%�� �'�'��S�0�����
r0c��/nUH7nURUR(aSOS<UR<35 M9 SSRU5-$)Nr�r�z<%s>r,)rOr�r�r�)r�ra�terms   r)�pp_restrictions�(PkgRelation.str.<locals>.pp_restrictions�sL���A�$�����"�l�l���3������%��C�H�H�Q�K�'�'r0c�X>�USnURS5bUSUS--
nURS5nUbUSU--
nURS5nUb!USSR[TU55--
nURS	5nUb!US
SR[TU55--
nU$)Nr�r�z:%sr�z (%s %s)r�z [%s]r,r�� %s)rLr�r�)�deprar.�a�rr�r�s     ��r)�
pp_atomic_dep�&PkgRelation.str.<locals>.pp_atomic_dep	s�����F��A��w�w�z�"�.��U�S��_�,�,�����	�"�A��}��Z�!�^�#�������A��}��W�s�x�x��G�Q��8�8�8������'�A��}��U�S�X�X�c�/�1�&=�>�>�>���Hr0r�c�:>�SR[TU55$)Nz | �r�r�)�depsr�s �r)�<lambda>�!PkgRelation.str.<locals>.<lambda>s���U�Z�Z��M�4�(@�Ar0r�)�relsr�r�r�s @@@r)rg�PkgRelation.str�s2���	�
	(�	�&�y�y��A�4�H�J�	Jr0r3N)r5r6r7r8r9rnror�r�r�r�r�r��collections�
namedtupler�r�rrr�rkr�rlrgr:r3r0r)r�r�us�����z�z�	
��H��Z�Z�
�+�N��J�J�{�+�M��Z�Z��'�N��:�:�h�/���z�z�	� ��"�,�,�->�.7��-@�B�O�"�-�-�.@�/8�)�.D�F���	O�Y�	O��NN��NN�`�.J��.Jr0r�c��\rSrSrSrSrSrg)�_lowercase_dicti&z4Dictionary wrapper which lowercase keys upon lookup.c�H�[RXR55$r-)�dictrcr�rNs  r)rc�_lowercase_dict.__getitem__)s������i�i�k�2�2r0r3N)r5r6r7r8r9rcr:r3r0r)r�r�&s
��>�3r0r�c� �\rSrSrSrSrSrg)�_HasVersionFieldProtocoli/c��gr-r3)rEras  r)rc�$_HasVersionFieldProtocol.__getitem__1���r0c��gr-r3)rErar.s   r)r��$_HasVersionFieldProtocol.__setitem__5rr0r3N)r5r6r7r8rcr�r:r3r0r)rr/s��	�	r0rc�$�\rSrSrSrSrSrSrg)�_VersionAccessorMixini:z>Give access to Version keys as debian_support.Version objects.c�F�[RRUS5$�N�Version)�debian�debian_supportr
rs r)�get_version�!_VersionAccessorMixin.get_version<s���$�$�,�,�T�)�_�=�=r0c� �[U5US'gr	r)rEr�s  r)�set_version�!_VersionAccessorMixin.set_version@s���g�,��Y�r0r3N)r5r6r7r8r9r
rr:r3r0r)rr:s��H�>�'r0rc�2�\rSrSrSr/rSr\S5rSr	g)�_PkgRelationMixiniFaKPackage relationship mixin

Inheriting from this mixin you can extend a :class:`Deb822` 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.
c���[05UlSUlURH8nUR	5nX0;aSURU'M)/URU'M: grj)r��_PkgRelationMixin__relations�#_PkgRelationMixin__parsed_relations�_relationship_fieldsr�)rEr{r|r��keynames     r)rD�_PkgRelationMixin.__init__[s]��
+�2�.���"'����-�-�D��j�j�l�G��|�,0�� � ��)�-/�� � ��)�.r0c�^�TR(d][U4SjTRR55nUH(n[RTU5TRU'M* STlTR$)a�	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
  :class:`Deb822`, their components form a conjunction, i.e. they
  have to be AND-ed together
- the inner lists corresponds to the pipe-separated list of
  :class:`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 <`enabled`, `arch`> if the
    relationship is architecture specific, None otherwise.
    Enabled is a boolean (``False`` if the architecture is
    negated with ``!``, ``True`` otherwise), arch the
    Debian architecture name as a string.
  ``restrictions``
    A list of lists of tuples <`enabled`, `profile`>
    if there is a restriction formula defined, ``None``
    otherwise. Each list of tuples represents a restriction
    list while each tuple represents an individual term
    within the restriction list. Enabled is a boolean
    (``False`` if the restriction is negated with ``!``,
    ``True`` otherwise). The profile is the name of the
    build restriction.
    https://wiki.debian.org/BuildProfileSpec

  The arch and restrictions tuples are available as named tuples so
  elements are available as `term[0]` or alternatively as
  `term.enabled` (and so forth).

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')} ]
  ]

``"texlive <!cross>"``
becomes::

  [
    [ {'name': 'texlive', 'restriction': [[(false, 'cross')]]} ]
  ]
c�&>�TRUSL$r-)r)r�rEs �r)r��-_PkgRelationMixin.relations.<locals>.<lambda>�s����)9�)9�!�)<��)Dr0T)r�filterrrLr�r�)rE�	lazy_relsr�s`  r)�	relations�_PkgRelationMixin.relationsrsm���^�&�&��D�#�/�/�4�4�6�8�I���&1�&A�&A�$�q�'�&J�� � ��#��'+�D�#����r0)�__parsed_relations�__relationsN)
r5r6r7r8r9rrD�propertyrr:r3r0r)rrFs*���$��/�.�U ��U r0rc�<^�\rSrSrSr0rSrU4SjrSrSr	U=r
$)�_multivaluedi�a=A 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 :class:`Dsc`, :class:`Changes`, and :class:`PdiffIndex`
as examples.
c���[R"U/UQ70UD6 URR5H�up4XnURU5(a/X'XRnO[5X'XRn[SUR55H6nU"[[XGR[U5S-
S9555 M8 M� g![a M�f=f)NrX)�maxsplit)r�rD�_multivalued_fieldsrlr\r)rOr�updaterr��zipr-rS)rEr{r|r�r��contents�updater_methodr�s        r)rD�_multivalued.__init__�s�������.�t�.�v�.�!�5�5�;�;�=�M�E�
��;���!�!�(�+�+� ���!%��!3�!3��(�l���!%��!3�!3���t�X�%8�%8�%:�;���z�#�f�j�j�#�f�+�XY�/�j�6Z�*[�\�]�<�>���
��
�s�C�
C)�(C)c�j>�UR5UR;ag[[U]X5 gr-)r�r(rCr%re)rErOr�rGs   �r)re�_multivalued.validate_input�s+����9�9�;�$�2�2�2�

��,��4�S�@r0c��UR5nX R;a�[R"5n[	XS5(aX/nOURS5 XnURUn0nURnUHonUHUn[Xx5n	XbUn
U
[U	5-
S-U	-nSU;a[SU-5eURSU-5 MW URS5 Mq UR5RS5$[RX5$![a N�f=f![a  Mgf=f![a U	nN�f=f)NrLrYr,z5'\n' not allowed in component of multivalued field %sr�)r�r(r'�StringIOrqr�_fixed_field_lengthsr&rgr\rSrs�getvaluer_r�r)rErO�keylr�array�order�
field_lengthsr4r��	raw_value�lengthr�s            r)r�_multivalued.get_as_string�sn���y�y�{���+�+�+�����B��t�y�&�)�)�����������	���,�,�T�2�E��M�
� $� 9� 9�
����A��$'���L�	�L�!.�!4�Q�!7��"(�#�i�.�!8�C� ?�)� K���u�}�(�*@�BE�*F�G�G��H�H�U�U�]�+�������!�"�;�;�=�'�'��-�-��#�#�D�.�.��+"�
��
��$�����$�*� )��*�s6�5D*�
D:�E�*
D7�6D7�:
E	�E	�E�Er3)r5r6r7r8r9r(rDrerr:rhris@r)r%r%�s&������^�(	A�$/�$/r0r%c�.�\rSrSrSrSr\S5rSrg)�_gpg_multivaluedia�A _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).
c� ^^
�STlUSnURSS5nUGb�[USS5=(d URSS5=(d Sm
[	U[
5(a	UTlGO5[	U[5(aURT
5TlGO[US5(aO�TRU
U4SjU5U5upVnU(a�U(a�[R"5nURSRU55 URS	5 URSRU55 URS	5 URSRU55 UR5Tl[!U5n	XiS'[#U	5n[$R&"T/UQ70UD6 g![a URSS5nGN�f=f![a	 /=n=pgGN%f=f![a XbS'Ndf=f)
Nrr�r�rpr�rlc3�H># �UHnTRUT5v� M g7fr-)�_bytes)r@rarprEs  ��r)rA�,_gpg_multivalued.__init__.<locals>.<genexpr>Fs����H�x�!�T�[�[��H�5�5�x�s�"r�s

)r[�
IndexErrorrL�getattrr�r�rgr�rqrEr�r'�BytesIOrr�r3rr�tupler%rD)rEr{r|r�r�rPrQrRr[�argslrps`         @r)rD�_gpg_multivalued.__init__(s������
�	4��A�w�H����H�d�+���� ��*�d�;�F�!�:�:�j�'�:�F�>E�
��(�E�*�*� (��
��H�c�*�*� (���� 9��
���7�+�+��@��2�2�H�x�H�"�$�9�M�.�!�^�!�z�z�|�H��N�N�5�:�:�m�#<�=��N�N�7�+��N�N�5�:�:�e�#4�5��N�N�7�+��N�N�5�:�:�n�#=�>�$,�$5�$5�$7�D�M�/� ��J�E�$�!�H� ��<�D�	���d�4�T�4�V�4��[�	4��z�z�*�d�3�H�	4��6 �@�=?�?�M�?�E�N�@��"�/�).�:�&�/�s5�G�3 G&�G<�G#�"G#�&G9�8G9�<H
�H
c��[U[5(aU$[U[5(aURU5$[	S[U5-5e)zdConverts s to bytes if necessary, using encoding.

If s is already bytes type, returns it directly.
z(bytes or unicode/string required, not %s)r�r�rgr��	TypeError�type)rarps  r)r?�_gpg_multivalued._bytes\sG���a�����H��a�����8�8�H�%�%��B�T�!�W�L�M�Mr0)r[N)	r5r6r7r8r9rDrlr?r:r3r0r)r<r<s#��	�25�h�
N��
Nr0r<c�<�\rSrSrSr/SQ/SQ/SQ/SQ/SQS.rS	rg
)�Dscijz�Representation of a .dsc (Debian Source Control) file

This class is a thin wrapper around the transparent GPG handling
of :class:`_gpg_multivalued` and the parsing of :class:`Deb822`.
��md5sum�sizer���sha1rOr���sha256rOr���sha512rOr�)�package�package-typerF�priority�_other��files�checksums-sha1�checksums-sha256�checksums-sha512zpackage-listr3N)r5r6r7r8r9r(r:r3r0r)rLrLjs ���,�2�6�6�T��r0rLc�J�\rSrSrSr/SQ/SQ/SQ/SQ/SQS.rS	\4S
jrSrg)
�Changesiyz�Representation of a .changes (archive changes) file

This class is a thin wrapper around the transparent GPG handling
of :class:`_gpg_multivalued` and the parsing of :class:`Deb822`.
)rNrOrFrXr�rPrRrT)rVrWrFrXzkey-value-listrZr#c���USSSnURS5up#USRS5(a	USSS	nOUSSnS
U<SU<SUS<3$![a SnNIf=f)z>Return the path in the pool where the files would be installedr[rrF�/�main�source�libN�zpool/)r-rsrM)rErarF�_�subdirs     r)�
get_pool_path�Changes.get_pool_path�s���
��M�!��Y�'��	������J�G�
��>�$�$�U�+�+��(�^�B�Q�'�F��(�^�A�&�F��")�6�4��>�B�B���	��G�	�s�A�A*�)A*r3N)	r5r6r7r8r9r(rgrir:r3r0r)r`r`ys/���C�2�6�6�\���C�s�Cr0r`c��\rSrSrSr/SQ/SQ/SQ/SQS.rS/rS	rS
rSr	Sr
S
rSrSr
SrS\4SjrS\4SjrS\4Sjr"SS5r\S5rSrg)�	BuildInfoi�a�Representation of a .buildinfo (build environment description) file

This class is a thin wrapper around the transparent GPG handling
of :class:`_gpg_multivalued`, the field parsing of
:class:`_PkgRelationMixin`,
and the format parsing of :class:`Deb822`.

Note that the 'relations' structure returned by the `relations` method
is identical to that produced by other classes in this module.
Consequently, existing code to consume this structure can be used here,
although it means that there are redundant lists and tuples within the
structure.

Example::

    >>> from debian.deb822 import BuildInfo
    >>> filename = 'package.buildinfo'
    >>> with open(filename) as fh:    # doctest: +SKIP
    ...     info = BuildInfo(fh)
    >>> print(info.get_environment())    # doctest: +SKIP
    {'DEB_BUILD_OPTIONS': 'parallel=4',
    'LANG': 'en_AU.UTF-8',
    'LC_ALL': 'C.UTF-8',
    'LC_TIME': 'en_GB.UTF-8',
    'LD_LIBRARY_PATH': '/usr/lib/libeatmydata',
    'SOURCE_DATE_EPOCH': '1601784586'}
    >>> installed = info.relations['installed-build-depends']  # doctest: +SKIP
    >>> for dep in installed:  # doctest: +SKIP
    ...     print("Installed %s/%s" % (dep[0]['name'], dep[0]['version'][1]))
    Installed autoconf/2.69-11.1
    Installed automake/1:1.16.2-4
    Installed autopoint/0.19.8.1-10
    Installed autotools-dev/20180224.1
    ... etc ...
    >>> changelog = info.get_changelog() # doctest: +SKIP
    >>> print(changelog.author) # doctest: +SKIP
    'xyz Build Daemon (xyz-01) <[email protected]>'
    >>> print(changelog[0].changes()) # doctest: +SKIP
    ['',
    '  * Binary-only non-maintainer upload for amd64; no source changes.',
    '  * Add Python 3.9 as supported version',
    '']
)�md5rOr�rPrRrT)z
checksums-md5r\r]r^zinstalled-build-dependsc�l�[R"U/UQ70UD6 [R"U/UQ70UD6 gr-)r<rDr�rEr{r|s   r)rD�BuildInfo.__init__�s2���!�!�$�8��8��8��"�"�4�9�$�9�&�9r0c��X;a[SRU55e[XRSS5R	5R55$)Nz'{}' not found in buildinforYr�)r\�formatrr�replacerMr-r�s  r)�_get_array_value�BuildInfo._get_array_value�sK�����8�?�?��F�G�G��D�K�'�'��b�1�7�7�9�?�?�A�B�Br0c�^�[[RURSS555$)z�Return the build environment that was recorded

The environment is returned as a dict in the style of `os.environ`.
The backslash quoting of values described in deb-buildinfo(5) is
removed.
�Environmentr�)r�rl�_env_deserialiserLrs r)�get_environment�BuildInfo.get_environment�s%���I�.�.�t�x�x�
�r�/J�K�L�Lr0c��SU;agUSR5nUVs/sHo"S:XaSOUSSPM nn[RRU5$s snf)z�Return the changelog entry from the buildinfo (for binNMUs)

If no "Binary-Only-Changes" field is present in the buildinfo file
then `None` is returned.
zBinary-Only-ChangesNz .r�rX)r�r�	changelog�	Changelog)rE�chlinesras   r)�
get_changelog�BuildInfo.get_changelog�se��!��,���,�-�8�8�:��7>�?�w�!�d��2��!�"��-�w��?����)�)�'�2�2��@s�Ac���SU;a[S5eURRUS5nU(d[S5eUR	S5UR	S54$)Nrdz%'Source' field not found in buildinfoz Invalid 'Source' field specifiedr�)r\rpr�rsr��rE�matchess  r)�
get_source�BuildInfo.get_source�s\���4���B�C�C��*�*�0�0��h��@����?�@�@��}�}�X�&��
�
�i�(@�@�@r0c�$�URS5$)N�Binary�rtrs r)�
get_binary�BuildInfo.get_binarys���$�$�X�.�.r0c��SU;a[S5e[RRUS5nUc[	S5e[RRU5n[RRU5$)Nz
build-datez)'Build-Date' field not found in buildinfoz$Invalid 'Build-Date' field specified)r\�email�utils�parsedate_tzrs�	mktime_tz�datetime�
fromtimestamp�rE�	timearray�tss   r)�get_build_date�BuildInfo.get_build_datesl���t�#��F�G�G��K�K�,�,�T�,�-?�@�	����C�D�D�
�[�[�
"�
"�9�
-��� � �.�.�r�2�2r0c�$�URS5$)N�Architecturer�rs r)�get_architecture�BuildInfo.get_architectures���$�$�^�4�4r0r#c�x�UR5Vs/sH
nUS:XdMUPM nn[U5S:H$s snf)NrdrX�r�rS�rEr��archess   r)�is_build_source�BuildInfo.is_build_sourcesD��#'�#8�#8�#:�'�#:�4��X�%��#:��'��6�{�a����'��
7�7c�(�SUR5;$)N�all)r�rs r)�is_build_arch_all�BuildInfo.is_build_arch_alls����-�-�/�/�/r0c�x�UR5Vs/sH
nUS;dMUPM nn[U5S:H$s snf)N)r�rdrXr�r�s   r)�is_build_arch_any�BuildInfo.is_build_arch_any!sE��#'�#8�#8�#:�4�#:�4��!2�2��#:��4��6�{�a����4r�c�(�\rSrSrSrSrSrSrSrSr	g)	�BuildInfo._EnvParserStatei&rrX��rfr3N)
r5r6r7r8�IGNORE_WHITESPACE�VAR_NAME�START_VALUE_QUOTE�VALUE�VALUE_BACKSLASH_ESCAPEr:r3r0r)�_EnvParserStater�&s����������!"�r0r�c#�L# �[RRnSnSnUGH�nU[RR:Xa3UR5(d[RRnUnMUU[RR:Xa)US:waX$-
nO[RR
nSnM�U[RR
:Xa.US:XaRnO[S5eM�U[RR:XavUS:XaRnORUS:XaCUS:Xa[S5eUc[S5eX#4v� [RRnSnSnO	UceX4-
nGM|U[RR:XdGM�US:Xa$UceX4-
n[RRnO[S	5eGM� U[RR:wa[S
5eg7f)a|extract the environment variables and values from the text

Format is:
    VAR_NAME="value"

with ignorable whitespace around the construct (and separating each
item). Quote characters within the value are backslash escaped.

When producing the buildinfo file, dpkg only includes specifically
allowed environment variables and thus there is no defined quoting
rules for the variable names.

The format is described by deb-buildinfo(5) and implemented in
dpkg source scripts/dpkg-genbuildinfo.pl:cleansed_environment(),
while the environment variables that are included in the output are
listed in dpkg source scripts/Dpkg/Build/Info.pm
r�N�=�"z6Improper quoting in Environment: begin quote not found�\z;Improper formatting in Environment: variable name not foundz<Improper formatting in Environment: variable value not foundzIImproper formatting in Environment: couldn't interpret backslash sequencez4Improper quoting in Environment: end quote not found)	rlr�r�r�r�r�r�rsr�)�
serialisedrSr�r��chs     r)rx�BuildInfo._env_deserialise.s	���,�)�)�;�;�������B��	�1�1�C�C�C��z�z�|�|�%�5�5�>�>�E��D���	�1�1�:�:�:���9��J�D�%�5�5�G�G�E��E���	�1�1�C�C�C���9�%�5�5�;�;�E�$�0�����	�1�1�7�7�7���:�%�5�5�L�L�E��3�Y��r�z�(�6����}�(�7���
�+�%�%�5�5�G�G�E��D� �E� �,�,�,��K�E���	�1�1�H�H�H���9� �,�,�,��K�E�%�5�5�;�;�E�$�@����y�|�I�-�-�?�?�?��&��
�@�s
�F9H$�A$H$r3N)r5r6r7r8r9r(rrDrtryrr�r�r�r�r�r�r�r�r�rlrxr:r3r0r)rlrl�s���*�X1�2�6�6�	��	"���:�
C�M�3� A�/�3�5� �� �
0�4�0� �4� �
#�#��[��[r0rlc��\rSrSrSrSS//SQ/SQ/SQ/SQ/SQ/SQSS//SQ/SQ/S	Q/SQ/SQ/S	QS
.r\S5rSrS
r	g)�
PdiffIndexi�z�Representation of a foo.diff/Index file from a Debian mirror

This class is a thin wrapper around the transparent GPG handling
of :class:`_gpg_multivalued` and the parsing of :class:`Deb822`.
�SHA1rO)r�rO�date)r�rO�filename�SHA256)r�rOr�)r�rOr�)zsha1-currentzsha1-historyzsha1-patchesz
sha1-downloadzx-unmerged-sha1-historyzx-unmerged-sha1-patcheszx-unmerged-sha1-downloadzsha256-currentzsha256-historyzsha256-patcheszsha256-downloadzx-unmerged-sha256-historyzx-unmerged-sha256-patcheszx-unmerged-sha256-downloadc��0nURH/n[XS5(aMURU5nSU0X'M1 U$)NrLrO)r(rq�_get_size_field_length�rE�fixed_field_lengthsrOr9s    r)r2�PdiffIndex._fixed_field_lengths�sT��!���+�+�C��t�y�&�)�)���0�0��5�F�(.��'7��$�
,�#�"r0c	�t�XVs/sHn[[US55PM nn[U5$s snf�NrO)rSrg�max�rErOr4�lengthss    r)r��!PdiffIndex._get_size_field_length�s6��6:�i�@�i�d�3�s�4��<�(�)�i��@��7�|���As�!5r3N)
r5r6r7r8r9r(r#r2r�r:r3r0r)r�r��s^��� ��(�0�0�5�#;�#;�$@�#�V�,�4�4�9�%?�%?�&D���"�
#��
#�r0r�c�j�\rSrSrSr/SQ/SQ/SQ/SQS.rSrS	r\"S
\5r	\S5r
SrS
rg)�Releasei�a%Represents 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.

This class is a thin wrapper around the parsing of :class:`Deb822`.
rMrPrRrT)rNrQrSrU�apt-ftparchivec�2�US;a[S5eXlg)N)r��dakz<size_field_behavior must be either 'apt-ftparchive' or 'dak')rs�_Release__size_field_behavior�rEr�s  r)�set_size_field_behavior�Release.set_size_field_behavior�s%���1�1��9�:�
:�&+�"r0c��UR$r-)r�rs r)r��Release.<lambda>�s
���0J�0Jr0c�^�0nURHnURU5nSU0X'M U$r�)r(r�r�s    r)r2�Release._fixed_field_lengths�s@��!���+�+�C��0�0��5�F�(.��'7��$�,�#�"r0c	���URS:XagURS:Xa4XVs/sHn[[US55PM nn[U5$[	S5es snf)Nr��r�rOz%Illegal value for size_field_behavior)�size_field_behaviorrSrgr�rsr�s    r)r��Release._get_size_field_length�sb���#�#�'7�7���#�#�u�,�:>�)�D�)�$�s�3�t�F�|�,�-�)�G�D��w�<���@�A�A��Es�!A!)�__size_field_behaviorN)
r5r6r7r8r9r(r�r�r#r�r2r�r:r3r0r)r�r��sW���-�(�,�,�	��-��+�#�#J�#:�<���#��#�Br0r�c�R^�\rSrSrSr/SQrSr\SU4Sjj5rSr	U=r
$)�Sourcesi�z�Represent an APT source package list

This class is a thin wrapper around the parsing of :class:`Deb822`,
using the field parsing of :class:`_PkgRelationMixin`.
)z
build-dependszbuild-depends-indepzbuild-depends-archzbuild-conflictszbuild-conflicts-indepzbuild-conflicts-arch�binaryc�l�[R"U/UQ70UD6 [R"U/UQ70UD6 gr-)rLrDrros   r)rD�Sources.__init__�s0�����T�+�D�+�F�+��"�"�4�9�$�9�&�9r0c�D>�U(dSS0n[[U]XX4XV5$)z�Generator that yields a Deb822 object for each paragraph in Sources.

Note that this overloaded form of the generator uses apt_pkg (a strict
but fast parser) by default.

See the :func:`~Deb822.iter_paragraphs` function for details.
rHF)rCr�r��r�r�r�r�r�rpr�rGs       �r)r��Sources.iter_paragraphs�s3���"�1�5��F��W�c�2��k�8�M�	Mr0r3�NTFr�N)r5r6r7r8r9rrDrkr�r:rhris@r)r�r��s<����
��:�
� $�$(�',�!(�#�
M��Mr0r�c�r^�\rSrSrSr/SQrSr\S	U4Sjj5r\	S5r
\	S5rSrU=r
$)
�Packagesi	z�Represent an APT binary package list

This class is a thin wrapper around the parsing of :class:`Deb822`,
using the field parsing of :class:`_PkgRelationMixin`.
)
�dependszpre-depends�
recommends�suggests�breaks�	conflicts�provides�replaces�enhanceszbuilt-usingc�l�[R"U/UQ70UD6 [R"U/UQ70UD6 gr-)r�rDrros   r)rD�Packages.__init__ 	s0������.�t�.�v�.��"�"�4�9�$�9�&�9r0c�D>�U(dSS0n[[U]XX4XV5$)z�Generator that yields a Deb822 object for each paragraph in Packages.

Note that this overloaded form of the generator uses apt_pkg (a strict
but fast parser) by default.

See the :func:`~Deb822.iter_paragraphs` function for details.
rHF)rCr�r�r�s       �r)r��Packages.iter_paragraphs%	s3���"�1�5��F��X�s�3��k�8�M�	Mr0c��SU;aUS$URRUS5nU(aURS5$g)��source package that generates the binary package

If the source package and source package version are the same as the
binary package, an explicit "Source" field will not be within the
paragraph.
rdrVN)rpr�r�r�s  r)rd�Packages.source=	sE���4���	�?�"��*�*�0�0��h��@����=�=��*�*�r0c��SU;aUR5$URRUS5nU(a(URS5(aURS5nOUSn[R
R
U5$)r�rdr�r
)r
rpr�r�rrr
)rEr�r�s   r)�source_version�Packages.source_versionN	st���4���#�#�%�%��*�*�0�0��h��@���w�}�}�Y�/�/��m�m�I�.�G��9�o�G��$�$�,�,�W�5�5r0r3r�)r5r6r7r8r9rrDrkr�r#rdr�r:rhris@r)r�r�	sd����
��:�
� $�$(�',�!(�#�
M��M�.���� �6��6r0r�c��\rSrSrSrSrg)�
DebControlib	z�Represent an Debian binary package control file

This class is a thin wrapper around the parsing of :class:`Deb822`,
using the field parsing of :class:`_PkgRelationMixin`.
r3Nr4r3r0r)r�r�b	s��r0r�c�6^�\rSrSrSrSU4SjjrSrU=r$)�RestrictedFieldij	z�Placeholder for a property providing access to a restricted field.

Use this as an attribute when defining a subclass of RestrictedWrapper.
It will be replaced with a property.  See the RestrictedWrapper
documentation for an example.
c�*>�[[U]XX#US9$)a�Create a new RestrictedField placeholder.

The getter that will replace this returns (or applies the given to_str
function to) None for fields that do not exist in the underlying data
object.

:param name: The name of the deb822 field.
:param from_str: The function to apply for getters (default is to
    return the string directly).
:param to_str: The function to apply for setters (default is to use the
    value directly).  If allow_none is True, this function may return
    None, in which case the underlying key is deleted.
:param allow_none: Whether it is allowed to set the value to None
    (which results in the underlying key being deleted).
)�from_str�to_str�
allow_none)rCr��__new__)r�r�r�rrrGs     �r)r�RestrictedField.__new__s	s&���,�_�c�2���!�3�#�	#r0r3)NNT)r5r6r7r8r9rr:rhris@r)r�r�j	s�������	#�#r0r�zname from_str to_str allow_nonec��^�\rSrSrSr\R"S5r\R"S5rU4Sjr	\
S5r\
S5r\
S5r
\
S	5r\
S
5r\
S5rSrU=r$)
�Removalsi�	a"Represent an ftp-master removals.822 file

Removal of packages from the archive are recorded by ftp-masters.
See https://ftp-master.debian.org/#removed

Note: this API is experimental and backwards-incompatible changes might be
required in the future. Please use it and help us improve it!
z*\s*(?P<package>.+?)_(?P<version>[^\s]+)\s*z;\s*(?P<package>.+?)_(?P<version>[^\s]+)\s+\[(?P<archs>.+)\]c�J>�[[U]
"U0UD6 SUlSUlgr-)rCrrD�_sources�	_binariesrzs   �r)rD�Removals.__init__�	s%���
�h��&��7��7���
���r0c���[RRUS5nUc[S5e[RR	U5n[
R
R
U5$)z)a datetime object for the removal action r�zNo date specified)r�r�r�rsr�r�r�r�s   r)r��
Removals.date�	sY���K�K�,�,�T�&�\�:�	����0�1�1�
�[�[�
"�
"�9�
-��� � �.�.�r�2�2r0c�x�SU;a/$USRS5Vs/sHn[U5PM sn$s snf)z�list of bug numbers that had requested the package removal

The bug numbers are returned as integers.

Note: there is normally only one entry in this list but there may be
more than one.
�bug�,�r-rf�rE�bs  r)r
�Removals.bug�	s>������I� $�U�� 1� 1�#� 6�7� 6�1��A�� 6�7�7��7��7c�x�SU;a/$USRS5Vs/sHn[U5PM sn$s snf)zZlist of WNPP bug numbers closed by the removal

The bug numbers are returned as integers.
z	also-wnppr,rrs  r)�	also_wnpp�Removals.also_wnpp�	s?���d�"��I� $�[� 1� 7� 7�� <�=� <�1��A�� <�=�=��=rc�x�SU;a/$USRS5Vs/sHn[U5PM sn$s snf)z�list of bug numbers in the package closed by the removal

The bug numbers are returned as integers.

Removal of a package implicitly also closes all bugs associated with
the package.
z	also-bugsr,rrs  r)�	also_bugs�Removals.also_bugs�	s?���d�"��I� $�[� 1� 7� 7�� <�=� <�1��A�� <�=�=��=rc�4�URbUR$/nSU;apUSR5HYnURRU5nU(dM'UR	URS5URS5S.5 M[ XlU$)a<list of source packages that were removed

A list of dicts is returned, each dict has the form::

    {
        'source': 'some-package-name',
        'version': '1.2.3-1'
    }

Note: There may be no source packages removed at all if the removal is
only of a binary package. An empty list is returned in that case.
�sourcesrVr�)rdr�)rr��_Removals__sources_line_rer�rOr�)rErar�r�s    r)r�Removals.sources�	s����=�=�$��=�=� �������Y��2�2�4���0�0�6�6�t�<���7��H�H�&-�m�m�I�&>�'.�}�}�Y�'?���5��
��r0c
��URbUR$/nSU;a�USR5H�nURRU5nU(dM'UR	URS5URS5[
URS5RS55S.5 M� XlU$)z�list of binary packages that were removed

A list of dicts is returned, each dict has the form::

    {
        'package': 'some-package-name',
        'version': '1.2.3-1',
        'architectures': set(['i386', 'amd64'])
    }
�binariesrVr�r�r�)rVr��
architectures)rr��_Removals__binaries_line_rer�rOr��setr-)rErr�r�s    r)r�Removals.binaries�	s����>�>�%��>�>�!�������Z�(�3�3�5���1�1�7�7��=���7��H�H�#*�=�=��#;�#*�=�=��#;���
�
�g� 6� <� <�T� B�C�	��6����r0)rr)r5r6r7r8r9rnrorr!rDr#r�r
rrrrr:rhris@r)rr�	s������
�
�	������	�����3��3��8��8��>��>��>��>�����<���r0rc�*�\rSrSrSSjrSrSrSrg)rAi
Nc�$�U=(d SUlg)NzUTF-8r�)rErps  r)rD�_AutoDecoder.__init__
s�� �+�G��
r0c�R�[U[5(aURU5$U$)z9If value is not already Unicode, decode it intelligently.)r�r�r�r�s  r)r[�_AutoDecoder.decode!
s'���e�U�#�#��$�$�U�+�+��r0c	�h�URUR5$![Ga	n[(d-[(d"[
R
SUR5 Ue[
RSUR5 Sn[(aQ[R"USVs/sHnSU3PM
 Os snfsnS9R5nU(aURnO[R"U5nUSnUceURU5nX0lUsSnA$![a Uef=fSnAff=f)Nzidecoding from %s failed; please install charset_normalizer or chardet for automated detection of encodingz?decoding from %s failed; attempting to detect the true encoding)rXr����	z	iso-8859-)�cp_isolationrp)
r[rp�UnicodeDecodeError�_have_charset_normalizer�
_have_chardetr��errorr��charset_normalizer�
from_bytes�best�chardet�detect)rEr��erpr��result�	result_cd�decodeds        r)r��_AutoDecoder.decode_bytes(
s��(	��<�<��
�
�.�.��!�&	�+�+�M�M����B��M�M��
��
�N�N�/�04�
�
�
?�'+�H�'�'�,�6�6��;J�!K�?�a�I�a�S�/�?��!K���$�&���%���H��#�N�N�5�1�	�$�Z�0�����
��,�,�x�0��!)�
����%�
���
��K&	�s:��D1�A:D,�"B2�1AD,�>D�D1�
D)�)D,�,D1r�r-)r5r6r7r8rDr[r�r:r3r0r)rArA
s��,��*r0rA)ir9�builtins�collections.abcr�r��email.utilsr��	functools�loggingr'�pathlibrrnr��typingrrrrrr	r
rrr
rrrrrrrrrr��typing_extensionsrrr�ImportError�debian._utilrrrr�debian.debian_supportr�debian.changelogr��IterableInputDataTyper��Deb822ValueTypergr��Deb822MutableMappingrr�r�r�r&r2r/r0r5r�r*�	lru_cacher/�	frozensetr�r��	getLoggerr��	Exceptionr2r<�_TagSectionWrapper_base�abcr>�_Deb822Dict_baserr��_BaseGpgInfor�r]r��_lowercase_dict_baser�rrrr%r<rLr`rlr�r�r�r�r�r�r�rrAr3r0r)�<module>rTs���Q�P������	��	��������*�	�����
����t�H��u�I��T�N��U�O�����	�����
�����_�,�-�
�%�c�?�&:�;���~�\�:�����O�O��M�

��#���M�	�3�	�4�	����S�����
"�#K�"L�M��!��
�	�	�?�	+��;�I�;�I�5�I��+��)�o�o�5�5��*/�/�*/�Z�+��"���5�5��h�!�h�ZA
1�Z�A
1�H���T�#�Y��'�L��L�VC�l�VC�rhJ�hJ�V���S��>����3�*�3���8��'�'�B �B �JN/�6�N/�bKN�|�KN�\�
�1��#C�� 5�#C�Lk� �"3�5J�k�\'��'�T0B�l�0B�f'M�c�$�'M�TK6�v�(�*?�K6�\���!#�k�,�,��<�>�!#�FK�v�K�\7�7��SH�	��	��L	�^�$���M�����$�����
�����
����sN�
J�/J�J/�J�J�
J,�+J,�/K�8K�K�	K�
K�K

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 1.02 KB 0644
_arch_table.cpython-313.pyc File 15.82 KB 0644
_util.cpython-313.pyc File 16.72 KB 0644
_version.cpython-313.pyc File 634 B 0644
arfile.cpython-313.pyc File 14.71 KB 0644
changelog.cpython-313.pyc File 38.9 KB 0644
copyright.cpython-313.pyc File 35.68 KB 0644
deb822.cpython-313.pyc File 93.51 KB 0644
debfile.cpython-313.pyc File 23.15 KB 0644
debian_support.cpython-313.pyc File 29.56 KB 0644
debtags.cpython-313.pyc File 18.78 KB 0644
substvars.cpython-313.pyc File 16.85 KB 0644
watch.cpython-313.pyc File 9.93 KB 0644
Filemanager