403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/apt/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/apt/__pycache__/package.cpython-314.pyc
+
�n�g4�����Rt^RIHt^RIt^RIt^RIt^RIt^RIt^RIt^RI	t	^RI
HtHtH
t
Ht^RIHt^RIHtHt^RIHt^RIHt^RIt^RIHt^RIt^R	IHtHtR t RRlt!!RR]"4t#!RR]#4t$!RR
4t%!RR]&]%,4t'!RR4t(!RR]
]]3,4t)!RR4t*!RR]]*,4t+!RR
4t,]R4t-].R8Xd
]-!4R#R#)!z"Functionality related to packages.)�annotationsN)�Iterable�Iterator�Mapping�Sequence)�
BadStatusLine)�Any�
no_type_check)�	HTTPError)�urlopen)�gettext)�AcquireProgress�InstallProgress�BaseDependency�
Dependency�Origin�Package�Record�Version�VersionListc�(�V^8�dQhRRRRRRRR/#)	��path�str�size�int�hasheszapt_pkg.HashStringList�return�bool�)�formats"�-/usr/lib/python3/dist-packages/apt/package.py�__annotate__r"6s)������3��0F��4��c�B�\PPV4'df\PPV4V8XdB\	V4;_uu_4p\
P!V4PV8HuuRRR4#R# +'giR#;i)z(Return ``True`` if the file is the same.NF)�osr�exists�getsize�open�apt_pkg�Hashesr)rrr�fobjs&&& r!�
_file_is_samer,6s`��	�w�w�~�~�d��������� 5�� =�
�$�Z�Z�4��>�>�$�'�.�.�&�8��Z���Z��s�#B
�
B	c��]tRt^>tRtRtR#)�
FetchErrorz(Raised when a file could not be fetched.rN��__name__�
__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__rr#r!r.r.>s��2r#r.c��]tRt^BtRtRtR#)�UntrustedErrorz/Raised when a file did not have a trusted hash.rNr/rr#r!r7r7Bs��9r#r7c��]tRt^FtRt!RR]4tRRltRRltRR	lt	]
R
Rl4t]
RR
l4t]
RRl4t
]
RRl4t]
RRl4t]
RRl4t]
RRl4t]
RRl4t]
RRl4tRtR#)rzA single dependency.c�2�]tRt^ItRtRRltRRltRtR#)�BaseDependency.__dstra)Compare 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� �V^8�dQhRRRR/#�r�other�objectrrr)r s"r!r"�"BaseDependency.__dstr.__annotate__Rs��
	�
	��
	�4�
	r#c	�l�\PW4'dR#\PVR4'd\PRV4#\PVR4'd\PRV4#\PVR4'd\PRV4#R#)T�<z<<�>z>>�=z==F)r�__eq__��selfr=s&&r!rD�BaseDependency.__dstr.__eq__Rs}���z�z�$�&�&�����D�#�&�&��z�z�$��.�.����D�#�&�&��z�z�$��.�.����D�#�&�&��z�z�$��.�.�r#c� �V^8�dQhRRRR/#r<r)r s"r!r"r?^s��	*�	*��	*�4�	*r#c	�.�VPV4'*#�N)rDrEs&&r!�__ne__�BaseDependency.__dstr.__ne__^s���{�{�5�)�)�)r#rN)r0r1r2r3r4rDrKr5rr#r!�__dstrr:Is��	�
	�	*�	*r#rMc�$�V^8�dQhRRRRRR/#)r�versionr�depzapt_pkg.Dependencyr�Noner)r s"r!r"�BaseDependency.__annotate__as"������.@��T�r#c	��WnW nR#rJ)�_version�_dep)rFrOrPs&&&r!�__init__�BaseDependency.__init__as���
��	r#c��V^8�dQhRR/#�rrrr)r s"r!r"rRe���0�0��0r#c	�8�VPRVP2#�z: ��rawtype�rawstr�rFs&r!�__str__�BaseDependency.__str__e����,�,��r�$�+�+��/�/r#c��V^8�dQhRR/#rYr)r s"r!r"rRhs��
�
�#�
r#c	�z�RPVPVPVPVP4#)zC<BaseDependency: name:{!r} relation:{!r} version:{!r} rawtype:{!r}>)r �name�relationrOr^r`s&r!�__repr__�BaseDependency.__repr__hs1��T�[�[��I�I��M�M��L�L��L�L�	
�	
r#c��V^8�dQhRR/#rYr)r s"r!r"rRqs��)�)�c�)r#c
�B�VPPP#)zThe name of the target package.)rU�
target_pkgrfr`s&r!rf�BaseDependency.nameps���y�y�#�#�(�(�(r#c��V^8�dQhRR/#rYr)r s"r!r"rRvs��0�0�#�0r#c
�L�VPVPP4#)z�The relation (<, <=, =, !=, >=, >, '') in mathematical notation.

The empty string will be returned in case of an unversioned dependency.
)�_BaseDependency__dstrrU�	comp_typer`s&r!rg�BaseDependency.relationus���{�{�4�9�9�.�.�/�/r#c��V^8�dQhRR/#rYr)r s"r!r"rR~s��
'�
'�c�
'r#c
�.�VPP#)aFThe 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
)rU�
comp_type_debr`s&r!�relation_deb�BaseDependency.relation_deb}s���y�y�&�&�&r#c��V^8�dQhRR/#rYr)r s"r!r"rR�s��$�$��$r#c
�.�VPP#)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.
)rU�
target_verr`s&r!rO�BaseDependency.version�s���y�y�#�#�#r#c��V^8�dQhRR/#�rrz
list[Version]r)r s"r!r"rR�s��
�
��
r#c
��.pVPP4pVF\pVPpVPPP
pVP
V4p\Wc4pVPV4K^	V#)zVA list of all Version objects which satisfy this dependency.

.. versionadded:: 1.0.0
)	rU�all_targets�
parent_pkgrT�package�_pcache�_rawpkg_to_pkgr�append)rF�tvers�_tvers�_tver�_pkg�cache�pkg�tvers&       r!�target_versions�BaseDependency.target_versions�sr����(,�	�	�(=�(=�(?���E�$)�$4�$4�D��M�M�)�)�1�1�E��&�&�t�,�C��3�&�D��L�L�����r#c��V^8�dQhRR/#r}r)r s"r!r"rR����L�L�=�Lr#c
�j�VPUu.uFqP'gKVNK	up#uupi�zYA list of all installed Version objects which satisfy this dep.

.. versionadded:: 1.0.0
�r��is_installed�rFr�s& r!�installed_target_versions�(BaseDependency.installed_target_versions��,��"&�!5�!5�K�!5��9J�9J���!5�K�K��K��0�0c��V^8�dQhRR/#rYr)r s"r!r"rR�s�����r#c
��VP'd)VPRVPRVP2#VP#)aYString 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
� )rOrfrvr`s&r!r_�BaseDependency.rawstr�s=�� �<�<�<��i�i�[��$�"3�"3�!4�A�d�l�l�^�D�D��9�9�r#c��V^8�dQhRR/#rYr)r s"r!r"rR�s��/�/��/r#c
�.�VPP#)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.
�rU�dep_type_untranslatedr`s&r!r^�BaseDependency.rawtype�s���y�y�.�.�.r#c��V^8�dQhRR/#�rrrr)r s"r!r"rR�s��?�?�D�?r#c
�4�VPPR8H#)zWhether this is a PreDepends.�
PreDependsr�r`s&r!�
pre_depend�BaseDependency.pre_depend�s���y�y�.�.�,�>�>r#)rUrTN)r0r1r2r3r4rrprVrarh�propertyrfrgrvrOr�r�r_r^r�r5rr#r!rrFs����*��*�0�0�
��)��)��0��0��
'��
'��$��$��
��
��L��L�����(�/��/��?��?r#c�a�]tRt^�tRtRV3RlltRRltRRlt]RR	l4t	]R
Rl4t
]RR
l4t]RRl4t]RRl4t
RtV;t#)ra5Represent 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�(�V^8�dQhRRRRRRRR/#)	rrOr�	base_depszlist[BaseDependency]r^rrrQr)r s"r!r"�Dependency.__annotate__�s,�� � �� �+?� �JM� �	
� r#c	�><�\SV`V4WnW0nR#rJ)�superrVrT�_rawtype)rFrOr�r^�	__class__s&&&&�r!rV�Dependency.__init__�s���	����#��
��
r#c��V^8�dQhRR/#rYr)r s"r!r"r��rZr#c	�8�VPRVP2#r\r]r`s&r!ra�Dependency.__str__�rcr#c��V^8�dQhRR/#rYr)r s"r!r"r��s��K�K�#�Kr#c	�@�RRPRV44,#)z<Dependency: [%s]>�, c3�8"�TFp\V4x�K	R#5irJ)�repr��.0�bds& r!�	<genexpr>�&Dependency.__repr__.<locals>.<genexpr>�s���0I�D�b��b���D�����joinr`s&r!rh�Dependency.__repr__�s��#�t�y�y�0I�D�0I�'I�J�Jr#c��V^8�dQhRR/#)rrrr)r s"r!r"r��s�����r#c	��V#rJrr`s&r!�or_dependencies�Dependency.or_dependencies�s���r#c��V^8�dQhRR/#rYr)r s"r!r"r��s��4�4��4r#c
�2�RPRV44#)a@String 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�8"�TFqPx�K	R#5irJ)r_r�s& r!r��$Dependency.rawstr.<locals>.<genexpr>�s���3�d��)�)�d�r�r�r`s&r!r_�Dependency.rawstr�s���z�z�3�d�3�3�3r#c��V^8�dQhRR/#rYr)r s"r!r"r��s��
�
��
r#c
��VP#)z�Type 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�r`s&r!r^�Dependency.rawtype�s���}�}�r#c��V^8�dQhRR/#r}r)r s"r!r"r�	s��
�
��
r#c
�t�.pVF/pVPFpW19gKVPV4K	K1	V#)z\A list of all Version objects which satisfy this Or-group of deps.

.. versionadded:: 1.0.0
)r�r�)rFr�r�r�s&   r!r��Dependency.target_versionss<�� "���B��*�*���$��L�L��&�+���r#c��V^8�dQhRR/#r}r)r s"r!r"r�r�r#c
�j�VPUu.uFqP'gKVNK	up#uupir�r�r�s& r!r��$Dependency.installed_target_versionsr�r�)r�rT)r0r1r2r3r4rVrarhr�r�r_r^r�r�r5�
__classcell__)r�s@r!rr�s����� � �0�K������4��4��
��
��
��
��L��Lr#c�2�]tRtRtRtRRltRRltRtR#)	ria�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�$�V^8�dQhRRRRRR/#)rr�r�packagefilezapt_pkg.PackageFilerrQr)r s"r!r"�Origin.__annotate__+s"��
!�
!�G�
!�2E�
!�$�
!r#c	��VPVnVPVnVPVnVPVnVPVnVP
VnVPVnVPPPV4pV'dVP'd
RVnR#RVnR#)TFN)�archive�	component�label�origin�codename�site�
not_automaticr��_list�
find_index�
is_trusted�trusted)rFr�r��	indexfiles&&& r!rV�Origin.__init__+s���"�*�*���$�.�.��� �&�&��
�!�(�(���#�,�,��
��$�$��	�(�6�6����K�K�%�%�0�0��=�	���-�-�-��D�L� �D�Lr#c��V^8�dQhRR/#rYr)r s"r!r"r�:s��
�
�#�
r#c
	��RVP:RVP:RVP:RVP:RVP:RVP
:R2
#)z<Origin component:z	 archive:z origin:z label:z site:z isTrusted:rB)r�r�r�r�r�r�r`s&r!rh�Origin.__repr__:s8��

�N�N��L�L��K�K��J�J��I�I��L�L�

�
	
r#)r�r�r�r�r�r�r�r�N)r0r1r2r3r4rVrhr5rr#r!rrs��
�
!�
�
r#c��]tRtRtRtRRltRRltRRltR	R
ltRRlt	R
Rlt
RRltRRRlltRRlt
RRltRtR#)riHa�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� �V^8�dQhRRRR/#)r�
record_strrrrQr)r s"r!r"�Record.__annotate__\s��3�3�3�3�4�3r#c	�<�\P!V4VnR#rJ)r)�
TagSection�_rec)rFr�s&&r!rV�Record.__init__\s���&�&�z�2��	r#c��V^8�dQhRR/#�rrrr)r s"r!r"r�_�����#�r#c	�,�\VP4#rJ)�hashr�r`s&r!�__hash__�Record.__hash___s���D�I�I��r#c��V^8�dQhRR/#rYr)r s"r!r"r�b������r#c	�,�\VP4#rJ)rr�r`s&r!ra�Record.__str__b����4�9�9�~�r#c� �V^8�dQhRRRR/#)r�keyrrr)r s"r!r"r�es����s��s�r#c	�(�VPV,#rJ�r��rFrs&&r!�__getitem__�Record.__getitem__es���y�y��~�r#c� �V^8�dQhRRRR/#)rrr>rrr)r s"r!r"r�hs�� � �� �4� r#c	��WP9#rJrrs&&r!�__contains__�Record.__contains__hs���i�i��r#c��V^8�dQhRR/#�rrz
Iterator[str]r)r s"r!r"r�ks��&�&�-�&r#c	�H�\VPP44#rJ)�iterr��keysr`s&r!�__iter__�Record.__iter__ks���D�I�I�N�N�$�%�%r#c��V^8�dQhRR/#)rrzIterable[tuple[object, str]]r)r s"r!r"r�ns��&�&�7�&r#c#
�|"�VPP4FpWPV,3x�K	R#5i)z6An iterator over the (key, value) items of the record.N)r�rrs& r!�	iteritems�Record.iteritemsns+����9�9�>�>�#�C��y�y��~�%�%�$�s�:<Nc�$�V^8�dQhRRRRRR/#)rrr�defaultr>rr)r s"r!r"r�ss!��+�+�s�+�V�+�v�+r#c
�8�VPPW4#)zoReturn record[key] if key in record, else *default*.

The parameter *default* must be either a string or None.
)r��get�rFrrs&&&r!r�
Record.getss��
�y�y�}�}�S�*�*r#c� �V^8�dQhRRRR/#)rrrrrr)r s"r!r"r�zs�� � �3� �4� r#c
��WP9#)z deprecated form of ``key in x``.rrs&&r!�has_key�Record.has_keyzs���i�i��r#c��V^8�dQhRR/#r�r)r s"r!r"r�~r�r#c	�,�\VP4#rJ)�lenr�r`s&r!�__len__�Record.__len__~r�r#rrJ)r0r1r2r3r4rVr�rarrrrrrr"r5rr#r!rrHs>���&3���� �&�&�
+� ��r#c��]tRtRtRtRRltRRltRRltR	R
ltRRlt	R
Rlt
RRltRRltRRlt
RRltRRlt]RRl4t]RRl4t]RRl4t]RR l4t]R!R"l4t]R#R$l4t]R%R&l4t]R'R(l4t]R)R*l4t]R+R,l4t]R-R.l4t]R/R0l4t]R1R2l4t]R3R4l4t]R5R6l4t]R7R8l4t ]R9R:l4t!]R;R<l4t"]R=R>l4t#R?R@lt$]RARBl4t%]RCRDl4t&]RERFl4t']RGRHl4t(]RIRJl4t)]RKRLl4t*]RMRNl4t+]RORPl4t,]RQRRl4t-]RSRTl4t.]RURVl4t/RWRXlt0]RYRZl4t1]R[R\l4t2RcR^R_llt3RdR`Rallt4Rbt5R]#)eri�z�Representation of a package version.

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

.. versionadded:: 0.7.9
c�$�V^8�dQhRRRRRR/#)rr�r�candzapt_pkg.VersionrrQr)r s"r!r"�Version.__annotate__�s!��5�5��5��5�4�5r#c	�|�WnW nVPPPP	V4R#rJ)r��_candr��
_weakversions�add)rFr�r&s&&&r!rV�Version.__init__�s*�����
������*�*�.�.�t�4r#c� �V^8�dQhRRRR/#)rr=rrz	int | Anyr)r s"r!r"r'�s��&�&�#�&�)�&r#c
��VPPpVPPpW#8dR#W#8�d^#\P!VPP
VP4# \dI\P!TPP
T4u# \d\uu#i;ii;i)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
���)
r��fullnamer)�version_comparer)�ver_strrO�AttributeError�	TypeError�NotImplemented)rFr=�	self_name�
other_names&&  r!�_cmp�Version._cmp�s���
	&����-�-�I����/�/�J��%��	��'���*�*�4�:�:�+=�+=�u�}�}�M�M���	&�
&��.�.�t�z�z�/A�/A�5�I�I���
&�%�%�
&��		&�s9�3A3�A3�4A3�3C�?*B,�)C�,C�=C�C�Cc� �V^8�dQhRRRR/#r<r)r s"r!r"r'�s��%�%�F�%�t�%r#c	�*�VPV4^8H#���r8rEs&&r!rD�Version.__eq__�����y�y���1�$�$r#c� �V^8�dQhRRRR/#�rr=rrrr)r s"r!r"r'����%�%�G�%��%r#c	�*�VPV4^8�#r<r>rEs&&r!�__ge__�Version.__ge__�r@r#c� �V^8�dQhRRRR/#rBr)r s"r!r"r'����$�$�G�$��$r#c	�*�VPV4^8�#r<r>rEs&&r!�__gt__�Version.__gt__�����y�y���!�#�#r#c� �V^8�dQhRRRR/#rBr)r s"r!r"r'�rCr#c	�*�VPV4^8*#r<r>rEs&&r!�__le__�Version.__le__�r@r#c� �V^8�dQhRRRR/#rBr)r s"r!r"r'�rHr#c	�*�VPV4^8#r<r>rEs&&r!�__lt__�Version.__lt__�rLr#c� �V^8�dQhRRRR/#)rr=r>rz
bool | Anyr)r s"r!r"r'�s��"�"�F�"�z�"r#c	�Z�VPV4^8g# \d
\u#i;ir<)r8r4r5rEs&&r!rK�Version.__ne__�s0��	"��9�9�U�#�q�(�(���	"�!�!�	"�s��*�*c��V^8�dQhRR/#r�r)r s"r!r"r'�r�r#c	�.�VPP#rJ)r)r�r`s&r!r��Version.__hash__�s���z�z���r#c��V^8�dQhRR/#rYr)r s"r!r"r'�s��5�5��5r#c	�L�VPPRVP2#)rC�r�rfrOr`s&r!ra�Version.__str__�s"���,�,�#�#�$�A�d�l�l�^�4�4r#c��V^8�dQhRR/#rYr)r s"r!r"r'�s��T�T�#�Tr#c	�T�RVPP:RVP:R2#)z<Version: package:z	 version:rBr]r`s&r!rh�Version.__repr__�s(��#�D�L�L�$5�$5�#8�	�$�,�,�AQ�QR�S�Sr#c��V^8�dQhRR/#)rrzapt_pkg.PackageRecordsr)r s"r!r"r'�s��-�-�0�-r#c
��VPPPPVPP
^,4'g\
R4hVPPP#)z=Internal helper that moves the Records to the right position.zCould not lookup record)r�r��_records�lookupr)�	file_list�LookupErrorr`s&r!rd�Version._records�sV���|�|�#�#�,�,�3�3�D�J�J�4H�4H��4K�L�L��7�8�8��|�|�#�#�,�,�,r#c��V^8�dQhRR/#)rrzapt_pkg.PackageRecords | Noner)r s"r!r"r'�s����%B�r#c
��VPPpVPPPPVPP^44'd!VPPP#R#)z2Internal helper to get the translated description.N)r)�translated_descriptionr�r�rdrerf�pop)rF�	desc_iters& r!�_translated_records�Version._translated_records�s^���J�J�5�5�	��<�<���(�(�/�/�	�0C�0C�0G�0G��0J�K�K��<�<�'�'�0�0�0�r#c��V^8�dQhRR/#r�r)r s"r!r"r'�s��3�3�D�3r#c
�@�\VPP4#)z1Return whether this version is a security update.)rr)�is_security_updater`s&r!rr�Version.is_security_update�s���D�J�J�1�1�2�2r#c��V^8�dQhRR/#r�r)r s"r!r"r'�s��)�)��)r#c
�.�VPP#)z.Return the size of the package when installed.)r)�installed_sizer`s&r!rv�Version.installed_size�s���z�z�(�(�(r#c��V^8�dQhRR/#rYr)r s"r!r"r'�s��&�&�#�&r#c
�.�VPP#)z$Return the homepage for the package.)rd�homepager`s&r!rz�Version.homepage�s���}�}�%�%�%r#c��V^8�dQhRR/#r�r)r s"r!r"r'�s����c�r#c
�.�VPP#)zReturn the size of the package.)r)rr`s&r!r�Version.size�����z�z���r#c��V^8�dQhRR/#rYr)r s"r!r"r'�s����c�r#c
�.�VPP#)z/Return the architecture of the package version.)r)�archr`s&r!�architecture�Version.architecture�rr#c��V^8�dQhRR/#r�r)r s"r!r"r'�s��-�-�d�-r#c
�@�\VPP4#)z:Return whether the version of the package is downloadable.)rr)�downloadabler`s&r!r��Version.downloadable�s���D�J�J�+�+�,�,r#c��V^8�dQhRR/#r�r)r s"r!r"r'�s��K�K�d�Kr#c
��VPPpVRJ;'d.VPPVPP8H#)z[Return wether this version of the package is currently installed.

.. versionadded:: 1.0.0
N)r��	installedr)�id)rF�inst_vers& r!r��Version.is_installed�s=���<�<�)�)���t�#�J�J����(9�(9�T�Z�Z�]�]�(J�Jr#c��V^8�dQhRR/#rYr)r s"r!r"r'���"�"��"r#c
�.�VPP#)zReturn the version as a string.)r)r2r`s&r!rO�Version.version����z�z�!�!�!r#c��V^8�dQhRR/#�rr�
str | Noner)r s"r!r"r'	s��C�C��Cr#c
�>�VPpVe
VP#R#)z0Return the short description (one line summary).N)rn�
short_desc)rF�recordss& r!�summary�Version.summarys%���*�*��%,�%8�w�!�!�B�d�Br#c��V^8�dQhRR/#rYr)r s"r!r"r's��'�'��'r#c
�.�VPP#)z"return the long description (raw).)rd�	long_descr`s&r!�raw_description�Version.raw_descriptions���}�}�&�&�&r#c��V^8�dQhRR/#rYr)r s"r!r"r'r�r#c
�.�VPP#)z"Return the section of the package.)r)�sectionr`s&r!r��Version.sectionr�r#c��V^8�dQhRR/#rYr)r s"r!r"r's��4�4�S�4r#c
�t�RpVPpVe
VPMRpV'g'\R4VPP,#\V\4'gVPR4p\TPR44p\T4TF�pTP4R8Xd#TPR4'g
TR,
pK:TPR	4'd:TPR4'gR
TR,,pMURTR,,pMDTPR
4'd,TPR4'gTR8XdTR,pMTpMTpY,
pK�	T# \d3p\R4TPPT3,uRp?#Rp?ii;i)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
:rNNz%s
r���NN)rnr��_r�rf�
isinstancer�decode�UnicodeDecodeErrorr
�split�next�strip�endswith�
startswith)rF�descr��dsc�err�lines�raw_line�lines&       r!�description�Version.descriptionst�����*�*��#*�#6�g���D����E�F����!�!��
�	)��c�3�'�'��j�j��)���S�Y�Y�t�_�%���U���H��~�~��3�&��}�}�T�*�*��F�N�D���"�"�4�(�(��}�}�T�*�*�#�h�r�l�2�D�!�H�R�L�0�D��$�$�S�)�)��=�=��&�&�$�"�*�#�B�<�D�#�D����L�D�-�.���?"�	)��Q�����"�"�C�(�)�
)��	)�s�'E:�:F7�'F2�,F7�2F7c��V^8�dQhRR/#rYr)r s"r!r"r'Ps��*�*�S�*r#c
��VPP;'gVPP# \dTPPu#i;i)z&Return the name of the source package.)rd�
source_pkgr��	shortname�
IndexErrorr`s&r!�source_name�Version.source_nameOsH��	*��=�=�+�+�E�E�t�|�|�/E�/E�E���	*��<�<�)�)�)�	*���6�6�!A�Ac��V^8�dQhRR/#rYr)r s"r!r"r'Xs��&�&��&r#c
��VPP;'gVPP# \dTPPu#i;i)z)Return the version of the source package.)rd�
source_verr)r2r�r`s&r!�source_version�Version.source_versionWsH��	&��=�=�+�+�A�A�t�z�z�/A�/A�A���	&��:�:�%�%�%�	&�r�c��V^8�dQhRR/#rYr)r s"r!r"r'`s��'�'�#�'r#c
�.�VPP#)z.Return the priority of the package, as string.)r)�priority_strr`s&r!�priority�Version.priority_s���z�z�&�&�&r#c��V^8�dQhRR/#r�r)r s"r!r"r'es��N�N��Nr#c
��VPPPPP	VP
4#)zrReturn the internal policy priority as a number.
See apt_preferences(5) for more information about what it means.
)r�r��	_depcache�policy�get_priorityr)r`s&r!�policy_priority�Version.policy_priorityds/��
�|�|�#�#�-�-�4�4�A�A�$�*�*�M�Mr#c��V^8�dQhRR/#)rrrr)r s"r!r"r'ls��,�,��,r#c
�@�\VPP4#)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
)rrd�recordr`s&r!r��Version.recordks���d�m�m�*�*�+�+r#c� �V^8�dQhRRRR/#)r�typesrr�list[Dependency]r)r s"r!r"r'ts����s��/?�r#c	
��.pVPPpVFSpW4,FCp.pVFpVP\W44K	VP\	WV44KE	KU	V# \
dKgi;i)aReturn 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_listr�rr�KeyError)rFr�r��depends�type_�dep_ver_listr��dep_ors&*      r!�get_dependencies�Version.get_dependenciests������*�*�)�)���E�
�$+�N�N�L� "�I�".��!�(�(���)E�F�#/� �'�'�
�4�E�(J�K�	%3������
��
�s�AA4�4B�Bc��V^8�dQhRR/#�rrz	list[str]r)r s"r!r"r'�s��8�8�)�8r#c
�d�VPPUu.uFq^,NK
	up#uupi)z2Return a list of names that this version provides.)r)�
provides_list)rF�ps& r!�provides�Version.provides�s,��#�j�j�6�6�7�6��!���6�7�7��7s�-c��V^8�dQhRR/#�rrr�r)r s"r!r"r'����1�1�*�1r#c
�$�VPR4#)z4Return the list of enhances for the package version.�Enhances�r�r`s&r!�enhances�Version.enhances�����$�$�Z�0�0r#c��V^8�dQhRR/#r�r)r s"r!r"r'�s��>�>�.�>r#c
�&�VPRR4#)z/Return the dependencies of the package version.r��Dependsr�r`s&r!�dependencies�Version.dependencies�s���$�$�\�9�=�=r#c��V^8�dQhRR/#r�r)r s"r!r"r'�s��3�3�,�3r#c
�$�VPR4#)z-Return the recommends of the package version.�
Recommendsr�r`s&r!�
recommends�Version.recommends�s���$�$�\�2�2r#c��V^8�dQhRR/#r�r)r s"r!r"r'�r�r#c
�$�VPR4#)z+Return the suggests of the package version.�Suggestsr�r`s&r!�suggests�Version.suggests�r�r#c��V^8�dQhRR/#)rrzlist[Origin]r)r s"r!r"r'�s�����r#c
��.pVPPF*wr#VP\VPV44K,	V#)z1Return a list of origins for the package version.)r)rfr�rr�)rF�originsr��_unuseds&   r!r�Version.origins�s<����$(�J�J�$8�$8� �K��N�N�6�$�,�,��<�=�%9��r#c��V^8�dQhRR/#rYr)r s"r!r"r'�s��&�&�#�&r#c
�.�VPP#)zJReturn the path to the file inside the archive.

.. versionadded:: 0.7.10
)rd�filenamer`s&r!r
�Version.filename�����}�}�%�%�%r#c��V^8�dQhRR/#rYr)r s"r!r"r'�s��&�&�S�&r#c
�.�VPP#)z;Return the md5sum of the binary.

.. versionadded:: 0.7.10
)rd�md5_hashr`s&r!�md5�Version.md5�rr#c��V^8�dQhRR/#rYr)r s"r!r"r'�s��'�'�c�'r#c
�.�VPP#)z<Return the sha1sum of the binary.

.. versionadded:: 0.7.10
)rd�	sha1_hashr`s&r!�sha1�Version.sha1�s���}�}�&�&�&r#c��V^8�dQhRR/#rYr)r s"r!r"r'�s��)�)��)r#c
�.�VPP#)z>Return the sha256sum of the binary.

.. versionadded:: 0.7.10
)rd�sha256_hashr`s&r!�sha256�Version.sha256�s���}�}�(�(�(r#c��V^8�dQhRR/#)rrzset[str]r)r s"r!r"r'�s��0�0�x�0r#c
�V�\VPR,P44#)zqGet the tasks of the package.

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

.. versionadded:: 0.8.0
�Task)�setr�r�r`s&r!�tasks�
Version.tasks�s!���4�;�;�v�&�,�,�.�/�/r#c��V^8�dQhRR/#rr)r s"r!r"r'�s��D�D�}�Dr#c#
�"�VPPFewrVPPPPV4pV'gK>VP
VPP4x�Kg	R#5i)zFReturn an iterator over all available urls.

.. versionadded:: 0.7.10
N)	r)rfr�r�r�r��archive_urirdr
)rFr�r	r�s&   r!�_uris�
Version._uris�s^���
%)�J�J�$8�$8� �K����,�,�2�2�=�=�k�J�I��y��+�+�D�M�M�,B�,B�C�C�%9�s�AB�-Bc��V^8�dQhRR/#r�r)r s"r!r"r'�s��"�"�i�"r#c
�4�\VP44#)zNReturn a list of all available uris for the binary.

.. versionadded:: 0.7.10
)�listr(r`s&r!�uris�Version.uris�s���D�J�J�L�!�!r#c��V^8�dQhRR/#r�r)r s"r!r"r'�s����Z�r#c
�l�\\VP444# \dR#i;i)z>Return a single URI for the binary.

.. versionadded:: 0.7.10
N)r�r
r(�
StopIterationr`s&r!�uri�Version.uri�s/��	���T�Z�Z�\�*�+�+���	��	�s�!$�3�3Nc�(�V^8�dQhRRRRRRRR/#)r�destdirr�progress�AcquireProgress | None�allow_unauthenticated�bool | Nonerr)r s"r!r"r'�s8��@)�@)��@)�)�@)� +�	@)�


�@)r#c
��Vf!\PPRR4p\PPVPP4p\PPW4p\WPPVPP4'd=\P!RV,4\PPV4#VPP ^,wrgVP"P$P&P)V4pV'g\V'dVP*'gB\-RVP"P.:RVP0:R\3VRR4:R	24hVP4'g\7R
4hVPPp	V'g%V	P8'g\-RV,4h\P:!T;'g)\<P>P@PC44p
\PD!W�P4W�PWER7pV
PG4VPHVPJ8wd(\MR
VPN:RVPP:24h\PPV4#)a�Fetch 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
�APT::Get::AllowUnauthenticatedF�"Ignoring already existing file: %s�Could not fetch r�� source package: Source �describez	<unknown>� 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_br%r�basenamerdr
r�r,rr�logging�debug�abspathr)rfr�r�r�r�r�r7rfrO�getattrr2�
ValueError�usable�Acquire�aptr6�textr
�AcquireFile�run�status�	STAT_DONEr.rC�
error_text)rFr5r6r8�baserC�pfile�offset�indexr�acq�acqfiles&&&&        r!�fetch_binary�Version.fetch_binary�s���*!�(�$+�N�N�$9�$9�3�U�%�!��w�w����
�
� 6� 6�7���7�7�<�<��.����9�9�d�m�m�.B�.B�C�C��M�M�>��I�J��7�7�?�?�8�,�,��
�
�,�,�Q�/�
�����$�$�*�*�5�5�e�<��%�%�E�4D�4D�4D� ��L�L�%�%��L�L��E�:�{�;���
��x�x�x��6�7�7����%�%��%����� �M�PX�X��
��o�o�h�M�M�#�,�,�*;�*;�*K�*K�*M�N���%�%����6�9�9�d�
��	���	��>�>�W�.�.�.���#�#�W�%7�%7�9��
�
�w�w���x�(�(r#c
�,�V^8�dQhRRRRRRRRR	R/#)
rr5rr6r7�unpackrr8r9rr)r s"r!r"r'4sC��^(�^(��^(�)�^(��	^(�
 +�^(�

�
^(r#c
�`�Vf!\PPRR4p\P!4p\P!T;'g)\
PPP44pRpVPpVP;'gVPPp	VP;'gVPPp
VP!V	4pV'd$W�P"8wdVP!V	4pK+V'g\%RV,4h\'4pV'ggVP(P*'gK\-RVPP.:RVP":RVP(P0:R24hVP2EF<p
\4P6P9V
P64p\4P6P;W4pV
P<R	8XdTp\?W�P@V
PB4'd \DPF!R
V,4K�V'g/V
PBPH'g\-RV,4hVPK\PL!VVP(POV
P64V
PBV
P@VVR74EK?	VPQ4Vf\%RV,4hVPRFEpVPTVPV8wgK \YR
VPZ:RVP\:24h	V'd�VPR,\P^!VP"4,p\4P6P;VV4p\`Pb!RRVV.4\4P6PeV4#\4P6PeV4#)a�Get 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`.
Nr;FzNo source for %rr=r�r>r@r�r<rArBrDrE�-zdpkg-sourcez-x)3r)rFrG�
SourceRecordsrOrPr6rQr
rdr�r�r�r�r)r2rerOrMr,rZr�r7rfr?�filesr%rrHr��typer,rrrIrJrNr�rRr'rS�itemsrTrUr.rCrV�upstream_version�
subprocess�
check_callrK)rFr5r6r`r8�srcr[r�r�r�r��
source_lookuprd�filrWrC�item�outdirs&&&&&             r!�fetch_source�Version.fetch_source4s���4!�(�$+�N�N�$9�$9�3�U�%�!��#�#�%���o�o�h�M�M�#�,�,�*;�*;�*K�*K�*M�N���������'�'�A�A�4�<�<�+A�+A���*�*�@�@�d�j�j�.@�.@���
�
�;�/�
���+�+� =��J�J�{�3�M���/�$�6�7�7����%����)=�)=�)=� ��<�<�$�$�d�l�l�C�I�I�4F�4F�H��
�
�9�9�C��7�7�#�#�C�H�H�-�D��w�w�|�|�G�2�H��x�x�5� ����X�x�x����<�<��
�
�B�X�M�N��)�S�Z�Z�->�->�->�$�-�/7�8���
�L�L��#�#���I�I�)�)�#�(�(�3��J�J��H�H��%�
�	
��0	���	��;��/�$�6�7�7��I�I�D��{�{�d�n�n�,� ��}�}�d�o�o�7������[�[�3�&��)A�)A�#�+�+�)N�N�F��W�W�\�\�'�6�2�F��!�!�=�$��V�"D�E��7�7�?�?�6�*�*��7�7�?�?�3�'�'r#)r)r�)r�NN)r�NTN)6r0r1r2r3r4rVr8rDrErJrOrSrKr�rarhr�rdrnrrrvrzrr�r�r�rOr�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr
rrrr#r(r-r2r]ror5rr#r!rr�s����5�
&�:%�%�$�%�$�"��5�T��-��-������3��3��)��)��&��&����������-��-��K��K��"��"��C��C�
�'��'��"��"��4��4�l�*��*��&��&��'��'��N��N��,��,��,�8��8��1��1��>��>��3��3��1��1������&��&��&��&��'��'��)��)��0��0�D��"��"�����@)�D^(�^(r#c��]tRtRtRtRRRlltRRltRR	ltR
RltRR
lt	RRlt
RRltRRltRRlt
RRRlltRtR#)ri�agProvide 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�$�V^8�dQhRRRRRR/#)rr�r�slice_zslice | NonerrQr)r s"r!r"�VersionList.__annotate__�s!��4�4��4��4��4r#c	��WnVPPVnV'dVPV,VnR#R#rJ)�_packager��version_list�	_versions)rFr�rss&&&r!rV�VersionList.__init__�s0���
� ���2�2����!�^�^�F�3�D�N�r#c� �V^8�dQhRRRR/#)rrmzint | slice | strrrr)r s"r!r"rt�s��
:�
:� 1�
:�c�
:r#c	�x�\V\4'dVPVPV4#\	VPVP
V,4# \dBTP
F.pTPT8XgK\	TPT4uu#	Mi;i\RT,4h)zVersion: %r not found.)	r��slicer�rvrrxr4r2r��rFrm�vers&& r!r�VersionList.__getitem__�s����d�E�"�"��>�>�$�-�-��6�6�	7��4�=�=�$�.�.��*>�?�?���	7��~�~���;�;�$�&�"�4�=�=�#�6�6�&�	7��
�/�4�8�9�9s�&A�(B'�B'�"B'�&B'c��V^8�dQhRR/#rYr)r s"r!r"rt�s��>�>��>r#c	�@�RRPRV44,#)z[%s]r�c3�8"�TFp\V4x�K	R#5irJ)r)r�r~s& r!r��&VersionList.__str__.<locals>.<genexpr>�s���"<�t��3�s�8�8�t�r�r�r`s&r!ra�VersionList.__str__�s������"<�t�"<�<�=�=r#c��V^8�dQhRR/#rYr)r s"r!r"rt�s��1�1�#�1r#c	�0�RVP4,#)z<VersionList: %r>)rr`s&r!rh�VersionList.__repr__�s��"�T�Y�Y�[�0�0r#c��V^8�dQhRR/#)rrzIterator[Version]r)r s"r!r"rt�s��G�G�+�Gr#c
�0a�V3RlSP4#)z*Return an iterator over all value objects.c3�P<"�TFp\SPV4x�K	R#5irJ)rrv)r�r~rFs& �r!r��'VersionList.__iter__.<locals>.<genexpr>�s����F�~����
�
�s�+�+�~�s�#&)rxr`sfr!r�VersionList.__iter__�s���F�t�~�~�F�Fr#c� �V^8�dQhRRRR/#)rrmr>rrr)r s"r!r"rt�s������D�r#c	��\V\4'd
VPpVPFpVPV8XgKR#	R#�TF)r�rrOrxr2r}s&& r!r�VersionList.__contains__�s:���d�G�$�$��<�<�D��>�>�C��{�{�d�"��"�r#c� �V^8�dQhRRRR/#)rr=rrrr)r s"r!r"rt�s��)�)�C�)�D�)r#c	�0�\V4\V48H#rJ)r,rEs&&r!rD�VersionList.__eq__�s���D�z�T�%�[�(�(r#c��V^8�dQhRR/#r�r)r s"r!r"rt�s��#�#��#r#c	�,�\VP4#rJ)r!rxr`s&r!r"�VersionList.__len__�s���4�>�>�"�"r#c��V^8�dQhRR/#r�r)r s"r!r"rt�s��7�7�i�7r#c
�V�VPUu.uFqPNK	up#uupi)z*Return a list of all versions, as strings.)rxr2)rFr~s& r!r�VersionList.keys�s ��'+�~�~�6�~����~�6�6��6s�&c�$�V^8�dQhRRRRRR/#)rrrr�Version | Nonerr)r s"r!r"rt�s!����s��^��~�r#c
�:�W,# \dTu#i;i)zReturn the key or the default.)rgrs&&&r!r�VersionList.get�s#��	��9����	��N�	�s�
�
�)rvrxrJ)r0r1r2r3r4rVrrarhrrrDr"rrr5rr#r!rr�s?���&4�
:�>�1�G��)�#�
7��r#c���]tRtRtRtRRltRRltRRltR	R
lt]	RRl4t
]
PR
Rl4t
]	RRl4t]	RRl4t
]	RRl4t]	RRl4t]	RRl4t]	RRl4tRRlt]	RRl4t]	RR l4t]	R!R"l4t]	R#R$l4t]	R%R&l4t]	R'R(l4t]	R)R*l4t]	R+R,l4t]	R-R.l4t]	R/R0l4t]	R1R2l4t]	R3R4l4tRMR6R7llt]	R8R9l4t ]	R:R;l4t!]	R<R=l4t"]	R>R?l4t#R@RAlt$RNRBRCllt%RORDREllt&RPRFRGllt'RPRHRIllt(RJRKlt)RLt*R5#)Qri�z�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�$�V^8�dQhRRRRRR/#)r�pcachez	apt.Cache�pkgiterzapt_pkg.PackagerrQr)r s"r!r"�Package.__annotate__�s!����y��?��t�r#c
�,�W nWnRVnR#)zInit the Package objectr�N)r�r��
_changelog)rFr�r�s&&&r!rV�Package.__init__�s���	�����r#c��V^8�dQhRR/#rYr)r s"r!r"r��s�����r#c	��VP#rJ�rfr`s&r!ra�Package.__str__�s���y�y�r#c��V^8�dQhRR/#rYr)r s"r!r"r��s��
�
�#�
r#c	��RPVPPVPPVPP4#)z.<Package: name:{!r} architecture={!r} id:{!r}>)r r�rfr�r�r`s&r!rh�Package.__repr__�s8��?�F�F��I�I�N�N��I�I�"�"��I�I�L�L�
�	
r#c� �V^8�dQhRRRR/#)rr=rrrr)r s"r!r"r��s��&�&�G�&��&r#c	�4�VPVP8#rJr�rEs&&r!rS�Package.__lt__�s���y�y�5�:�:�%�%r#c��V^8�dQhRR/#�rrr�r)r s"r!r"r�s��
�
�>�
r#c
��VPPPVP4pVe\	W4#R#)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)r�r��get_candidate_verr�r)rFr&s& r!�	candidate�Package.candidates6���|�|�%�%�7�7��	�	�B�����4�&�&�r#c� �V^8�dQhRRRR/#)rrOrrrQr)r s"r!r"r�s��)�)��)�T�)r#c
���VPP4VPPPVPVP
4VPP
4R#)z)Set the candidate version of the package.N)r��cache_pre_changer��set_candidate_verr�r)�cache_post_change)rFrOs&&r!r�r�
sF��	
���%�%�'������0�0����G�M�M�J����&�&�(r#c��V^8�dQhRR/#r�r)r s"r!r"r�s����>�r#c
�t�VPPe \WPP4#R#)zPReturn the currently installed version of the package.

.. versionadded:: 0.7.9
N)r��current_verrr`s&r!r��Package.installeds,���9�9� � �,��4���!6�!6�7�7�r#c��V^8�dQhRR/#rYr)r s"r!r"r�s��,�,�c�,r#c
�8�VPPR4#)aEReturn 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�r��get_fullnamer`s&r!rf�Package.names���y�y�%�%�d�+�+r#c��V^8�dQhRR/#rYr)r s"r!r"r�.s��-�-�#�-r#c
�8�VPPR4#)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�r`s&r!r0�Package.fullname-s���y�y�%�%�e�,�,r#c��V^8�dQhRR/#rYr)r s"r!r"r�8s����3�r#c
�.�VPP#)zRReturn the name of the package, without architecture.

.. versionadded:: 0.7.100.3)r�rfr`s&r!r��Package.shortname7s��
�y�y�~�~�r#c��V^8�dQhRR/#r�r)r s"r!r"r�?s����C�r#c
�.�VPP#)zfReturn a uniq ID for the package.

This can be used eg. to store additional information about the pkg.)r�r�r`s&r!r��
Package.id>s��
�y�y�|�|�r#c��V^8�dQhRR/#r�r)r s"r!r"r�Fs��#�#�4�#r#c
�.�VPP#)z>Return True if the package is an essential part of the system.)r��	essentialr`s&r!r��Package.essentialEs���y�y�"�"�"r#c��V^8�dQhRR/#rYr)r s"r!r"r�Js��
&�
&�c�
&r#c
�.�VPP#)a�Return 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.
)r�r�r`s&r!r��Package.architectureJs���y�y�%�%�%r#c��V^8�dQhRR/#r�r)r s"r!r"r�\���@�@��@r#c
�`�VPPPVP4#)z5Return ``True`` if the package is marked for install.)r�r��marked_installr�r`s&r!r��Package.marked_install[�#���|�|�%�%�4�4�T�Y�Y�?�?r#c��V^8�dQhRR/#r�r)r s"r!r"r�ar�r#c
�`�VPPPVP4#)z5Return ``True`` if the package is marked for upgrade.)r�r��marked_upgrader�r`s&r!r��Package.marked_upgrade`r�r#c��V^8�dQhRR/#r�r)r s"r!r"r�f���?�?�t�?r#c
�`�VPPPVP4#)z4Return ``True`` if the package is marked for delete.)r�r��
marked_deleter�r`s&r!r��Package.marked_deletee�#���|�|�%�%�3�3�D�I�I�>�>r#c��V^8�dQhRR/#r�r)r s"r!r"r�ks��=�=�T�=r#c
�`�VPPPVP4#)z2Return ``True`` if the package is marked for keep.)r�r��marked_keepr�r`s&r!r��Package.marked_keepjs#���|�|�%�%�1�1�$�)�)�<�<r#c��V^8�dQhRR/#r�r)r s"r!r"r�p���B�B�$�Br#c
�`�VPPPVP4#)zPackage is marked for downgrade)r�r��marked_downgrader�r`s&r!r��Package.marked_downgradeo�#���|�|�%�%�6�6�t�y�y�A�Ar#c��V^8�dQhRR/#r�r)r s"r!r"r�ur�r#c
�`�VPPPVP4#)z7Return ``True`` if the package is marked for reinstall.)r�r��marked_reinstallr�r`s&r!r��Package.marked_reinstalltr�r#c��V^8�dQhRR/#r�r)r s"r!r"r�zs��1�1�d�1r#c
�2�VPPRJ#)z,Return ``True`` if the package is installed.N)r�r�r`s&r!r��Package.is_installedys���y�y�$�$�D�0�0r#c��V^8�dQhRR/#r�r)r s"r!r"r�s��U�U�t�Ur#c
��VP;'d0VPPPVP4#)z-Return ``True`` if the package is upgradable.)r�r�r��
is_upgradabler�r`s&r!r��Package.is_upgradable~s1��� � �T�T�T�\�\�%;�%;�%I�%I�$�)�)�%T�Tr#c��V^8�dQhRR/#r�r)r s"r!r"r��s��	;�	;�4�	;r#c
��VP;'gVP;'d0VPPP	VP
4#)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.
)r�r�r�r��
is_garbager�r`s&r!�is_auto_removable�Package.is_auto_removable�sF��
���4�4��!4�!4�;�;��l�l�$�$�/�/��	�	�:�	;r#c��V^8�dQhRR/#r�r)r s"r!r"r��s��C�C�4�Cr#c
�`�VPPPVP4#)z@Return whether the package is marked as automatically installed.)r�r��is_auto_installedr�r`s&r!r�Package.is_auto_installed�s#���|�|�%�%�7�7��	�	�B�Br#c��V^8�dQhRR/#r�r)r s"r!r"r��s��A�A��Ar#c
�`�VPPPVP4#)z6Return ``True`` if the package update is being phased.)r�r��phasing_appliedr�r`s&r!r�Package.phasing_applied�s#���|�|�%�%�5�5�d�i�i�@�@r#c��V^8�dQhRR/#r�r)r s"r!r"r��s�����r#c
�Z�VPVP3FhpRV,p\VR4;_uu_4pVP4P	R4P4P
R4uuRRR4u#	.# +'giK;i \dK�i;i)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�rbr�r�N)rfr0r(�readr�r�r��OSError)rFrfrrfs&   r!�installed_files�Package.installed_files�s����I�I�t�}�}�,�D�/�$�6�D�
��$��%�%��$�>�>�+�2�2�7�;�A�A�C�I�I�$�O�&�%�-��	�&�%�%���
��
�s.�B�<B�6
B�B�B�B�B*�)B*Nc�$�V^8�dQhRRRRRR/#)rr2r��cancel_lockzthreading.Event | Nonerrr)r s"r!r"r��s)��y�y��y�3I�y�	�yr#c	
���VPR8wd
VP#VP'g\R4#Vf�VPP^,PR8XdRpMcVPP^,PR8XdRpM4\R4p\V\4'dV#VPR4#VPPpR	pVPPpVPPp\P!4pVPV4'd�VP'gK+VPPVP8XdVPpVPpMC\P!VPV4^8�gK�VPpVPpK�VP#R
^4p	\%V	4^8�d
V	^,p?	V^,p
VP'R4'dRV^,,p
VP#R^4p\%V4^8�dRP)VR
,4p?VRVRV
RVRV/,p\*P,!4p\*P.!^4V'd0VP14'd\*P.!V4R#\3V4p
RpR\4P6!V4,pV'd0VP14'd\*P.!V4R#V
P94pV'gM�VPR4p\4P:!VV4pV'd�\=VP>RR4pV'd!RV9dVP#R^4^,pVPA^4pV'd!RV9dVP#R^4^,pV'd\P!VV4^8:dMVV,
pEK*\%V4^8Xd3\R4p\V\4'gVPR4pW�n\*P.!T4TP# \ dEL�i;i \Bd�TPP^,PR8Xd\R4YG3,pM\R4p\T\4'dTu\*P.!T4#TPR4u\*P.!T4#\D\F3df\R4p\T\4'dTu\*P.!T4#TPR4u\*P.!T4#i;i \*P.!T4i;i)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.
r�z$The list of changes is not availableN�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�/�lib�:r��src_section�prefix�src_pkg�src_verz^%s \((.*)\)(.*)$rOz�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�r�rr�r�rr�r�r�r�r)rcrerOr1�SystemErrorr�r!r�r��socket�getdefaulttimeout�setdefaulttimeout�is_setr�re�escape�readline�matchrLr��groupr
r
r)rFr2r�resrrr�r�src_records�
section_splitr�
src_ver_split�timeout�changelog_file�	changelog�regexp�line_rawr�r"r��
changelog_vers&&&                  r!�
get_changelog�Package.get_changelog�s��(�?�?�b� ��?�?�"��~�~�~��;�<�<��;��~�~�%�%�a�(�/�/�8�;�9��
���'�'��*�1�1�X�=�9���>�?���c�3�'�'��J��:�:�g�.�.��.�.�,�,�����.�.�(�(���.�.�/�/��	2�
"�/�/�1�K��$�$�W�-�-�"�*�*�*���>�>�0�0�K�4G�4G�G�)�1�1�G�)�1�1�G���*�*�;�+>�+>��H�1�L�)�1�1�G�)�1�1�G�.� �
�
�c�1�-�
��}���!�'��*�K���������e�$�$��W�Q�Z�'�F� �
�
�c�1�-�
��}���!��g�g�m�B�/�0�G����;��f��w��w�	
�
���*�*�,��N	.�K
/��(�(��+��;�#5�#5�#7�#7��N
�$�$�W�-�K")�����	�.�"�)�)�G�2D�E���"�{�'9�'9�';�';�!�|
�$�$�W�-�y .�6�6�8�H�#��$�?�?�7�3�D��H�H�V�T�2�E��%,�D�N�N�I�t�$L�	�$��	�)9�(1����Q�(?��(B�I�(-���A��
�(�S�M�-A�,9�,?�,?��Q�,G��,J�M�&� '� 7� 7�
�y� Q�UV� V�!���%�I��y�>�Q�&� !�"H� I�I�%�i��5�5�$-�$4�$4�W�$=�	�"+��8
�$�$�W�-������u�	��	��~�
/��>�>�)�)�!�,�3�3�x�?��!��!�*�+�C��B�C�C��c�3�'�'��J�
�$�$�W�-��:�:�g�.�.�
�$�$�W�-��]�+�
/��6����c�3�'�'��J�
�$�$�W�-��:�:�g�.�.��$�$�W�-�
/��
�$�$�W�-�s��R"�R4�4R4�#2R4�R4�R4�0R4�AR4�&'R4�A1R4�"R1�0R1�4A.W�"W�:W�W�#W�2$W�W�.W�?W�W�W�W3c��V^8�dQhRR/#)rrrr)r s"r!r"r�hs��!�!�+�!r#c
��\V4#)zSReturn a VersionList() object for all available versions.

.. versionadded:: 0.7.9
)rr`s&r!�versions�Package.versionsgs���4� � r#c��V^8�dQhRR/#r�r)r s"r!r"r�pr�r#c
�`�VPPPVP4#)z5Return True if the to-be-installed package is broken.)r�r��is_inst_brokenr�r`s&r!r6�Package.is_inst_brokenor�r#c��V^8�dQhRR/#r�r)r s"r!r"r�ur�r#c
�`�VPPPVP4#)z/Return True if the installed package is broken.)r�r��
is_now_brokenr�r`s&r!r:�Package.is_now_brokentr�r#c��V^8�dQhRR/#r�r)r s"r!r"r�zs��H�H�$�Hr#c
�P�VPP\P8H#)z8Checks whether the package is is the config-files state.)r��
current_stater)�CURSTATE_CONFIG_FILESr`s&r!�has_config_files�Package.has_config_filesys���y�y�&�&�'�*G�*G�G�Gr#c��V^8�dQhRR/#)rrrQr)r s"r!r"r��s��)�)�4�)r#c
���VPP4VPPPVP4VPP4R#)zMark a package for keep.N)r�r�r��	mark_keepr�r�r`s&r!rD�Package.mark_keep�s>�����%�%�'������(�(����3����&�&�(r#c�$�V^8�dQhRRRRRR/#)r�auto_fixr�purgerrQr)r s"r!r"r��s!��)�)�D�)��)��)r#c
�>�VPP4VPPPVPV4V'd�VPPP
^8�d�\P!VPP4pVPVP4VPVP4VPVP4VP4VPP4R#)aMark 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.
N)
r�r�r��mark_deleter��broken_countr)�ProblemResolver�clear�protect�remove�resolver�)rFrGrH�fixs&&& r!rJ�Package.mark_delete�s���	
���%�%�'������*�*�4�9�9�e�<�����.�.�;�;�a�?��)�)�$�,�,�*@�*@�A�C��I�I�d�i�i� ��K�K��	�	�"��J�J�t�y�y�!��K�K�M����&�&�(r#c�(�V^8�dQhRRRRRRRR/#)rrGr�	auto_inst�	from_userrrQr)r s"r!r"r��s,��)�)��)�04�)�HL�)�	
�)r#c
�
�VPP4VPPPVPW#4V'd�VPPP
^8�dr\P!VPP4pVPVP4VPVP4VPR4VPP4R#)a�Mark 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.
TN)r�r�r��mark_installr�rKr)rLrMrNrPr�)rFrGrTrU�fixers&&&& r!rW�Package.mark_install�s��� 	
���%�%�'������+�+�D�I�I�y�L�����.�.�;�;�a�?��+�+�D�L�L�,B�,B�C�E��K�K��	�	�"��M�M�$�)�)�$��M�M�$�����&�&�(r#c� �V^8�dQhRRRR/#)rrUrrrQr)r s"r!r"r��s����d��d�r#c
��VP'd2VPpVPVR7VPV4R#\P
P
RVPP,4R#)zMark a package for upgrade.)rUz4MarkUpgrade() called on a non-upgradeable pkg: '%s'
N)	r�rrW�	mark_auto�sys�stderr�writer�rf)rFrU�autos&& r!�mark_upgrade�Package.mark_upgrade�s]�������)�)�D����	��2��N�N�4� �
�J�J���K��)�)�.�.�!�
r#c� �V^8�dQhRRRR/#)rr`rrrQr)r s"r!r"r��s��:�:�d�:�d�:r#c
�f�VPPPVPV4R#)z�Mark 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)r�r�r\r�)rFr`s&&r!r\�Package.mark_auto�s"��	
�����(�(����D�9r#c�$�V^8�dQhRRRRRR/#)r�	fprogressr
�	iprogressrrrQr)r s"r!r"r��s"��	<�	<��	<�O�	<�PT�	<r#c
�P�VPPPW4R#)z�Commit 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)r�r��commit)rFrgrhs&&&r!rj�Package.commit�s��	
�����%�%�i�;r#)r�r�r�)NNr�)TTT)T)+r0r1r2r3r4rVrarhrSr�r��setterr�rfr0r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr.r2r6r:r@rDrJrWrar\rjr5rr#r!rr�sB�����
�&��
��
����)��)������,��,��-��-����������#��#�
&�"�@��@��@��@��?��?��=��=��B��B��B��B��1��1��U��U��	;��	;��C��C��A��A����� y�v�!��!��@��@��?��?��H��H�)�)�()�4�:�	<�	<r#c�
�\R4^RIp\P!4\P
PP4p\P!V4pVR,p\RVP,4\RVP,4\RVPP,4\RVPP,4\RVPP,4\R	VPP,4\R
VPP,4\RVPP ,4\RVPP",4\R
VP$,4\RVPP&,4\RVPP(,4\RVPP*,4\RVPP,,4\RVPP.,4\RVPP0,4\RVPP2,4VPP0F.p\RP5RVP6444K0	\RVPP8,4\RVPP:,4\RVPP<4\VR,P?44R!F�p\RV4VFApVP@'gKVPC^^4^8XgK0VPEV4KC	\RVPFPH,4\RVPFPJ,4K�	\4R!F�p\RV,4\P!V4pVPM4F4pVPC^^4^8XgKW&,POV4K6	\RVPFPH,4\R VPFPR,4K�	R# \Pd\RT,4K�i;i)"z
Self-test.zSelf-test for the Package modulNz	apt-utilsz	Name: %s zID: %s zPriority (Candidate): %s zPriority (Installed): %s zInstalled: %s zCandidate: %s zCandidateDownloadable: %szCandidateOrigins: %szSourcePkg: %s zSection: %s zSummary: %szDescription (formatted) :
%szDescription (unformatted):
%szInstalledSize: %s zPackageSize: %s zDependencies: %szRecommends: %s�,c	3�"�TF;pVPRVPRVPRVPR2x�K=	R#5i)z (z) (�)N)rfrOrgr�)r��os& r!r��_test.<locals>.<genexpr>�s@����,�A��6�6�(�"�Q�Y�Y�K�s�1�:�:�,�c�!�,�,��q�I�,�s�AAzarch: %szhomepage: %szrec: �2vcardz8Running install on random upgradable pkgs with AutoFix: zBroken: %s zInstCount: %s z.Randomly remove some packages with AutoFix: %szError trying to remove: %s z
DelCount: %s r�)*�print�randomr)�initrPr6rQ�
OpProgress�Cacherfr�r�r�r�rOr�rr�r�r�r�r�rvrr�r�r�r�r�rzr�r.r��randintrWr�rK�
inst_countrrJr�	del_count)rur6r�r�rP�irfs       r!�_testr}�s���
�
+�,���L�L�N��|�|� � �+�+�-�H��I�I�h��E�
��
�C�	�+����
 �!�	�)�c�f�f�
��	�
%��
�
�(>�(>�
>�?�	�
%��
�
�(>�(>�
>�?�	�
�S�]�]�2�2�
2�3�	�
�S�]�]�2�2�
2�3�	�
%��
�
�(B�(B�
B�C�	�
 �3�=�=�#8�#8�
8�9�	�
�S�]�]�6�6�
6�7�	�.�3�;�;�
&�'�	�-�#�-�-�/�/�
/�0�	�
)�C�M�M�,E�,E�
E�F�	�
*�S�]�]�-J�-J�
J�K�	�
����!=�!=�
=�>�	�
�s�}�}�1�1�
1�2�	�
�s�}�}�9�9�
9�:�	�
�S�]�]�5�5�
5�6��}�}�)�)��
��H�H���,�,��
�	
�*�
�*�s�}�}�1�1�
1�2�	�.�3�=�=�1�1�
1�2�	�'�3�=�=�'�'�(�	�%��/�
'�
'�
)�*�
��
�H�!�L��C�� � � ��>�>�!�Q�'�1�,��$�$�Q�'��	�m�e�o�o�:�:�:�;�
�����!;�!;�;�<��
�G�
��
�>��B�C��	�	�(�#���J�J�L�D��~�~�a��#�q�(�@��K�+�+�A�.�!�	�m�e�o�o�:�:�:�;�
�o���� 9� 9�9�:���#�@��7�$�>�?�@�s�4T!�!U�U�__main__)rrrrrrr)/r4�
__future__rrIr%rrrhr]�	threading�collections.abcrrrr�http.clientr�typingrr	�urllib.errorr
�urllib.requestrr)rr��apt.progress.textrP�apt.progress.baser
r�__all__r,�	Exceptionr.r7rr,rrrrrrr}r0rr#r!�<module>r�s���*)�"��	�	�
��
��A�A�%�%�"�"�� ��>����3��3�:�Z�:�H?�H?�VJL��n�%�JL�Z'
�'
�T7�W�S�#�X�
�7�tP(�P(�fM�(�7�#�M�`n<�n<�b�;;��;;�~�z��	�G�r#

Youez - 2016 - github.com/yon3zu
LinuXploit