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੐)|#o0aڱ$I>}k&1`U#V?YsV x>{t1[I~D&(I$I/{H0fw"q"y%4 IXyE~M3 8XψL}qE$I[> nD?~sf ]o΁ cT6"?'_Ἣ $I>~.f|'!N?⟩0G KkXZE]ޡ;/&?k OۘH$IRۀwXӨ<7@PnS04aӶp.:@\IWQJ6sS%I$e5ڑv`3:x';wq_vpgHyXZ 3gЂ7{{EuԹn±}$I$8t;b|591nءQ"P6O5i }iR̈́%Q̄p!I䮢]O{H$IRϻ9s֧ a=`- aB\X0"+5"C1Hb?߮3x3&gşggl_hZ^,`5?ߎvĸ%̀M!OZC2#0x LJ0 Gw$I$I}<{Eb+y;iI,`ܚF:5ܛA8-O-|8K7s|#Z8a&><a&/VtbtLʌI$I$I$I$I$I$IRjDD%tEXtdate:create2022-05-31T04:40:26+00:00!Î%tEXtdate:modify2022-05-31T04:40:26+00:00|{2IENDB`Mini Shell

HOME


Mini Shell 1.0
DIR:/usr/lib/python3/dist-packages/apt/__pycache__/
Upload File :
Current File : //usr/lib/python3/dist-packages/apt/__pycache__/package.cpython-311.pyc
�

�xkd)���:�dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
ddlmZddlmZmZmZmZmZmZmZmZmZmZmZddlZddlZddlm Z m!Z!dd	lm"Z#d
Z$d�Z%Gd�d
e&��Z'Gd�de'��Z(Gd�de)��Z*Gd�dee*��Z+Gd�de)��Z,Gd�deeef��Z-Gd�de)��Z.Gd�dee.��Z/Gd�de)��Z0ed���Z1e2dkre1��dSdS) z"Functionality related to packages.�)�print_functionN)�
BadStatusLine)�	HTTPError)�urlopen)�Any�Iterable�Iterator�List�Optional�Set�Tuple�Union�
no_type_check�Mapping�Sequence)�AcquireProgress�InstallProgress)�gettext)�BaseDependency�
Dependency�Origin�Package�Record�Version�VersionListc��tj�|��rgtj�|��|krDt	|��5}tj|��j|kcddd��S#1swxYwYdS)z(Return ``True`` if the file is the same.NF)�os�path�exists�getsize�open�apt_pkg�Hashes�hashes)r�sizer$�fobjs    �-/usr/lib/python3/dist-packages/apt/package.py�
_file_is_samer(Gs���
�w�~�~�d���9������ 5� 5�� =� =�
�$�Z�Z�	9�4��>�$�'�'�.�&�8�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9����	9�	9�	9�	9��5s�A<�<B�Bc��eZdZdZdS)�
FetchErrorz(Raised when a file could not be fetched.N��__name__�
__module__�__qualname__�__doc__��r'r*r*Ps������2�2�2�2r1r*c��eZdZdZdS)�UntrustedErrorz/Raised when a file did not have a trusted hash.Nr+r0r1r'r3r3Ts������9�9�9�9r1r3c��eZdZdZGd�de��Zd�Zd�Zd�Ze	d���Z
e	d���Ze	d	���Ze	d
���Z
e	d���Ze	d���Ze	d
���Ze	d���Ze	d���ZdS)rzA single dependency.c��eZdZdZd�Zd�ZdS)�BaseDependency.__dstraQCompare helper for compatibility with old third-party code.

        Old third-party code might still compare the relation with the
        previously used relations (<<,<=,==,!=,>=,>>,) instead of the curently
        used ones (<,<=,=,!=,>=,>,). This compare helper lets < match to <<,
        > match to >> and = match to ==.
        c��t�||��rdSt�|d��rt�d|��St�|d��rt�d|��St�|d��rt�d|��SdS)	NT�<z<<�>z>>�=z==F)�str�__eq__��self�others  r'r<zBaseDependency.__dstr.__eq__ds����z�z�$��&�&�	
��t����D�#�&�&�
��z�z�$��.�.�.����D�#�&�&�
��z�z�$��.�.�.����D�#�&�&�
��z�z�$��.�.�.��ur1c�.�|�|��S�N)r<r=s  r'�__ne__zBaseDependency.__dstr.__ne__qs���{�{�5�)�)�)�)r1N)r,r-r.r/r<rBr0r1r'�__dstrr6[s<������	�	�	�	�	�	*�	*�	*�	*�	*r1rCc�"�||_||_dSrA)�_version�_dep)r>�version�deps   r'�__init__zBaseDependency.__init__us����
���	�	�	r1c�$�|j�d|j��S�Nz: ��rawtype�rawstr�r>s r'�__str__zBaseDependency.__str__z����<�<�<����5�5r1c	�H�d|j�d|j�d|j�d|j�d�	S)Nz<BaseDependency: name:z
 relation:�	 version:z	 rawtype:r9)�name�relationrGrMrOs r'�__repr__zBaseDependency.__repr__~s4���
�I�I�I��M�M�M��L�L�L��L�L�L�	
�	
r1c�$�|jjjS)zThe name of the target package.)rF�
target_pkgrTrOs r'rTzBaseDependency.name�s���y�#�(�(r1c�@�|�|jj��S)z�The relation (<, <=, =, !=, >=, >, '') in mathematical notation.

        The empty string will be returned in case of an unversioned dependency.
        )�_BaseDependency__dstrrF�	comp_typerOs r'rUzBaseDependency.relation�s���{�{�4�9�.�/�/�/r1c��|jjS)avThe relation (<<, <=, =, !=, >=, >>, '') in Debian notation.

        The empty string will be returned in case of an unversioned dependency.
        For more details see the Debian Policy Manual on the syntax of
        relationship fields:
        https://www.debian.org/doc/debian-policy/ch-relationships.html#s-depsyntax  # noqa

        .. versionadded:: 1.0.0
        )rF�
comp_type_debrOs r'�relation_debzBaseDependency.relation_deb�s���y�&�&r1c��|jjS)z�The target version or an empty string.

        Note that the version is only an empty string in case of an unversioned
        dependency. In this case the relation is also an empty string.
        )rF�
target_verrOs r'rGzBaseDependency.version�s���y�#�#r1c���g}|j���}|D]T}|j}|jjj}|�|��}t||��}|�|���U|S)zfA list of all Version objects which satisfy this dependency.

        .. versionadded:: 1.0.0
        )	rF�all_targets�
parent_pkgrE�package�_pcache�_rawpkg_to_pkgr�append)r>�tvers�_tvers�_tver�_pkg�cache�pkg�tvers        r'�target_versionszBaseDependency.target_versions�s|������&�&�(�(���	�	�E��#�D��M�)�1�E��&�&�t�,�,�C��3��&�&�D��L�L�������r1c�$�d�|jD��S)�iA list of all installed Version objects which satisfy this dep.

        .. versionadded:: 1.0.0
        c� �g|]}|j�	|��Sr0��is_installed��.0rns  r'�
<listcomp>z<BaseDependency.installed_target_versions.<locals>.<listcomp>�� ��K�K�K���9J�K��K�K�Kr1�rorOs r'�installed_target_versionsz(BaseDependency.installed_target_versions����L�K��!5�K�K�K�Kr1c�P�|jr|j�d|j�d|j��S|jS)a�String represenation of the dependency.

        Returns the string representation of the dependency as it would be
        written in the debian/control file.  The string representation does not
        include the type of the dependency.

        Example for an unversioned dependency:
          python3

        Example for a versioned dependency:
          python3 >= 3.2

        .. versionadded:: 1.0.0
        � )rGrTr^rOs r'rNzBaseDependency.rawstr�s6��"�<�	�!%����D�,=�,=�,=�t�|�|�L�L��9�r1c��|jjS)z�Type of the dependency.

        This should be one of 'Breaks', 'Conflicts', 'Depends', 'Enhances',
        'PreDepends', 'Recommends', 'Replaces', 'Suggests'.

        Additional types might be added in the future.
        �rF�dep_type_untranslatedrOs r'rMzBaseDependency.rawtype�s���y�.�.r1c�"�|jjdkS)zWhether this is a PreDepends.�
PreDependsrrOs r'�
pre_dependzBaseDependency.pre_depend�s���y�.�,�>�>r1N)r,r-r.r/r;rZrIrPrV�propertyrTrUr^rGrorzrNrMr�r0r1r'rrXsg��������*�*�*�*�*��*�*�*�4���
6�6�6�
�
�
��)�)��X�)�
�0�0��X�0��'�'��X�'��$�$��X�$�����X�� �L�L��X�L�����X��*�	/�	/��X�	/��?�?��X�?�?�?r1rc���eZdZdZ�fd�Zd�Zd�Zed���Zed���Z	ed���Z
ed���Zed	���Z�xZ
S)
raMRepresent an Or-group of dependencies.

    Attributes defined here:
        or_dependencies - The possible choices
        rawstr - String represenation of the Or-group of dependencies
        rawtype - The type of the dependencies in the Or-group
        target_version - A list of Versions which satisfy this Or-group of deps
    c�t��tt|���|��||_||_dSrA)�superrrIrE�_rawtype)r>rG�	base_depsrM�	__class__s    �r'rIzDependency.__init__�s3���
�j�$���(�(��3�3�3���
���
�
�
r1c�$�|j�d|j��SrKrLrOs r'rPzDependency.__str__rQr1c�F�dd�d�|D����zS)Nz<Dependency: [%s]>�, c3�4K�|]}t|��V��dSrA)�repr�rv�bds  r'�	<genexpr>z&Dependency.__repr__.<locals>.<genexpr>s(����0I�0I�b��b���0I�0I�0I�0I�0I�0Ir1��joinrOs r'rVzDependency.__repr__s(��#�t�y�y�0I�0I�D�0I�0I�0I�'I�'I�J�Jr1c��|SrAr0rOs r'�or_dependencieszDependency.or_dependencies	s	���r1c�@�d�d�|D����S)axString represenation of the Or-group of dependencies.

        Returns the string representation of the Or-group of dependencies as it
        would be written in the debian/control file.  The string representation
        does not include the type of the Or-group of dependencies.

        Example:
          python2 >= 2.7 | python3

        .. versionadded:: 1.0.0
        z | c3�$K�|]}|jV��dSrA)rNr�s  r'r�z$Dependency.rawstr.<locals>.<genexpr>s$����3�3��"�)�3�3�3�3�3�3r1r�rOs r'rNzDependency.rawstrs%���z�z�3�3�d�3�3�3�3�3�3r1c��|jS)aType of the Or-group of dependency.

        This should be one of 'Breaks', 'Conflicts', 'Depends', 'Enhances',
        'PreDepends', 'Recommends', 'Replaces', 'Suggests'.

        Additional types might be added in the future.

        .. versionadded:: 1.0.0
        )r�rOs r'rMzDependency.rawtypes���}�r1c�Z�g}|D]%}|jD]}||vr|�|����&|S)zlA list of all Version objects which satisfy this Or-group of deps.

        .. versionadded:: 1.0.0
        )rorg)r>rhr�rns    r'rozDependency.target_versions,sT�����	'�	'�B��*�
'�
'���u�$�$��L�L��&�&�&��
'��r1c�$�d�|jD��S)rqc� �g|]}|j�	|��Sr0rsrus  r'rwz8Dependency.installed_target_versions.<locals>.<listcomp>Arxr1ryrOs r'rzz$Dependency.installed_target_versions:r{r1)r,r-r.r/rIrPrVr�r�rNrMrorz�
__classcell__)r�s@r'rr�s���������� � � � � �6�6�6�K�K�K�����X���
4�
4��X�
4�����X������X���L�L��X�L�L�L�L�Lr1rc��eZdZdZd�Zd�ZdS)ra�The origin of a version.

    Attributes defined here:
        archive   - The archive (eg. unstable)
        component - The component (eg. main)
        label     - The Label, as set in the Release file
        origin    - The Origin, as set in the Release file
        codename  - The Codename, as set in the Release file
        site      - The hostname of the site.
        trusted   - Boolean value whether this is trustworthy.
    c��|j|_|j|_|j|_|j|_|j|_|j|_|j|_|jj�	|��}|r|j
r	d|_dSd|_dS�NTF)�archive�	component�label�origin�codename�site�
not_automaticre�_list�
find_index�
is_trusted�trusted)r>rm�packagefile�	indexfiles    r'rIzOrigin.__init__Qs���"�*���$�.��� �&��
�!�(���#�,��
��$��	�(�6����K�%�0�0��=�=�	��	!��-�	!��D�L�L�L� �D�L�L�Lr1c
�h�d|j�d|j�d|j�d|j�d|j�d|j�d�
S)Nz<Origin component:z	 archive:z origin:z label:z site:z isTrusted:r9)r�r�r�r�r�r�rOs r'rVzOrigin.__repr__asF���
�N�N�N��L�L�L��K�K�K��J�J�J��I�I�I��L�L�L�

�
	
r1N)r,r-r.r/rIrVr0r1r'rrDs<������
�
�!�!�!� 
�
�
�
�
r1rc�P�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d
d
�Zd�Zd�Z
d	S)ra"Record in a Packages file

    Represent a record as stored in a Packages file. You can use this like
    a dictionary mapping the field names of the record to their values::

        >>> record = Record("Package: python-apt\nVersion: 0.8.0\n\n")
        >>> record["Package"]
        'python-apt'
        >>> record["Version"]
        '0.8.0'

    For example, to get the tasks of a package from a cache, you could do::

        package.candidate.record["Tasks"].split()

    Of course, you can also use the :attr:`Version.tasks` property.

    c�8�tj|��|_dSrA)r"�
TagSection�_rec)r>�
record_strs  r'rIzRecord.__init__�s���&�z�2�2��	�	�	r1c�*�t|j��SrA)�hashr�rOs r'�__hash__zRecord.__hash__�s���D�I���r1c�*�t|j��SrA)r;r�rOs r'rPzRecord.__str__�����4�9�~�~�r1c��|j|SrA�r��r>�keys  r'�__getitem__zRecord.__getitem__�s���y��~�r1c��||jvSrAr�r�s  r'�__contains__zRecord.__contains__�s���d�i��r1c�N�t|j�����SrA)�iterr��keysrOs r'�__iter__zRecord.__iter__�s���D�I�N�N�$�$�%�%�%r1c#�dK�|j���D]}||j|fV��dS)z6An iterator over the (key, value) items of the record.N)r�r�r�s  r'�	iteritemszRecord.iteritems�sG�����9�>�>�#�#�	&�	&�C��t�y��~�%�%�%�%�%�	&�	&r1Nc�8�|j�||��S)zReturn record[key] if key in record, else *default*.

        The parameter *default* must be either a string or None.
        )r��get�r>r��defaults   r'r�z
Record.get�s���y�}�}�S�'�*�*�*r1c��||jvS)z deprecated form of ``key in x``.r�r�s  r'�has_keyzRecord.has_key�s���d�i��r1c�*�t|j��SrA)�lenr�rOs r'�__len__zRecord.__len__�r�r1rA)r,r-r.r/rIr�rPr�r�r�r�r�r�r�r0r1r'rrps���������&3�3�3���������� � � �&�&�&�&�&�&�+�+�+�+� � � �
����r1rc��eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zed
���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Z ed���Z!d�Z"ed ���Z#ed!���Z$ed"���Z%ed#���Z&ed$���Z'ed%���Z(ed&���Z)ed'���Z*ed(���Z+ed)���Z,ed*���Z-d+�Z.ed,���Z/ed-���Z0d3d0�Z1	d4d2�Z2d/S)5rz�Representation of a package version.

    The Version class contains all information related to a
    specific package version.

    .. versionadded:: 0.7.9
    c�j�||_||_|jjj�|��dSrA)rd�_candre�
_weakversions�add)r>rd�cands   r'rIzVersion.__init__�s2�������
����*�.�.�t�4�4�4�4�4r1c�.�	|jj}|jj}||krdS||krdStj|jj|j��S#t$r<	tj|jj|��cYS#t$rtcYcYSwxYwwxYw)a:Compares against another apt.Version object or a version string.

        This method behaves like Python 2's cmp builtin and returns an integer
        according to the outcome.  The return value is negative in case of
        self < other, zero if self == other and positive if self > other.

        The comparison includes the package name and architecture if other is
        an apt.Version object.  If other isn't an apt.Version object it'll be
        assumed that other is a version string (without package name/arch).

        .. versionchanged:: 1.0.0
        ����)
rd�fullnamer"�version_comparer��ver_strrG�AttributeError�	TypeError�NotImplemented)r>r?�	self_name�
other_names    r'�_cmpzVersion._cmp�s���
	&���-�I���/�J��:�%�%��r��Z�'�'��q��*�4�:�+=�u�}�M�M�M���	&�	&�	&�
&��.�t�z�/A�5�I�I�I�I�I���
&�
&�
&�%�%�%�%�%�%�
&����		&���s9�A�A�#A�
B�A:�7B�:B�B�B�Bc�4�|�|��dkS�Nr�r�r=s  r'r<zVersion.__eq__�����y�y����1�$�$r1c�4�|�|��dkSr�r�r=s  r'�__ge__zVersion.__ge__�r�r1c�4�|�|��dkSr�r�r=s  r'�__gt__zVersion.__gt__�����y�y����!�#�#r1c�4�|�|��dkSr�r�r=s  r'�__le__zVersion.__le__�r�r1c�4�|�|��dkSr�r�r=s  r'�__lt__zVersion.__lt__�r�r1c�d�	|�|��dkS#t$r
tcYSwxYwr�)r�r�r�r=s  r'rBzVersion.__ne__�sE��	"��9�9�U�#�#�q�(�(���	"�	"�	"�!�!�!�!�	"���s��/�/c��|jjSrA)r�r�rOs r'r�zVersion.__hash__�s���z��r1c�.�|jj�d|j��S)Nr:�rdrTrGrOs r'rPzVersion.__str__s���,�+�+�+�T�\�\�:�:r1c�2�d|jj�d|j�d�S)Nz<Version: package:rSr9r�rOs r'rVzVersion.__repr__s ���59�\�5F�5F�5F�����U�Ur1c��|jjj�|jjd��st
d���|jjjS)z=Internal helper that moves the Records to the right position.rzCould not lookup record)rdre�_records�lookupr��	file_list�LookupErrorrOs r'r�zVersion._recordssI��
�|�#�,�3�3�D�J�4H��4K�L�L�	9��7�8�8�8��|�#�,�,r1c��|jj}|jjj�|j�d����r|jjjSdS)z2Internal helper to get the translated description.rN)r��translated_descriptionrdrer�r�r��pop)r>�	desc_iters  r'�_translated_recordszVersion._translated_recordssP���J�5�	��<��(�/�/�	�0C�0G�0G��0J�0J�K�K�	1��<�'�0�0��tr1c��|jjS)z.Return the size of the package when installed.)r��installed_sizerOs r'r�zVersion.installed_sizes���z�(�(r1c��|jjS)z$Return the homepage for the package.)r��homepagerOs r'rzVersion.homepage!s���}�%�%r1c��|jjS)zReturn the size of the package.)r�r%rOs r'r%zVersion.size'����z��r1c��|jjS)z/Return the architecture of the package version.)r��archrOs r'�architecturezVersion.architecture-rr1c�4�t|jj��S)z:Return whether the version of the package is downloadable.)�boolr��downloadablerOs r'rzVersion.downloadable3s���D�J�+�,�,�,r1c�V�|jj}|duo|jj|jjkS)zkReturn wether this version of the package is currently installed.

        .. versionadded:: 1.0.0
        N)rd�	installedr��id)r>�inst_vers  r'rtzVersion.is_installed9s,���<�)���t�#�J���(9�T�Z�]�(J�Jr1c��|jjS)zReturn the version as a string.)r�r�rOs r'rGzVersion.versionC����z�!�!r1c�&�|j}|�|jndS)z0Return the short description (one line summary).N)r��
short_desc)r>�recordss  r'�summaryzVersion.summaryIs���*��%,�%8�w�!�!�d�Br1c��|jjS)z"return the long description (raw).)r��	long_descrOs r'�raw_descriptionzVersion.raw_descriptionPs���}�&�&r1c��|jjS)z"Return the section of the package.)r��sectionrOs r'rzVersion.sectionVrr1c��d}|j}|�|jnd}|std��|jjzS	t|t��s|�d��}n5#t$r(}td��|jj|fzcYd}~Sd}~wwxYwt|�
d����}t|��|D]�}|���dkr|�
d��s|dz
}�5|�d	��r1|�
d��sd
|dd�z}nNd|dd�z}n@|�d
��r)|�
d��s|dkr|dd�}n|}n|}||z
}��|S)z�Return the formatted long description.

        Return the formatted long description according to the Debian policy
        (Chapter 5.6.13).
        See http://www.debian.org/doc/debian-policy/ch-controlfields.html
        for more information.
        �Nz+Missing description for '%s'.Please report.�utf-8z<Invalid unicode in description for '%s' (%s). Please report.�
�.z

z  z
%s
�z%s
r}r�)r�r�_rdrT�
isinstancer;�decode�UnicodeDecodeErrorr��split�next�strip�endswith�
startswith)r>�descr�dsc�err�lines�raw_line�lines        r'�descriptionzVersion.description\s������*��#*�#6�g���D���	��E�F�F���!��
�	)��c�3�'�'�
*��j�j��)�)����!�	)�	)�	)��Q�����"�C�(�)�
)�
)�
)�
)�
)�
)�����	)����
�S�Y�Y�t�_�_�%�%���U�����	�	�H��~�~���3�&�&��}�}�T�*�*�#��F�N�D���"�"�4�(�(�
 ��}�}�T�*�*�1�#�h�q�r�r�l�2�D�D�!�H�Q�R�R�L�0�D�D��$�$�S�)�)�
 ��=�=��&�&�$�$�"�*�*�#�A�B�B�<�D�D�#�D�D����D�L�D�D��s�*A�
B�)B�B�Bc�l�	|jjp|jjS#t$r|jjcYSwxYw)z&Return the name of the source package.)r��
source_pkgrd�	shortname�
IndexErrorrOs r'�source_namezVersion.source_name�sH��	*��=�+�E�t�|�/E�E���	*�	*�	*��<�)�)�)�)�	*������3�3c�l�	|jjp|jjS#t$r|jjcYSwxYw)z)Return the version of the source package.)r��
source_verr�r�r1rOs r'�source_versionzVersion.source_version�sH��	&��=�+�A�t�z�/A�A���	&�	&�	&��:�%�%�%�%�	&���r3c��|jjS)z.Return the priority of the package, as string.)r��priority_strrOs r'�priorityzVersion.priority�s���z�&�&r1c�^�|jjjj�|j��S)z�Return the internal policy priority as a number.
        See apt_preferences(5) for more information about what it means.
        )rdre�	_depcache�policy�get_priorityr�rOs r'�policy_priorityzVersion.policy_priority�s%���|�#�-�4�A�A�$�*�M�M�Mr1c�4�t|jj��S)z�Return a Record() object for this version.

        Return a Record() object for this version which provides access
        to the raw attributes of the candidate version
        )rr��recordrOs r'r@zVersion.record�s���d�m�*�+�+�+r1c	��g}|jj}|D]l}	||D]P}g}|D]%}|�t||�����&|�t	|||�����Q�]#t
$rY�iwxYw|S)a(Return a list of Dependency objects for the given types.

        Multiple types can be specified. Possible types are:
        'Breaks', 'Conflicts', 'Depends', 'Enhances', 'PreDepends',
        'Recommends', 'Replaces', 'Suggests'

        Additional types might be added in the future.
        )r��depends_listrgrr�KeyError)r>�typesrB�depends�type_�dep_ver_listr��dep_ors        r'�get_dependencieszVersion.get_dependencies�s������*�)���	�	�E�
�$+�E�N�L�L�L� "�I�".�G�G��!�(�(���f�)E�)E�F�F�F�F� �'�'�
�4��E�(J�(J�K�K�K�K�	L��
�
�
�
���
�����s�AA.�.
A;�:A;c�.�d�|jjD��S)z2Return a list of names that this version provides.c��g|]
}|d��S)rr0)rv�ps  r'rwz$Version.provides.<locals>.<listcomp>�s��7�7�7���!��7�7�7r1)r��
provides_listrOs r'�provideszVersion.provides�s��8�7�d�j�6�7�7�7�7r1c�,�|�d��S)z4Return the list of enhances for the package version.�Enhances�rIrOs r'�enhanceszVersion.enhances�����$�$�Z�0�0�0r1c�.�|�dd��S)z/Return the dependencies of the package version.r��DependsrQrOs r'�dependencieszVersion.dependencies�s���$�$�\�9�=�=�=r1c�,�|�d��S)z-Return the recommends of the package version.�
RecommendsrQrOs r'�
recommendszVersion.recommends�s���$�$�\�2�2�2r1c�,�|�d��S)z+Return the suggests of the package version.�SuggestsrQrOs r'�suggestszVersion.suggests�rSr1c�~�g}|jjD]-\}}|�t|j|�����.|S)z1Return a list of origins for the package version.)r�r�rgrrd)r>�originsr��_unuseds    r'r^zVersion.origins�sH����$(�J�$8�	>�	>� �K���N�N�6�$�,��<�<�=�=�=�=��r1c��|jjS)zZReturn the path to the file inside the archive.

        .. versionadded:: 0.7.10
        )r��filenamerOs r'razVersion.filename�����}�%�%r1c��|jjS)zKReturn the md5sum of the binary.

        .. versionadded:: 0.7.10
        )r��md5_hashrOs r'�md5zVersion.md5rbr1c��|jjS)zLReturn the sha1sum of the binary.

        .. versionadded:: 0.7.10
        )r��	sha1_hashrOs r'�sha1zVersion.sha1s���}�&�&r1c��|jjS)zNReturn the sha256sum of the binary.

        .. versionadded:: 0.7.10
        )r��sha256_hashrOs r'�sha256zVersion.sha256s���}�(�(r1c�Z�t|jd�����S)z�Get the tasks of the package.

        A set of the names of the tasks this package belongs to.

        .. versionadded:: 0.8.0
        �Task)�setr@r"rOs r'�tasksz
Version.tasks s%���4�;�v�&�,�,�.�.�/�/�/r1c#�K�|jjD]L\}}|jjj�|��}|r!|�|jj��V��MdS)zVReturn an iterator over all available urls.

        .. versionadded:: 0.7.10
        N)	r�r�rdrer�r��archive_urir�ra)r>r�r_r�s    r'�_urisz
Version._uris+ss����%)�J�$8�	D�	D� �K����,�2�=�=�k�J�J�I��
D��+�+�D�M�,B�C�C�C�C�C��	D�	Dr1c�D�t|�����S)z^Return a list of all available uris for the binary.

        .. versionadded:: 0.7.10
        )�listrrrOs r'�uriszVersion.uris6s���D�J�J�L�L�!�!�!r1c��	tt|�������S#t$rYdSwxYw)zNReturn a single URI for the binary.

        .. versionadded:: 0.7.10
        N)r#r�rr�
StopIterationrOs r'�urizVersion.uri?sG��	���T�Z�Z�\�\�*�*�+�+�+���	�	�	��4�4�	���s�-0�
>�>rNc�n�|� tj�dd��}tj�|jj��}tj�||��}t||j
|jj��r6tj
d|z��tj�|��S|jjd\}}|jjj�|��}|s@|r|js7t-d|jj�d|j�dt3|d	d
���d����|jst7d���|jj}	|s|	jst-d
|z���tj|p"t<jj �!����}
tj"|
|j|	|j
||���}|
�#��|j$|j%krtMd|j'�d|j(�����tj�|��S)aCFetch the binary version of the package.

        The parameter *destdir* specifies the directory where the package will
        be fetched to.

        The parameter *progress* may refer to an apt_pkg.AcquireProgress()
        object. If not specified or None, apt.progress.text.AcquireProgress()
        is used.

        The keyword-only parameter *allow_unauthenticated* specifies whether
        to allow unauthenticated downloads. If not specified, it defaults to
        the configuration option `APT::Get::AllowUnauthenticated`.

        .. versionadded:: 0.7.10
        N�APT::Get::AllowUnauthenticatedF�"Ignoring already existing file: %sr�Could not fetch r}� source package: Source �describez<unkown>� is not trustedzNo URI for this binary.�8The item %r could not be fetched: No trusted hash found.��destfile�	The item � could not be fetched: ))r"�config�find_brr�basenamer�rar�r(r%r$�logging�debug�abspathr�r�rdrer�r�r�r3rTrG�getattrrx�
ValueError�usable�Acquire�apt�progress�textr�AcquireFile�run�status�	STAT_DONEr*r��
error_text)r>�destdirr��allow_unauthenticated�baser��pfile�offset�indexr$�acq�acqfiles            r'�fetch_binaryzVersion.fetch_binaryKs/��"!�(�$+�N�$9�$9�3�U�%�%�!��w����
� 6�7�7���7�<�<���.�.����4�9�d�m�.B�C�C�	-��M�>��I�J�J�J��7�?�?�8�,�,�,��
�,�Q�/�
��v���$�*�5�5�e�<�<��%�		�%�		�E�4D�		� �.��L�%�%�%��L�L�L��E�:�z�:�:�:�:����
��x�	8��6�7�7�7���%��%�	���	� �M�PX�X���
��o�h�M�#�,�*;�*K�*K�*M�*M�N�N���%����6�4�9�d�X�
�
�
��	���	�	�	��>�W�.�.�.��*��#�#�#�W�%7�%7�9���
�
�w���x�(�(�(r1Tc��|� tj�dd��}tj��}tj|p"t
jj�����}d}|j	}|j
p|jj}	|j
p|jj}
|�|	��}|r-|
|jkr"|�|	��}|r|
|jk�"|st%d|z���t'��}|s>|jjs2t-d|jj�d|j�d|jj�d����|jD]�}
t4j�|
j��}t4j�||��}|
jd	kr|}t?||
j |
j!��rtEj#d
|z����|s|
j!j$st-d|z���|�%tj&||j�'|
j��|
j!|
j ||�������|�(��|�t%d|z���|j)D]1}|j*|j+krtYd
|j-�d|j.������2|r{|jdztj/|j��z}t4j�||��}taj1dd||g��t4j�2|��St4j�2|��S)a9Get the source code of a package.

        The parameter *destdir* specifies the directory where the source will
        be fetched to.

        The parameter *progress* may refer to an apt_pkg.AcquireProgress()
        object. If not specified or None, apt.progress.text.AcquireProgress()
        is used.

        The parameter *unpack* describes whether the source should be unpacked
        (``True``) or not (``False``). By default, it is unpacked.

        If *unpack* is ``True``, the path to the extracted directory is
        returned. Otherwise, the path to the .dsc file is returned.

        The keyword-only parameter *allow_unauthenticated* specifies whether
        to allow unauthenticated downloads. If not specified, it defaults to
        the configuration option `APT::Get::AllowUnauthenticated`.
        NrzFzNo source for %rr|r}r}rr(r{r�r�r�r��-zdpkg-sourcez-x)3r"r�r��
SourceRecordsr�r�r�r�rr�r/rdr0r5r�r�r�rGr�rtr�r�r3rTr~�filesrrr�r��typer(r%r$r�r�r�rgr�rqr��itemsr�r�r*r�r��upstream_version�
subprocess�
check_callr�)r>r�r��unpackr��srcr�r(r@r2r6�
source_lookupr��filr�r��item�outdirs                  r'�fetch_sourcezVersion.fetch_source�sS��.!�(�$+�N�$9�$9�3�U�%�%�!��#�%�%���o�h�M�#�,�*;�*K�*K�*M�*M�N�N��������'�A�4�<�+A���*�@�d�j�.@���
�
�;�/�/�
��	4��#�+� =� =��J�J�{�3�3�M��	4��#�+� =� =��	8��/�$�6�7�7�7�����%�	���)=�	� �.��<�$�$�$�d�l�l�l�C�I�4F�4F�4F�H���
�
�9�	�	�C��7�#�#�C�H�-�-�D��w�|�|�G�T�2�2�H��x�5� � ����X�s�x���<�<�
��
�B�X�M�N�N�N��)�
�S�Z�->�
�$�-�/7�8����
�L�L��#���I�)�)�#�(�3�3��J��H��%�
���	
�	
�	
�	
�	���	�	�	��;��/�$�6�7�7�7��I�	�	�D��{�d�n�,�,� �j��}�}�}�d�o�o�7����-��	(��[�3�&��)A�#�+�)N�)N�N�F��W�\�\�'�6�2�2�F��!�=�$��V�"D�E�E�E��7�?�?�6�*�*�*��7�?�?�3�'�'�'r1)rNN)rNTN)3r,r-r.r/rIr�r<r�r�r�r�rBr�rPrVr�r�r�r�rr%rrrtrGrrrr-r2r6r9r>r@rIrNrRrVrYr\r^rarerhrkrorrrurxr�r�r0r1r'rr�sl��������5�5�5�&�&�&�<%�%�%�%�%�%�$�$�$�%�%�%�$�$�$�"�"�"����;�;�;�V�V�V��-�-��X�-�����X���)�)��X�)�
�&�&��X�&�
����X��
����X��
�-�-��X�-�
�K�K��X�K��"�"��X�"�
�C�C��X�C��'�'��X�'�
�"�"��X�"�
�5�5��X�5�n�*�*��X�*��&�&��X�&��'�'��X�'�
�N�N��X�N��,�,��X�,����.�8�8��X�8�
�1�1��X�1�
�>�>��X�>�
�3�3��X�3�
�1�1��X�1�
����X���&�&��X�&��&�&��X�&��'�'��X�'��)�)��X�)��0�0��X�0�	D�	D�	D��"�"��X�"��	�	��X�	�<)�<)�<)�<)�~MQ�[(�[(�[(�[(�[(�[(r1rc�R�eZdZdZd
d�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd
d�Z
dS)ra�Provide a mapping & sequence interface to all versions of a package.

    This class can be used like a dictionary, where version strings are the
    keys. It can also be used as a sequence, where integers are the keys.

    You can also convert this to a dictionary or a list, using the usual way
    of dict(version_list) or list(version_list). This is useful if you need
    to access the version objects multiple times, because they do not have to
    be recreated this way.

    Examples ('package.versions' being a version list):
        '0.7.92' in package.versions # Check whether 0.7.92 is a valid version.
        package.versions[0] # Return first version or raise IndexError
        package.versions[0:2] # Return a new VersionList for objects 0-2
        package.versions['0.7.92'] # Return version 0.7.92 or raise KeyError
        package.versions.keys() # All keys, as strings.
        max(package.versions)
    Nc�b�||_|jj|_|r|j||_dSdSrA)�_packagerk�version_list�	_versions)r>rd�slice_s   r'rIzVersionList.__init__�s9����
� ��2����	4�!�^�F�3�D�N�N�N�	4�	4r1c�D�t|t��r|�|j|��S	t	|j|j|��S#t$r1|jD]&}|j|krt	|j|��ccYS�'YnwxYwtd|z���)NzVersion: %r not found.)	r�slicer�r�rr�r�r�rC�r>r��vers   r'r�zVersionList.__getitem__s����d�E�"�"�	7��>�>�$�-��6�6�6�	7��4�=�$�.��*>�?�?�?���	7�	7�	7��~�
7�
7���;�$�&�&�"�4�=�#�6�6�6�6�6�6�6�'�
7�
7�	7����
�/�4�8�9�9�9s�A�5B
�	B
�B
c�F�dd�d�|D����zS)Nz[%s]r�c3�4K�|]}t|��V��dSrA)r;�rvr�s  r'r�z&VersionList.__str__.<locals>.<genexpr>s(����"<�"<��3�s�8�8�"<�"<�"<�"<�"<�"<r1r�rOs r'rPzVersionList.__str__s(������"<�"<�t�"<�"<�"<�<�<�=�=r1c�0�d|���zS)Nz<VersionList: %r>)r�rOs r'rVzVersionList.__repr__s��"�T�Y�Y�[�[�0�0r1c�*���fd��jD��S)z*Return an iterator over all value objects.c3�B�K�|]}t�j|��V��dSrA)rr�)rvr�r>s  �r'r�z'VersionList.__iter__.<locals>.<genexpr>s/�����F�F����
�s�+�+�F�F�F�F�F�Fr1�r�rOs`r'r�zVersionList.__iter__s"���G�F�F�F�t�~�F�F�F�Fr1c�n�t|t��r|j}|jD]}|j|krdS�dSr�)rrrGr�r�r�s   r'r�zVersionList.__contains__sJ���d�G�$�$�	 ��<�D��>�	�	�C��{�d�"�"��t�t�#��ur1c�B�t|��t|��kSrA)rtr=s  r'r<zVersionList.__eq__)s���D�z�z�T�%�[�[�(�(r1c�*�t|j��SrA)r�r�rOs r'r�zVersionList.__len__-s���4�>�"�"�"r1c�$�d�|jD��S)z*Return a list of all versions, as strings.c��g|]	}|j��
Sr0)r�r�s  r'rwz$VersionList.keys.<locals>.<listcomp>6s��6�6�6����6�6�6r1r�rOs r'r�zVersionList.keys3s��7�6�t�~�6�6�6�6r1c�8�	||S#t$r|cYSwxYw)zReturn the key or the default.)r�r�s   r'r�zVersionList.get8s5��	���9����	�	�	��N�N�N�	���s�
��rA)r,r-r.r/rIr�rPrVr�r�r<r�r�r�r0r1r'rr�s���������&4�4�4�4�:�:�:� >�>�>�1�1�1�G�G�G�
���)�)�)�#�#�#�7�7�7�
�����r1rc�h�eZdZdZd�Zd�Zd�Zd�Zed���Z	e	j
d���Z	ed���Zed	���Zed
���Z
ed���Zed���Zed
���Zd�Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zed���Zd(d�Zed���Zed���Zed���Z ed���Z!d �Z"d)d#�Z#d*d$�Z$d+d%�Z%d+d&�Z&d'�Z'dS),rz�Representation of a package in a cache.

    This class provides methods and properties for working with a package. It
    lets you mark the package for installation, check if it is installed, and
    much more.
    c�0�||_||_d|_dS)zInit the Package objectrN)rkre�
_changelog)r>�pcache�pkgiters   r'rIzPackage.__init__Is����	��������r1c��|jSrA�rTrOs r'rPzPackage.__str__Ps
���y�r1c�V�d|jj�d|jj�d|jj�d�S)Nz<Package: name:z architecture=z id:r9)rkrTrrrOs r'rVzPackage.__repr__Ts4���
�I�N�N�N��I�"�"�"��I�L�L�L�
�	
r1c�"�|j|jkSrAr�r=s  r'r�zPackage.__lt__\s���y�5�:�%�%r1c�r�|jj�|j��}|�t	||��SdS)z�Return the candidate version of the package.

        This property is writeable to allow you to set the candidate version
        of the package. Just assign a Version() object, and it will be set as
        the candidate version.
        N)rer;�get_candidate_verrkr)r>r�s  r'�	candidatezPackage.candidate`s9���|�%�7�7��	�B�B�����4��&�&�&��tr1c��|j���|jj�|j|j��|j���dS)z)Set the candidate version of the package.N)re�cache_pre_changer;�set_candidate_verrkr��cache_post_change)r>rGs  r'r�zPackage.candidatensQ��	
��%�%�'�'�'����0�0���G�M�J�J�J���&�&�(�(�(�(�(r1c�R�|jj�t||jj��SdS)z`Return the currently installed version of the package.

        .. versionadded:: 0.7.9
        N)rk�current_verrrOs r'r
zPackage.installedvs)���9� �,��4���!6�7�7�7��tr1c�6�|j�d��S)a}Return the name of the package, possibly including architecture.

        If the package is not part of the system's preferred architecture,
        return the same as :attr:`fullname`, otherwise return the same
        as :attr:`shortname`

        .. versionchanged:: 0.7.100.3

        As part of multi-arch, this field now may include architecture
        information.
        T�rk�get_fullnamerOs r'rTzPackage.name�s���y�%�%�d�+�+�+r1c�6�|j�d��S)z�Return the name of the package, including architecture.

        Note that as for :meth:`architecture`, this returns the
        native architecture for Architecture: all packages.

        .. versionadded:: 0.7.100.3Fr�rOs r'r�zPackage.fullname�s���y�%�%�e�,�,�,r1c��|jjS)zZReturn the name of the package, without architecture.

        .. versionadded:: 0.7.100.3)rkrTrOs r'r0zPackage.shortname�s���y�~�r1c��|jjS)znReturn a uniq ID for the package.

        This can be used eg. to store additional information about the pkg.)rkrrOs r'rz
Package.id�s���y�|�r1c��|jjS)z>Return True if the package is an essential part of the system.)rk�	essentialrOs r'r�zPackage.essential�s���y�"�"r1c��|jjS)aReturn the Architecture of the package.

        Note that for Architecture: all packages, this returns the
        native architecture, as they are internally treated like native
        packages. To get the concrete architecture, look at the
        :attr:`Version.architecture` attribute.

        .. versionchanged:: 0.7.100.3
            This is now the package's architecture in the multi-arch sense,
            previously it was the architecture of the candidate version
            and deprecated.
        )rkrrOs r'rzPackage.architecture�s���y�%�%r1c�J�|jj�|j��S)z5Return ``True`` if the package is marked for install.)rer;�marked_installrkrOs r'r�zPackage.marked_install�����|�%�4�4�T�Y�?�?�?r1c�J�|jj�|j��S)z5Return ``True`` if the package is marked for upgrade.)rer;�marked_upgraderkrOs r'r�zPackage.marked_upgrade�r�r1c�J�|jj�|j��S)z4Return ``True`` if the package is marked for delete.)rer;�
marked_deleterkrOs r'r�zPackage.marked_delete�����|�%�3�3�D�I�>�>�>r1c�J�|jj�|j��S)z2Return ``True`` if the package is marked for keep.)rer;�marked_keeprkrOs r'r�zPackage.marked_keep�s���|�%�1�1�$�)�<�<�<r1c�J�|jj�|j��S)zPackage is marked for downgrade)rer;�marked_downgraderkrOs r'r�zPackage.marked_downgrade�����|�%�6�6�t�y�A�A�Ar1c�J�|jj�|j��S)z7Return ``True`` if the package is marked for reinstall.)rer;�marked_reinstallrkrOs r'r�zPackage.marked_reinstall�r�r1c��|jjduS)z,Return ``True`` if the package is installed.N)rkr�rOs r'rtzPackage.is_installed�s���y�$�D�0�0r1c�X�|jo#|jj�|j��S)z-Return ``True`` if the package is upgradable.)rtrer;�
is_upgradablerkrOs r'r�zPackage.is_upgradable�s'��� �T�T�\�%;�%I�%I�$�)�%T�%T�Tr1c�f�|jp|jo#|jj�|j��S)z�Return ``True`` if the package is no longer required.

        If the package has been installed automatically as a dependency of
        another package, and if no packages depend on it anymore, the package
        is no longer required.
        )rtr�rer;�
is_garbagerkrOs r'�is_auto_removablezPackage.is_auto_removable�s4��
��4��!4�;��l�$�/�/��	�:�:�	;r1c�J�|jj�|j��S)z@Return whether the package is marked as automatically installed.)rer;�is_auto_installedrkrOs r'r�zPackage.is_auto_installeds���|�%�7�7��	�B�B�Br1c��|j|jfD]|}d|z}	t|d��5}|����d���d��cddd��cS#1swxYwY�m#t$rY�ywxYwgS)z�Return a list of files installed by the package.

        Return a list of unicode names of the files which have
        been installed by this package
        z/var/lib/dpkg/info/%s.list�rbrrN)rTr�r!�readr r"�EnvironmentError)r>rTrr�s    r'�installed_fileszPackage.installed_files	s���I�t�}�,�	�	�D�/�$�6�D�
��$��%�%�H��$�>�>�+�+�2�2�7�;�;�A�A�$�G�G�H�H�H�H�H�H�H�H�H�H�H�H�H�H����H�H�H�H�H��#�
�
�
���
�����	s4�A<�:A0�!A<�0A4	�4A<�7A4	�8A<�<
B	�B	Nc�
�|jdkr|jS|jstd��S|�w|jjdjdkrd}nY|jjdjdkrd}n;td��}t|t��r|S|�d	��S|jj}d
}|jj	}|jj
}	tj��}|�
|��rm|js�|jj
|jkr|j}|j	}nAtj|j|��dkr|j}|j	}|�
|���mn#t $rYnwxYw|�dd��}	t%|	��dkr|	d}~	|d}
|�d
��rd
|dz}
|�dd��}t%|��dkrd�|dd���}~|||
||d�z}t+j��}		t+jd��|r+|���r	t+j|��dSt3|��}
d}dt5j|��z}	|r+|���r	t+j|��dS|
���}|sn�|�d	��}t5j||��}|r�t=|jdd��}|r d|vr|�dd��d}|� d��}|r d|vr|�dd��d}|rtj||��dkrn||z
}��t%|��dkr9td��}t|t��s|�d	��}||_�n#tB$r�|jjdjdkrtd��||fz}ntd��}t|t��r|cYt+j|��S|�d	��cYt+j|��StDtFf$rhtd��}t|t��r|cYt+j|��S|�d	��cYt+j|��SwxYw	t+j|��n#t+j|��wxYw|jS)a�
        Download the changelog of the package and return it as unicode
        string.

        The parameter *uri* refers to the uri of the changelog file. It may
        contain multiple named variables which will be substitued. These
        variables are (src_section, prefix, src_pkg, src_ver). An example is
        the Ubuntu changelog::

            "http://changelogs.ubuntu.com/changelogs/pool" \
                "/%(src_section)s/%(prefix)s/%(src_pkg)s" \
                "/%(src_pkg)s_%(src_ver)s/changelog"

        The parameter *cancel_lock* refers to an instance of threading.Event,
        which if set, prevents the download.
        rz$The list of changes is not availableNr�Debianzshttp://packages.debian.org/changelogs/pool/%(src_section)s/%(prefix)s/%(src_pkg)s/%(src_pkg)s_%(src_ver)s/changelog�Ubuntuzuhttp://changelogs.ubuntu.com/changelogs/pool/%(src_section)s/%(prefix)s/%(src_pkg)s/%(src_pkg)s_%(src_ver)s/changelogr�main�/r��lib��:)�src_section�prefix�src_pkg�src_verrz^%s \((.*)\)(.*)$TrGz�The list of changes is not available yet.

Please use http://launchpad.net/ubuntu/+source/%s/%s/+changelog
until the changes become available or try again later.zOFailed to download the list of changes. 
Please check your Internet connection.)$r�r�rr^r�rr;r r2rr6r"r�r�rGr��SystemErrorr"r�r&r��socket�getdefaulttimeout�setdefaulttimeout�is_setr�re�escape�readline�matchr�r
�groupr�IOErrorr)r>rx�cancel_lock�resrrrr	�src_records�
section_splitr�
src_ver_split�timeout�changelog_file�	changelog�regexp�line_rawr,rr
�
changelog_vers                     r'�
get_changelogzPackage.get_changelogs��&�?�b� � ��?�"��~�	=��;�<�<�<��;��~�%�a�(�/�8�;�;�9���
��'��*�1�X�=�=�9����>�?�?���c�3�'�'�/��J��:�:�g�.�.�.��.�,�����.�(���.�/��	2�
"�/�1�1�K��$�$�W�-�-�
2�"�*����>�0�K�4G�G�G�)�1�G�)�1�G���*�;�+>��H�H�1�L�L�)�1�G�)�1�G��$�$�W�-�-�
2����	�	�	��D�	����  �
�
�c�1�-�-�
��}����!�!�'��*�K���������e�$�$�	(��W�Q�Z�'�F� �
�
�c�1�-�-�
��}����!�!��g�g�m�A�B�B�/�0�0�G���&����	
�
�
���*�,�,��N	.�K
/��(��+�+�+���;�#5�#5�#7�#7���N
�$�W�-�-�-�-�-�K")������	�.�"�)�G�2D�2D�E��&�"�"�{�'9�'9�';�';�"�!�|
�$�W�-�-�-�-�-�y .�6�6�8�8�H�#���$�?�?�7�3�3�D��H�V�T�2�2�E��"�%,�D�N�I�t�$L�$L�	�$�C��	�)9�)9�(1����Q�(?�(?��(B�I�(-���A���
�(�K�S�M�-A�-A�,9�,?�,?��Q�,G�,G��,J�M�&�"� '� 7�
�y� Q� Q�UV� V� V�!���%�I�=&�B�y�>�>�Q�&�&� !�"H� I� I�I�%�i��5�5�>�$-�$4�$4�W�$=�$=�	�"+������
/�
/�
/��>�)�!�,�3�x�?�?��!���!�'�*�+�C�C��B�C�C�C��c�3�'�'�/��J�J�
�$�W�-�-�-�-��:�:�g�.�.�.�.�
�$�W�-�-�-�-��]�+�
/�
/�
/��6�����c�3�'�'�/��J�J�
�$�W�-�-�-�-��:�:�g�.�.�.�.��$�W�-�-�-�-�
/����% �8
�$�W�-�-�-�-��F�$�W�-�-�-�-������sn�	E�
E,�+E,�/*O0�0?O0�D(O0�.T"�0A T	�T"�&T	�;T"�6T	�T"�T	�2T"�T	�	T"�"T8c� �t|��S)zcReturn a VersionList() object for all available versions.

        .. versionadded:: 0.7.9
        )rrOs r'�versionszPackage.versions�s���4� � � r1c�J�|jj�|j��S)z5Return True if the to-be-installed package is broken.)rer;�is_inst_brokenrkrOs r'r$zPackage.is_inst_broken�r�r1c�J�|jj�|j��S)z/Return True if the installed package is broken.)rer;�
is_now_brokenrkrOs r'r&zPackage.is_now_broken�r�r1c�6�|jjtjkS)z8Checks whether the package is is the config-files state.)rk�
current_stater"�CURSTATE_CONFIG_FILESrOs r'�has_config_fileszPackage.has_config_files�s���y�&�'�*G�G�Gr1c��|j���|jj�|j��|j���dS)zMark a package for keep.N)rer�r;�	mark_keeprkr�rOs r'r,zPackage.mark_keep�sM��	
��%�%�'�'�'����(�(���3�3�3���&�&�(�(�(�(�(r1TFc���|j���|jj�|j|��|r�|jjjdkr�t
j|jj��}|�|j��|�	|j��|�
|j��|���|j���dS)a+Mark a package for deletion.

        If *auto_fix* is ``True``, the resolver will be run, trying to fix
        broken packages.  This is the default.

        If *purge* is ``True``, remove the configuration files of the package
        as well.  The default is to keep the configuration.
        rN)
rer�r;�mark_deleterk�broken_countr"�ProblemResolver�clear�protect�remove�resolver�)r>�auto_fix�purge�fixs    r'r.zPackage.mark_delete�s���	
��%�%�'�'�'����*�*�4�9�e�<�<�<��	���.�;�a�?�?��)�$�,�*@�A�A�C��I�I�d�i� � � ��K�K��	�"�"�"��J�J�t�y�!�!�!��K�K�M�M�M���&�&�(�(�(�(�(r1c��|j���|jj�|j||��|r||jjjdkrgt
j|jj��}|�|j��|�	|j��|�
d��|j���dS)a0Mark a package for install.

        If *autoFix* is ``True``, the resolver will be run, trying to fix
        broken packages.  This is the default.

        If *autoInst* is ``True``, the dependencies of the packages will be
        installed automatically.  This is the default.

        If *fromUser* is ``True``, this package will not be marked as
        automatically installed. This is the default. Set it to False if you
        want to be able to automatically remove the package at a later stage
        when no other package depends on it.
        rTN)rer�r;�mark_installrkr/r"r0r1r2r4r�)r>r5�	auto_inst�	from_user�fixers     r'r9zPackage.mark_installs���	
��%�%�'�'�'����+�+�D�I�y�)�L�L�L��	 ���.�;�a�?�?��+�D�L�,B�C�C�E��K�K��	�"�"�"��M�M�$�)�$�$�$��M�M�$������&�&�(�(�(�(�(r1c���|jr4|j}|�|���|�|��dStj�d|jjz��dS)zMark a package for upgrade.)r;z4MarkUpgrade() called on a non-upgradeable pkg: '%s'
N)	r�r�r9�	mark_auto�sys�stderr�writerkrT)r>r;�autos   r'�mark_upgradezPackage.mark_upgrade's{����		��)�D����	��2�2�2��N�N�4� � � � � �
�J���K��)�.�!�
�
�
�
�
r1c�P�|jj�|j|��dS)aMark a package as automatically installed.

        Call this function to mark a package as automatically installed. If the
        optional parameter *auto* is set to ``False``, the package will not be
        marked as automatically installed anymore. The default is ``True``.
        N)rer;r>rk)r>rBs  r'r>zPackage.mark_auto5s'��	
���(�(���D�9�9�9�9�9r1c�F�|jj�||��dS)aCommit the changes.

        The parameter *fprogress* refers to a apt_pkg.AcquireProgress() object,
        like apt.progress.text.AcquireProgress().

        The parameter *iprogress* refers to an InstallProgress() object, as
        found in apt.progress.base.
        N)rer;�commit)r>�	fprogress�	iprogresss   r'rFzPackage.commit?s%��	
���%�%�i��;�;�;�;�;r1)NN�TF)TTT)T)(r,r-r.r/rIrPrVr�r�r��setterr
rTr�r0rr�rr�r�r�r�r�r�rtr�r�r�r�r r"r$r&r*r,r.r9rCr>rFr0r1r'rrAsy��������������
�
�
�&�&�&�����X����)�)���)�����X���
,�
,��X�
,��-�-��X�-�����X������X���#�#��X�#�
&�&�&�$�@�@��X�@�
�@�@��X�@�
�?�?��X�?�
�=�=��X�=�
�B�B��X�B�
�B�B��X�B�
�1�1��X�1�
�U�U��X�U�
�
;�
;��X�
;��C�C��X�C�����X��"x�x�x�x�t�!�!��X�!��@�@��X�@�
�?�?��X�?�
�H�H��X�H�)�)�)�)�)�)�)�*)�)�)�)�2����:�:�:�:�
<�
<�
<�
<�
<r1rc��td��ddl}tj��tjj���}t	j|��}|d}td|j	z��td|j
z��td|jjz��td|j
jz��td	|j
jz��td
|jjz��td|jjz��td|jjz��td
|jjz��td|jz��td|jjz��td|jjz��td|jjz��td|jjz��td|jjz��td|j
jz��td|j
jz��|jjD]3}td�d�|jD�������4td|jjz��td|jjz��td|jj��t|d�����dD]�}td|��|D]8}|j r/|�!dd��dkr|�"|���9td|j#j$z��td |j#j%z����t��dD]�}td!|z��t	j|��}|�&��D][}|�!dd��dkr?	||�'|���9#tP$rtd"|z��Y�WwxYw�\td|j#j$z��td#|j#j)z����dS)$z
Self-test.zSelf-test for the Package modulrNz	apt-utilsz	Name: %s zID: %s zPriority (Candidate): %s zPriority (Installed): %s zInstalled: %s zCandidate: %s zCandidateDownloadable: %szCandidateOrigins: %szSourcePkg: %s zSection: %s zSummary: %szDescription (formatted) :
%szDescription (unformatted):
%szInstalledSize: %s zPackageSize: %s zDependencies: %szRecommends: %s�,c	3�ZK�|]&}|j�d|j�d|j�d|j�d�V��'dS)z (z) (�)N)rTrGrUr�)rv�os  r'r�z_test.<locals>.<genexpr>isW�������()�v�v�v�q�y�y�y�!�*�*�*�a�l�l�l�S������r1zarch: %szhomepage: %szrec: �2vcardrIz8Running install on random upgradable pkgs with AutoFix: r�zBroken: %s zInstCount: %s z.Randomly remove some packages with AutoFix: %szError trying to remove: %s z
DelCount: %s )*�print�randomr"�initr�r�r��
OpProgress�CacherTrr�r9r
rGrr^r2rrr-rr�r%rVrYr�r�rrr@r r��randintr9r;r/�
inst_countr�r.r
�	del_count)rRr�rlrmrH�irTs       r'�_testrZLsY��
�
+�,�,�,��M�M�M��L�N�N�N��|� �+�+�-�-�H��I�h���E�
��
�C�	�+���
 �!�!�!�	�)�c�f�
����	�
%��
�(>�
>�?�?�?�	�
%��
�(>�
>�?�?�?�	�
�S�]�2�
2�3�3�3�	�
�S�]�2�
2�3�3�3�	�
%��
�(B�
B�C�C�C�	�
 �3�=�#8�
8�9�9�9�	�
�S�]�6�
6�7�7�7�	�.�3�;�
&�'�'�'�	�-�#�-�/�
/�0�0�0�	�
)�C�M�,E�
E�F�F�F�	�
*�S�]�-J�
J�K�K�K�	�
���!=�
=�>�>�>�	�
�s�}�1�
1�2�2�2�	�
�s�}�9�
9�:�:�:�	�
�S�]�5�
5�6�6�6��}�)�
�
��
��H�H����,����
�
�	
�	
�	
�	
�
�*�s�}�1�
1�2�2�2�	�.�3�=�1�
1�2�2�2�	�'�3�=�'�(�(�(�	�%��/�
'�
'�
)�
)�*�*�*�
�=�=��
�H�!�L�L�L��	(�	(�C�� �
(��>�>�!�Q�'�'�1�,�,��$�$�Q�'�'�'��
�m�e�o�:�:�;�;�;�
����!;�;�<�<�<�<�	�G�G�G�
�
;�
;��
�>��B�C�C�C��	�(�#�#���J�J�L�L�	@�	@�D��~�~�a��#�#�q�(�(�@��$�K�+�+�A�.�.�.�.��"�@�@�@��7�$�>�?�?�?�?�?�@����)�
	�m�e�o�:�:�;�;�;�
�o��� 9�9�:�:�:�:�
;�
;s�O9�9P�P�__main__)3r/�
__future__rr�rr?rrr��	threading�http.clientr�urllib.errorr�urllib.requestr�typingrrr	r
rrr
rrrrr"�apt.progress.textr��apt.progress.baserrrr�__all__r(�	Exceptionr*r3�objectrrrrrrrrZr,r0r1r'�<module>rgs���*)�(�%�%�%�%�%�%�����	�	�	�	�
�
�
�
�	�	�	�	�
�
�
�
���������%�%�%�%�%�%�"�"�"�"�"�"�"�"�"�"�"�"�������������������������������������������
!� � � � � ������3�3�3�3�3��3�3�3�:�:�:�:�:�Z�:�:�:�V?�V?�V?�V?�V?�V�V?�V?�V?�rPL�PL�PL�PL�PL��n�%�PL�PL�PL�f)
�)
�)
�)
�)
�V�)
�)
�)
�XA�A�A�A�A�W�S�#�X�
�A�A�A�Hp(�p(�p(�p(�p(�f�p(�p(�p(�fW�W�W�W�W�(�7�#�W�W�W�tH<�H<�H<�H<�H<�f�H<�H<�H<�V�;;�;;���;;�~�z���	�E�G�G�G�G�G��r1