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 :  /lib/python3/dist-packages/apt/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/apt/__pycache__/cache.cpython-314.pyc
+
S^�if�����^RIHt^RIt^RIt^RIt^RIt^RIHtHtH	t	^RI
HtHt^RI
t
^RIt^RIHtHt^RIHtHtHt!RR]4t!R	R
]4t!RR]4t!R
R]4t!RR]4t!RR4t!RR4t!RR4t !RR4t!!RR]!4t"!RR]!4t#!RR4t$!RR 4t%R!R"lt&R#R$lt'R%R&lt(])R'8Xd
](!4R#R#)(�)�annotationsN)�Callable�Iterator�KeysView)�Any�cast)�Package�Version)�AcquireProgress�InstallProgress�
OpProgressc��]tRt^&tRtRtR#)�FetchCancelledExceptionzAException that is thrown when the user cancels a fetch operation.�N��__name__�
__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r��+/usr/lib/python3/dist-packages/apt/cache.pyrr&s��Krrc��]tRt^*tRtRtR#)�FetchFailedExceptionz-Exception that is thrown when fetching fails.rNrrrrrr*s��7rrc��]tRt^.tRtRtR#)�UntrustedExceptionz>Exception that is thrown when fetching fails for trust reasonsrNrrrrrr.���Hrrc��]tRt^2tRtRtR#)�LockFailedExceptionz,Exception that is thrown when locking fails.rNrrrrr r 2s��6rr c��]tRt^6tRtRtR#)�CacheClosedExceptionz>Exception that is thrown when the cache is used after close().rNrrrrr"r"6rrr"c�>�]tRt^:tRtRRltRRltRRltRtR	#)
�_WrappedLockz\Wraps an apt_pkg.FileLock to raise LockFailedException.

Initialized using a directory path.c� �V^8�dQhRRRR/#)��path�str�return�Noner)�formats"r�__annotate__�_WrappedLock.__annotate__?s��B�B�S�B�T�Brc	��Wn\P!\PPVR44VnR#)�lockN)�_path�apt_pkg�FileLock�osr'�join�_lock)�selfr's&&r�__init__�_WrappedLock.__init__?s(���
��%�%�b�g�g�l�l�4��&@�A��
rc��V^8�dQhRR/#�r&r)r*r)r+s"rr,r-Cs����4�rc	��VPP4# \Pd#p\	RTP
:RT:24hRp?ii;i)zFailed to lock directory z: N)r5�	__enter__r1�Errorr r0)r6�es& rr<�_WrappedLock.__enter__CsG��	��:�:�'�'�)�)���}�}�	�%�7;�z�z�1�E��
��	�s��A�A�Ac�(�V^8�dQhRRRRRRRR/#)r&�typ�object�value�	tracebackr)r*r)r+s"rr,r-Ks(��:�:�F�:�6�:�f�:��:rc	�:�VPPWV4#�N)r5�__exit__)r6rArCrDs&&&&rrG�_WrappedLock.__exit__Ks���z�z�"�"�3�y�9�9r)r5r0N)	rrrrrr7r<rGrrrrr$r$:s��+�B��:�:rr$c��]tRt^OtRtRZRRlltRRltRRltR	R
ltRRlt	R[R
Rllt
RRltRRltRRlt
RRltRRltR[RRlltRRltRRltRR ltR!R"ltR#R$ltR%R&ltR'R(ltR)R*ltR\R+R,llt]R-R.l4t]R/R0l4t]R1R2l4tR3R4ltR[R5R6lltR]R7R8llt R9R:lt!R^R;R<llt"R_R=R>llt#R?R@lt$R]RARBllt%RCRDlt&RERFlt'RGRHlt(RIRJlt)RKRLlt*RMRNlt+]RORPl4t,]RQRRl4t-]RSRTl4t.]RURVl4t/]RWRXl4t0RYt1R#)`�CacheaXDictionary-like package cache.

The APT cache file contains a hash table mapping names of binary
packages to their metadata. A Cache object is the in-core
representation of the same. It provides access to APTs idea of the
list of available packages.

The cache can be used like a mapping from package names to Package
objects (although only getting items is supported).

Keyword arguments:
progress -- a OpProgress object,
rootdir  -- an alternative root directory. if that is given the system
sources.list and system lists/files are not read, only file relative
to the given rootdir,
memonly  -- build the cache in memory only.


.. versionchanged:: 1.0

    The cache now supports package names with special architecture
    qualifiers such as :all and :native. It does not export them
    in :meth:`keys()`, though, to keep :meth:`keys()` a unique set.
Nc�(�V^8�dQhRRRRRRRR/#)	r&�progress�OpProgress | None�rootdir�
str | None�memonly�boolr)r*r)r+s"rr,�Cache.__annotate__is2��5�5�#�5��5��	5�

�5rc		�J�\\PR4Vn\\PR4Vn\\PR4Vn\\PR4Vn	/Vn
/Vn\P!4Vn\P!4VnRVnRVnVP'RR4VP'RR4V'd!\P(P+RR4V'Ed�\,P.P1V4p\,P.P3VR,4'd-\P4!\P(VR,4\,P.P7VR,4'd-\P8!\P(VR,4\P(P+RV4\P(P+R	VR
,4\,P.P3\,P.P;VRRR
44'dA\P(P+R\,P.P;VRRR
44VP=V4\P>!4\P(PAR4p\CV4Vn"VPGV4R#)N�cache_post_open�_inc_changes_count�cache_post_changezDir::Cache::pkgcache�z/etc/apt/apt.conf�/etc/apt/apt.conf.d�Dir�Dir::State::status�/var/lib/dpkg/status�usr�bin�dpkgzDir::bin::dpkg�Dir::Cache::Archives���)$rr1rJ�_cache�DepCache�	_depcache�PackageRecords�_records�
SourceList�_list�
_callbacks�_callbacks2�weakref�WeakValueDictionary�_weakref�WeakSet�
_weakversions�_changes_count�_sorted_set�connect�config�setr3r'�abspath�exists�read_config_file�isdir�read_config_dirr4�_check_and_create_required_dirs�init_system�find_dirr$�
_archive_lock�open)r6rLrNrP�archive_dirs&&&& rr7�Cache.__init__is%��&*�'�-�-��%>���+/��0@�0@�$�+G���04��"�"�D�1
��
�*.�g�.@�.@�$�)G��
�FH���
�	
��
�'�'�)�	
�
�8?���7H��� ���-1������&�(<�=����(�*>�?���N�N���5�r�:��7��g�g�o�o�g�.�G��w�w�~�~�g�(;�;�<�<��(�(�����CV�9V�W��w�w�}�}�W�'<�<�=�=��'�'�����BW�8W�X��N�N���u�g�.��N�N���3�W�?U�5U�V��w�w�~�~�b�g�g�l�l�7�E�5�&�I�J�J����"�"�$�b�g�g�l�l�7�E�5�&�&Q��

�0�0��9�
���!��n�n�-�-�.D�E��)�+�6����	�	�(�rc��V^8�dQhRR/#r:r)r+s"rr,rR�s��$�$�D�$rc
�:�VPP4R#)zFix broken packages.N)rc�
fix_broken�r6s&rr��Cache.fix_broken�s�����!�!�#rc��V^8�dQhRR/#r:r)r+s"rr,rR�s��!�!�D�!rc
�8�V;P^,
unR#)zIncrease the number of changesN)ror�s&rrU�Cache._inc_changes_count�s�����q� �rc� �V^8�dQhRRRR/#)r&rNr(r)r*r)r+s"rr,rR�s��/�/�s�/�t�/rc
�f�RR.p.ROpVFLp\PPW,4'dK0\P!W,4KN	VFPp\PPW,4'dK0\	W,R4P4KR	R#)zN
check if the required apt directories/files are there and if
not create them
r[z/etc/apt/sources.list�wN)z
/var/lib/dpkgz	/etc/apt/rXz/etc/apt/preferences.dz/var/cache/apt/archives/partialz/var/lib/apt/lists/partial)r3r'ru�makedirsr}�close)r6rN�files�dirs�d�fs&&    rry�%Cache._check_and_create_required_dirs�s}��
#�#�
��
���A��7�7�>�>�'�+�.�.����G�K�(���A��7�7�>�>�'�+�.�.��W�[�#�&�,�,�.�rc� �V^8�dQhRRRR/#)r&�namer(r)r*r)r+s"rr,rR�s��.�.�3�.�4�.rc
��WP9d;VPV,F#pVR8XdVP4KV!4K%	WP9d,VPV,Fwr#pV!V.VO5/VBK	R#R#)z!internal helper to run a callbackrUN)rhrUri�r6r��callback�args�kwdss&&   r�_run_callbacks�Cache._run_callbacks�s~���?�?�"� �O�O�D�1�1���3�3��+�+�-��J�	2��#�#�#�(,�(8�(8��(>�(>�$�����-��-��-�)?�$rc� �V^8�dQhRRRR/#)r&rLrMr)r*r)r+s"rr,rR�s��/�/�.�/�$�/rc
��Vf)\PPP4pVP	4WnVP
R4\P!V4Vn	\P!VP4Vn\P!VP4Vn
\P!4VnVPP!4RVnVP%4\'\P(!44^8�VnVP-4VP
R4R#)zDOpen the package cache, after that it can be used like
a dictionary
N�cache_pre_openrT)�aptrL�baser
r��op_progressr�r1rJrarbrcrdrerfrg�read_main_listrp�
_Cache__remap�len�get_architectures�_have_multi_arch�done)r6rLs&&rr}�
Cache.open�s������|�|�(�(�3�3�5�H��
�
��#�����,�-��m�m�H�-��� �)�)�$�+�+�6����.�.�t�{�{�;��
��'�'�)��
��
�
�!�!�#�������� #�G�$=�$=�$?� @�1� D����
�
�����-�.rc��V^8�dQhRR/#r:r)r+s"rr,rR�s��/�/��/rc
���\VPP44FZpVPV,pTPTP
PTP
P3,TnK\	\VP4EFpVPP
PF�pVPVPP8XgK*VP^8XgCVPP^8Xg(VPVPP8XgK}VPVPP8XgK�VP VPP 8XgK�WCn
K�	VPP#V4EK	R# \dEK�i;i \dTPTEK�i;i)z�Called after cache reopen() to relocate to new cache.

Relocate objects like packages and versions from the old
underlying cache to the new one.
N)�listrl�keys�KeyErrorra�_pkgr��architecture�LookupErrorrn�package�version_list�hash�_cand�size�
multi_arch�ver_str�remove)r6�key�pkg�ver�vs&    r�__remap�
Cache.__remap�sM����
�
�*�*�,�-�C�
��m�m�C�(��
'��;�;�s�x�x�}�}�c�h�h�6K�6K�'K�L���.���*�*�+�C��[�[�%�%�2�2���F�F�c�i�i�n�n�,����1���	�	���!�(;�q�v�v������?W�����	�	�(<�(<�<��	�	�S�Y�Y�%6�%6�6� !�I��3��"�"�)�)�#�.�,���
��
��
�
'��M�M�#�&�
'�s#�F3�AG�3G�G�G#�"G#c��V^8�dQhRR/#r:r)r+s"rr,rRs��;�;�t�;rc
�H�V=\\PR4VnR#)zClose the package cacheN)rerr1rdr�s&rr��Cache.closes��
�M��W�3�3�T�:��
rc��V^8�dQhRR/#)r&r)rJr)r+s"rr,rRs����5�rc
��V#)zEnter the with statementrr�s&rr<�Cache.__enter__s���rc�(�V^8�dQhRRRRRRRR/#)r&�exc_typerB�	exc_valuerDr)r*r)r+s"rr,rRs)������F��v��RV�rc
�&�VP4R#)zExit the with statementN)r�)r6r�r�rDs&&&&rrG�Cache.__exit__s���
�
�rc� �V^8�dQhRRRR/#)r&r�rBr)r	r)r+s"rr,rRs����v��'�rc
��\V4pVPV,pTPT4'g\RT,4hTP	T4pT# \d\RT,4hi;i)z look like a dictionary (get key)z!The cache has no package named %r)r(rar��_Cache__is_real_pkg�_rawpkg_to_pkg)r6r��rawpkgr�s&&  r�__getitem__�Cache.__getitem__s|��	F��c�(�C��[�[��%�F�
�!�!�&�)�)��>��D�E�E��!�!�&�)���
���	F��>��D�E�E�	F�s�A�A:c�$�V^8�dQhRRRRRR/#)r&r�rB�defaultr)rr)r+s"rr,rR$s!����v����#�rc
�:�W,# \dTu#i;i)zQReturn *self*[*key*] or *default* if *key* not in *self*.

.. versionadded:: 1.1
)r�)r6r�r�s&&&r�get�	Cache.get$s#��
	��9����	��N�	�s�
�
�c� �V^8�dQhRRRR/#)r&r��apt_pkg.Packager)r	r)r+s"rr,rR.s��I�I�_�I��Irc
�p�VPRR7pVPPV\W44#)zWReturns the apt.Package object for an apt_pkg.Package object.

.. versionadded:: 1.0.0
T��pretty)�get_fullnamerl�
setdefaultr	)r6r��fullnames&& rr��Cache._rawpkg_to_pkg.s3��
�&�&�d�&�3���}�}�'�'��'�$�2G�H�Hrc��V^8�dQhRR/#�r&r)zIterator[Package]r)r+s"rr,rR7s��9�9�+�9rc#	�"�VP4F<p\WPV,4pVPP	W4x�K>	R#5irF)r�r	rarlr��r6�pkgnamer�s&  r�__iter__�Cache.__iter__7s?����y�y�{�G��$���G� 4�5�C��-�-�*�*�7�8�8�#�s�AAc� �V^8�dQhRRRR/#)r&r�r�r)rQr)r+s"rr,rRAs��#�#�O�#��#rc
��VP#)z8Check if the apt_pkg.Package provided is a real package.)�has_versions)r6r�s&&r�
__is_real_pkg�Cache.__is_real_pkgAs���"�"�"rc� �V^8�dQhRRRR/#�r&r�rBr)rQr)r+s"rr,rRE�����6��d�rc	�
�W9#rFr�r6r�s&&r�has_key�
Cache.has_keyE�
���{�rc� �V^8�dQhRRRR/#r�r)r+s"rr,rRHs������4�rc	�~�VPVP\V4,4# \dR#i;i�F)r�rar(r�r�s&&r�__contains__�Cache.__contains__Hs7��	��%�%�d�k�k�#�c�(�&;�<�<���	��	�s�*-�<�<c��V^8�dQhRR/#�r&r)�intr)r+s"rr,rRNs�� � �� rc	�4�\VP44#rF)r�r�r�s&r�__len__�
Cache.__len__Ns���4�9�9�;��rc��V^8�dQhRR/#)r&r)z	list[str]r)r+s"rr,rRQs��&�&�i�&rc	�a�SPf/\V3RlSPP44Sn\	SP4#)Nc3�z<"�TF0pSPV4'gKVPRR7x�K2	R#5i)Tr�N)r�r�)�.0�pr6s& �r�	<genexpr>�Cache.keys.<locals>.<genexpr>Ss6����&�-�A��%�%�a�(�,����d��+�+�-�s�;�;)rp�sortedra�packagesr�r�sfrr��
Cache.keysQsF������#�%�&����-�-�&� �D��
�D�$�$�%�%rc��V^8�dQhRR/#)r&r)�
list[Package]r)r+s"rr,rRZs����]�rc
���.pVPPpVPPF3pV!V4'dKVP	VPV44K5	V#)zGet the marked changes)rc�marked_keeprar�appendr�)r6�changesr
r�s&   r�get_changes�Cache.get_changesZsS�����n�n�0�0���k�k�*�*�F��v�&�&����t�2�2�6�:�;�+��rc� �V^8�dQhRRRR/#)r&�dist_upgraderQr)r*r)r+s"rr,rRcs��	!�	!�D�	!�T�	!rc
�|�VP4VPPV4VP4R#)z�Upgrade all packages.

If the parameter *dist_upgrade* is True, new dependencies will be
installed as well (and conflicting packages may be removed). The
default value is False.
N)�cache_pre_changerc�upgraderV)r6rs&&rr�
Cache.upgradecs.��	
���������|�,���� rc��V^8�dQhRR/#r�r)r+s"rr,rRos��$�$�3�$rc
��VPf\R4h\P!VP4p\P
!4pVP
W PVP4VP#)z;Get the size of the packages that are required to download.�&Cache object used after close() called)	rer"r1�PackageManagerrc�Acquire�get_archivesrg�fetch_needed)r6�pm�fetchers&  r�required_download�Cache.required_downloadns\���=�=� �&�'O�P�P�
�
#�
#�D�N�N�
3���/�/�#��
������T�]�]�;��#�#�#rc��V^8�dQhRR/#r�r)r+s"rr,rRys��'�'��'rc
�.�VPP#)z8Get the size of the additional required space on the fs.)rc�usr_sizer�s&r�required_space�Cache.required_spacexs���~�~�&�&�&rc��V^8�dQhRR/#)r&r)zset[str]r)r+s"rr,rR~s����H�rc
��\4pVPPp\\P
\P34pVPPF]pV!V4pV'gKVP'dK)VPV9gK<VPVPRR74K_	V#)zAReturn the packages not downloadable packages in reqreinst state.Tr�)
rsrc�get_candidate_ver�	frozensetr1�INSTSTATE_REINSTREQ�INSTSTATE_HOLD_REINSTREQrar�downloadable�
inst_state�addr�)r6�	reqreinstr'�statesr��cands&     r�req_reinstall_pkgs�Cache.req_reinstall_pkgs}s����E�	� �N�N�<�<���
�
(�
(�'�*J�*J�K�
���;�;�'�'�C�$�S�)�D��t�D�-�-�-�#�.�.�F�2J��
�
�c�.�.�d�.�;�<�(��rc�$�V^8�dQhRRRRRR/#)r&r�apt_pkg.Acquire�allow_unauthenticated�bool | Noner)r�r)r+s"rr,rR�s$��!�!�&�!�?J�!�	�!rc	�|�Vf!\PPRR4pVPUu.uFq3P'dKVNK	ppV'd1V'g)\RRP
RV44,4hVP4pRpRpVPFZpVPVP8XdK VP'dK4VRVPRVPR2,
pR	pK\	WQP8Xd\V4hV'd\V4hV#uupi)
NzAPT::Get::AllowUnauthenticatedFzUntrusted packages:
%s�
c3�8"�TFqPx�K	R#5irF)�desc_uri)r�is& rr�%Cache._run_fetcher.<locals>.<genexpr>�s���5T�)�Q�j�j�)�s�rWzFailed to fetch � T)r1rr�find_b�items�
is_trustedrr4�run�status�	STAT_DONE�	STAT_IDLEr:�
error_text�RESULT_CANCELLEDrr)r6rr5�item�	untrusted�res�failed�err_msgs&&&     r�_run_fetcher�Cache._run_fetcher�s��!�(�$+�N�N�$9�$9�3�U�%�!�'.�m�m�K�m�d�?�?�T�T�m�	�K��2�$�)�D�I�I�5T�)�5T�,T�T��
�
�k�k�m�������M�M�D��{�{�d�n�n�,���~�~�~���)�$�-�-���$�/�/�9J�"�M�M�G��F�
"��*�*�*�)�'�2�2�
�&�w�/�/��
��3Ls�D9�D9c�(�V^8�dQhRRRRRRRR/#)	r&rr4r�apt_pkg.PackageManagerr5r6r)r�r)r+s"rr,rR�s8��A�A� �A�
#�A� +�	A�


�Arc
��VPf\R4hVPWPVP4'gR#VP	W4#)zfetch the needed archivesrF)rer"rrgrL)r6rrr5s&&&&r�_fetch_archives�Cache._fetch_archives�sK���=�=� �&�'O�P�P����w�
�
�D�M�M�B�B��� � ��@�@rc�(�V^8�dQhRRRRRRRR/#)	r&rL�AcquireProgress | Nonerzapt_pkg.Acquire | Noner5r6r)r�r)r+s"rr,rR�s2�� � �(� �(� � +�	 �


� rc
�|�VeVe\R4hVf)\PPP	4pVf\
P!V4pVP;_uu_4VPV\
P!VP4V4uuRRR4# +'giR#;i)a�Fetch the archives for all packages marked for install/upgrade.

You can specify either an :class:`apt.progress.base.AcquireProgress()`
object for the parameter *progress*, or specify an already
existing :class:`apt_pkg.Acquire` object for the parameter *fetcher*.

The return value of the function is undefined. If an error occurred,
an exception of type :class:`FetchFailedException` or
:class:`FetchCancelledException` is raised.

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.8.0
Nz'Takes a progress or a an Acquire object)�
ValueErrorr�rL�textrr1rr|rQrrc)r6rLrr5s&&&&r�fetch_archives�Cache.fetch_archives�s���,��G�$7��F�G�G����|�|�(�(�8�8�:�H��?��o�o�h�/�G�
�
�
�
��'�'���/�/����?�AV�� �
�
�
�s�.1B*�*B;	c� �V^8�dQhRRRR/#)r&r�r(r)rQr)r+s"rr,rR�s��C�C�#�C�$�Crc
��VPV,p\VP;'dVP'*4# \dR#i;i)z0Return whether the package is a virtual package.F)rarQ�has_providesr�r�r�s&& r�is_virtual_package�Cache.is_virtual_package�sN��	C��+�+�g�&�C���(�(�A�A��1A�1A�-A�B�B���	��	�s�A�A�Ac�(�V^8�dQhRRRRRRRR/#)r&r�r(�candidate_onlyrQ�include_nonvirtualr)rr)r+s"rr,rR�s2��"�"��"��"�!�	"�

�"rc
��\4pVPPpVPV,pVP'dV'g\V4#TPFHwrxp	T	Pp
T'dY�!T
48XgK(TPTPT
44KJ	\T4# \d\T4u#i;i)a�Return a list of all packages providing a package.

Return a list of packages which provide the virtual package of the
specified name.

If 'candidate_only' is False, return all packages with at
least one version providing the virtual package. Otherwise,
return only those packages where the candidate version
provides the virtual package.

If 'include_nonvirtual' is True then it will search for all
packages providing pkgname, even if pkgname is not itself
a virtual pkg.
)rsrcr'rar�r�r��
provides_list�
parent_pkgr-r�)r6r�r`ra�	providersr'�vp�provides�providesver�versionr�s&&&&       r�get_providing_packages�Cache.get_providing_packages�s���*#&�%�	� �N�N�<�<��	#����W�%�B�����'9��I��&�/1�.>�.>�*�H�7��'�'�F�!�g�1B�6�1J�&J��
�
�d�1�1�&�9�:�/?��I�����	#��	�?�"�	#�s�,B=�
B=�=C�Cc
�,�V^8�dQhRRRRRRRRR	R/#)
r&�fetch_progressrT�pulse_intervalr��raise_on_errorrQ�sources_listrOr)r)r+s"rr,rRsC��1I�1I�.�1I��1I��	1I�
!�1I�

�
1Irc
�~�\\PPR44;_uu_4V'Ed\PP	R4p\PP	R4p\PP	R4p\PPR\PPV44\PPRR4\PPRR4\P!4pVP4MVPpVf)\PPP4pVP P#WV4p	T	'gT'd\'4hT	T'da\PPRX4\PPRX4\PPRX4uuRRR4# \$dp
\'T
4hRp
?
ii;i T'db\PPRX4\PPRX4\PPRX4ii;i +'giR#;i)a�Run the equivalent of apt-get update.

You probably want to call open() afterwards, in order to utilise the
new cache. Otherwise, the old cache will be used which can lead to
strange bugs.

The first parameter *fetch_progress* may be set to an instance of
apt.progress.FetchProgress, the default is apt.progress.FetchProgress()
.
sources_list -- Update a alternative sources.list than the default.
Note that the sources.list.d directory is ignored in this case
zDir::State::ListszDir::Etc::sourcelistzDir::Etc::sourcepartszAPT::List-Cleanup�xxx�0N)r$r1rrr{�findrsr3r'rtrfr�rgr�rLr�rra�update�SystemErrorr)r6rmrnrorp�old_sources_list�old_sources_list_d�old_cleanup�slistrIr>s&&&&&      rru�Cache.updates���&�'�.�.�1�1�2E�F�
G�
G��|�#*�>�>�#6�#6�7M�#N� �%,�^�^�%8�%8�9P�%Q�"�%�n�n�1�1�2E�F�����"�"�*�B�G�G�O�O�L�,I�����"�"�#:�E�B����"�"�#6��<��*�*�,���$�$�&��
�
��
I�!�)�%(�\�\�%6�%6�%F�%F�%H�N�2��+�+�,�,�^�N�S�C��~�.�0�0����N�N�&�&�'=�?O�P��N�N�&�&�'>�@R�S��N�N�&�&�':�K�H�=H�
G��(#�2�.�q�1�1��2�� ��N�N�&�&�'=�?O�P��N�N�&�&�'>�@R�S��N�N�&�&�':�K�H� ��7H�
G�
G�sV�DJ+�,H=�5H�H=�H=�!H=�,A(J+�H:�*H5�5H:�:H=�=A+J(�(J+�+J<	c�$�V^8�dQhRRRRRR/#)r&rrO�install_progressrr)r�r)r+s"rr,rRBs$��!�!�(�!�<K�!�	�!rc
���VP4\P!4pV'd\P
!4VP
V4pV'd\P!4TP4T# \dTP4L�i;i T'd\P!4ii;i \dTP4T#i;i)a!
The first parameter *pm* refers to an object returned by
apt_pkg.PackageManager().

The second parameter *install_progress* refers to an InstallProgress()
object of the module apt.progress.

This releases a system lock in newer versions, if there is any,
and reestablishes it afterwards.
)
�startUpdate�AttributeError�start_updater1�pkgsystem_is_locked�pkgsystem_unlock_innerrA�pkgsystem_lock_inner�finishUpdate�
finish_update)r6rr}�
did_unlockrIs&&&  r�install_archives�Cache.install_archivesBs���	,��(�(�*��0�0�2�
���*�*�,�	/�"�&�&�r�*�C���,�,�.�	-��)�)�+��
��#�	,��)�)�+�	,����,�,�.���
�	-��*�*�,��
�	-�s/�B�B'�4C
�B$�#B$�' C�
C)�(C)c�(�V^8�dQhRRRRRRRR/#)	r&rmrTr}zInstallProgress | Noner5r6r)rQr)r+s"rr,rRes2��8*�8*�.�8*�1�8*� +�	8*�

�8*rc	
�$�Vf)\PPP4pVf)\PPP	4pVfQh\
P!4;_uu_4\
P!VP4p\
P!V4pVP;_uu_4VPWTV4pVPWB4pWdP8XdMPWdP8Xd\R4hWdP 8XdM\RV,4hVP#4K�RRR4RRR4XXP8H# +'giL';i +'giL2;i)a�Apply the marked changes to the cache.

The first parameter, *fetch_progress*, refers to a FetchProgress()
object as found in apt.progress, the default being
apt.progress.FetchProgress().

The second parameter, *install_progress*, is a
apt.progress.InstallProgress() object.

The keyword-only parameter *allow_unauthenticated* specifies whether
to allow unauthenticated downloads. If not specified, it defaults to
the configuration option `APT::Get::AllowUnauthenticated`.
NzinstallArchives() failedz<internal-error: unknown result code from InstallArchives: %s)r�rLr�rrr1�
SystemLockrrcrr|rQr��RESULT_COMPLETED�
RESULT_FAILEDrv�RESULT_INCOMPLETE�shutdown)r6rmr}r5rrrIs&&&&   r�commit�Cache.commites@��4�!� �\�\�.�.�>�>�@�N��#�"�|�|�0�0�@�@�B���+�+�+�
�
�
�
!�
!��'�'����7�B��o�o�n�5�G��#�#�#���.�.�w�<Q�R�C��/�/��E�C��1�1�1��� 0� 0�0�)�*D�E�E�� 4� 4�4��)�<�>A�B���
�$�$�&�'$�"�.�b�)�)�)�)�)$�#��"�
!�s&�<AE?�BE,	�
E?�,E<
�7E?�?F	c��V^8�dQhRR/#r:r)r+s"rr,rR�s����t�rc
�:�VPP4R#)zUnmark all changesN)rc�initr�s&r�clear�Cache.clear�s�������rc��V^8�dQhRR/#r:r)r+s"rr,rR�s��1�1�4�1rc
�(�VPR4R#)z>called internally if the cache has changed, emit a signal thenrVN�r�r�s&rrV�Cache.cache_post_change�s�����/�0rc��V^8�dQhRR/#r:r)r+s"rr,rR�s��0�0�$�0rc
�(�VPR4R#)zEcalled internally if the cache is about to change, emit
a signal thenrNr�r�s&rr�Cache.cache_pre_change�s��	
���.�/rc�$�V^8�dQhRRRRRR/#)r&r�r(r�zCallable[..., None] | strr)r*r)r+s"rr,rR�s"��/�/�C�/�+D�/��/rc
���VR8wd\P!R\^4WP9d.VPV&VPV,P	V4R#)z�Connect to a signal.

.. deprecated:: 1.0

    Please use connect2() instead, as this function is very
    likely to cause a memory leak.
rUzAconnect() likely causes a reference cycle, use connect2() insteadN)�warnings�warn�RuntimeWarningrhr)r6r�r�s&&&rrq�
Cache.connect�sS���+�+��M�M�V���
�
���&�$&�D�O�O�D�!������$�$�X�.rc
�,�V^8�dQhRRRRRRRRRR	/#)
r&r�r(r�zCallable[..., Any]r�rBr�r)r*r)r+s"rr,rR�s4��>�>��>�#5�>�>D�>�NT�>�	
�>rc
��WP9d.VPV&VPV,PW#V34R#)a�Connect to a signal.

The callback will be passed the cache as an argument, and
any arguments passed to this function. Make sure that, if you
pass a method of a class as your callback, your class does not
contain a reference to the cache.

Cyclic references to the cache can cause issues if the Cache object
is replaced by a new one, because the cache keeps a lot of objects and
tens of open file descriptors.

currently only used for cache_{post,pre}_{changed,open}.

.. versionadded:: 1.0
N)rirr�s&&&*,r�connect2�Cache.connect2�s>��$�'�'�'�%'�D���T�"������%�%�x�t�&<�=rc��V^8�dQhRR/#)r&r)zapt_pkg.ActionGroupr)r+s"rr,rR�s��3�3�0�3rc
�B�\P!VP4#)aoReturn an `ActionGroup` object for the current cache.

Action groups can be used to speedup actions. The action group is
active as soon as it is created, and disabled when the object is
deleted or when release() is called.

You can use the action group as a context manager, this is the
recommended way::

    with cache.actiongroup():
        for package in my_selected_packages:
            package.mark_install()

This way, the action group is automatically released as soon as the
with statement block is left. It also has the benefit of making it
clear which parts of the code run with a action group and which
don't.
)r1�ActionGrouprcr�s&r�actiongroup�Cache.actiongroup�s��&�"�"�4�>�>�2�2rc��V^8�dQhRR/#)r&r)rQr)r+s"rr,rR�s��
�
�D�
rc
�4�\PP\PPR44p\P!\PPVR44F#p\P!VR4'gK"R#	R#)z�Return True if the dpkg was interrupted

All dpkg operations will fail until this is fixed, the action to
fix the system if dpkg got interrupted is to run
'dpkg --configure -a' as root.
rZ�updatesz[0-9]*TF)	r3r'�dirnamer1rr�	find_file�listdirr4�fnmatch)r6�dpkg_status_dirr�s&  r�dpkg_journal_dirty�Cache.dpkg_journal_dirty�sg���'�'�/�/��N�N�$�$�%9�:�
�����B�G�G�L�L��)�D�E�A����q�(�+�+��F�rc��V^8�dQhRR/#r�r)r+s"rr,rR�s��+�+�c�+rc
�.�VPP#)z7Return the number of packages with broken dependencies.)rc�broken_countr�s&rr��Cache.broken_count�s���~�~�*�*�*rc��V^8�dQhRR/#r�r)r+s"rr,rRs��(�(�c�(rc
�.�VPP#)z2Return the number of packages marked for deletion.)rc�	del_countr�s&r�delete_count�Cache.delete_counts���~�~�'�'�'rc��V^8�dQhRR/#r�r)r+s"rr,rRs��)�)�s�)rc
�.�VPP#)z6Return the number of packages marked for installation.)rc�
inst_countr�s&r�
install_count�Cache.install_count����~�~�(�(�(rc��V^8�dQhRR/#r�r)r+s"rr,rRs��)�)�C�)rc
�.�VPP#)z-Return the number of packages marked as keep.)rc�
keep_countr�s&rr��Cache.keep_count
r�r)
r|rarhrirorcr�rgrerprlrnr�)NNFrFr�)NNN�TF)NrTN)2rrrrrr7r�rUryr�r}r�r�r<rGr�r�r�r�r�r�r�r�r�r
r�propertyrr#r1rLrQrXr]rjrur�r�r�rVrrqr�r�r�r�r�r�r�rrrrrJrJOsb���25�n$�!�/�2.�/�0/�@;���� �I�9�#��� �&��	!��$��$��'��'�����!�FA�$ �DC�"�H1I�f!�F8*�t�1�0�
/�$>�,3�*�
��
��+��+��(��(��)��)��)��)rrJc�n�]tRtRtRtRRltRRltRRltR	R
ltRRlt	R
Rlt
RRltRtR#)�ProblemResolverizmResolve problems due to dependencies and conflicts.

The first argument 'cache' is an instance of apt.Cache.
c� �V^8�dQhRRRR/#�r&�cacherJr)r*r)r+s"rr,�ProblemResolver.__annotate__s����e���rc	�\�\P!VP4VnWnR#rF)r1r�rc�	_resolverra�r6r�s&&rr7�ProblemResolver.__init__s�� �0�0����A����rc� �V^8�dQhRRRR/#�r&r�r	r)r*r)r+s"rr,r�s��+�+�W�+��+rc
�P�VPPVP4R#)z'Reset the package to the default state.N)r�r�r��r6r�s&&rr��ProblemResolver.clears�������W�\�\�*rc� �V^8�dQhRRRR/#r�r)r+s"rr,r�s��-�-�w�-�4�-rc
�P�VPPVP4R#)z)Protect a package so it won't be removed.N)r��protectr�r�s&&rr��ProblemResolver.protects�������w�|�|�,rc� �V^8�dQhRRRR/#r�r)r+s"rr,r�"s��,�,�g�,�$�,rc
�P�VPPVP4R#)zMark a package for removal.N)r�r�r�r�s&&rr��ProblemResolver.remove"s�������g�l�l�+rc��V^8�dQhRR/#r:r)r+s"rr,r�&s��(�(��(rc
��VPP4VPP4VPP	4R#)z:Resolve dependencies, try to remove packages where needed.N)rarr��resolverVr�s&rr��ProblemResolver.resolve&s2�����$�$�&������ ����%�%�'rc��V^8�dQhRR/#r:r)r+s"rr,r�,s��(�(��(rc
��VPP4VPP4VPP	4R#)z4Resolve dependencies, do not try to remove packages.N)rarr��resolve_by_keeprVr�s&rr��ProblemResolver.resolve_by_keep,s2�����$�$�&����&�&�(����%�%�'rc��V^8�dQhRR/#r:r)r+s"rr,r�2s��(�(�T�(rc
��VPP4VPP4VPP	4R#)zKeep back phased updates.N)rarr��keep_phased_updatesrVr�s&rr��#ProblemResolver.keep_phased_updates2s2�����$�$�&����*�*�,����%�%�'r)rar�N)
rrrrrr7r�r�r�r�r�r�rrrrr�r�s/���
�+�-�,�(�(�(�(rr�c�&�]tRtRtRtRRltRtR#)�Filteri<zFilter base classc� �V^8�dQhRRRR/#�r&r�r	r)rQr)r+s"rr,�Filter.__annotate__?s������T�rc
��R#)zYFilter function, return True if the package matchs a
filter criteria and False otherwise
Tr�r6r�s&&r�apply�Filter.apply?s��rrN�rrrrrr�rrrrr�r�<s����rr�c�&�]tRtRtRtRRltRtR#)�MarkedChangesFilteriFz&Filter that returns all marked changesc� �V^8�dQhRRRR/#r�r)r+s"rr,� MarkedChangesFilter.__annotate__Is������T�rc	�v�VP'g%VP'gVP'dR#R#r�)�marked_install�
marked_delete�marked_upgrader�s&&rr��MarkedChangesFilter.applyIs*�������!2�!2�!2�c�6H�6H�6H��rrNr�rrrr�r�Fs��0��rr�c�&�]tRtRtRtRRltRtR#)�InstalledFilteriPzEFilter that returns all installed packages.

.. versionadded:: 1.0.0
c� �V^8�dQhRRRR/#r�r)r+s"rr,�InstalledFilter.__annotate__Vs�� � �� �T� rc	��VP#rF)�is_installedr�s&&rr��InstalledFilter.applyVs�����rrNr�rrrrrPs���
 � rrc�J�]tRtRtRtRRltRRltRRltR	R
ltRt	R#)
�_FilteredCacheHelperiZz:Helper class for FilteredCache to break a reference cycle.c� �V^8�dQhRRRR/#r�r)r+s"rr,�!_FilteredCacheHelper.__annotate__]s��I�I�e�I��Irc	��/Vn.VnVPRVP4VPRVP4R#)rVrTN)�	_filtered�_filtersr��filter_cache_post_changer�s&&rr7�_FilteredCacheHelper.__init__]s<��+-���&(��
�
���*�D�,I�,I�J�
���(�$�*G�*G�Hrc� �V^8�dQhRRRR/#r�r)r+s"rr,res����U��t�rc
��/VnVFIpVPF6pVPV4'gKRVPVP&KG	KK	R#)zinternal helper to refilterTN)rrr�r�)r6r�r�r�s&&  r�_reapply_filter�$_FilteredCacheHelper._reapply_filteresE������C��]�]���7�7�3�<�<�/3�D�N�N�3�8�8�,��#�rc� �V^8�dQhRRRR/#�r&�filterr�r)r*r)r+s"rr,ros��%�%��%�D�%rc
�J�.VnVPPV4R#�zSet the current active filter.N)rr�r6rs&&r�
set_filter�_FilteredCacheHelper.set_filteros����
��
�
���V�$rc� �V^8�dQhRRRR/#r�r)r+s"rr,rts��$�$�e�$��$rc
�(�VPV4R#�z;Called internally if the cache changes, emit a signal then.N)rr�s&&rr�-_FilteredCacheHelper.filter_cache_post_changets��	
���U�#r)rrN)
rrrrrr7rrrrrrrr
r
Zs��D�I��%�
$�$rr
c��]tRtRtRtRRRlltRRltRR	ltR
RltRR
lt	RRlt
RRltRRltRRlt
RRltRtR#)�
FilteredCacheizzTA package cache that is filtered.

Can work on a existing cache or create a new one
Nc�$�V^8�dQhRRRRRR/#)r&r�zCache | NonerLrMr)r*r)r+s"rr,�FilteredCache.__annotate__�s$��8�8�!�8�4E�8�	
�8rc	�p�Vf\V4VnMWn\VP4VnR#rF)rJr�r
�_helper)r6r�rLs&&&rr7�FilteredCache.__init__�s)���=��x��D�J��J�+�D�J�J�7��rc��V^8�dQhRR/#r�r)r+s"rr,r%�s��+�+��+rc	�@�\VPP4#rF)r�r'rr�s&rr��FilteredCache.__len__�s���4�<�<�)�)�*�*rc� �V^8�dQhRRRR/#)r&r�r(r)r	r)r+s"rr,r%�s����s��w�rc	�(�VPV,#rF�r�r�s&&rr��FilteredCache.__getitem__�s���z�z�#��rc��V^8�dQhRR/#r�r)r+s"rr,r%�s��&�&�+�&rc#	�r"�VPPFpVPV,x�K	R#5irF)r'rr�)r6r�s& rr��FilteredCache.__iter__�s(����|�|�-�-�G��*�*�W�%�%�.�s�57c��V^8�dQhRR/#)r&r)z
KeysView[str]r)r+s"rr,r%�s��-�-�m�-rc	�J�VPPP4#rF)r'rr�r�s&rr��FilteredCache.keys�s���|�|�%�%�*�*�,�,rc� �V^8�dQhRRRR/#r�r)r+s"rr,r%�r�rc	�
�W9#rFrr�s&&rr��FilteredCache.has_key�r�rc� �V^8�dQhRRRR/#r�r)r+s"rr,r%�s������4�rc	��VPV,PVPP9# \dR#i;ir�)r�r�r'rr�r�s&&rr��FilteredCache.__contains__�s<��	��:�:�c�?�'�'�4�<�<�+A�+A�A�A���	��	�s�36�A�Ac� �V^8�dQhRRRR/#rr)r+s"rr,r%�s��'�'��'�D�'rc
�p�VPPV4VPP4R#r)r'rr�rVrs&&rr�FilteredCache.set_filter�s$��������'��
�
�$�$�&rc��V^8�dQhRR/#r:r)r+s"rr,r%�s��:�:�$�:rc
�P�VPPVP4R#r )r'rr�r�s&rr�&FilteredCache.filter_cache_post_change�s�����-�-�d�j�j�9rc� �V^8�dQhRRRR/#)r&r�r(r)rr)r+s"rr,r%�s��(�(�s�(�s�(rc
�.�\VPV4#)z)we try to look exactly like a real cache.)�getattrr�r�s&&r�__getattr__�FilteredCache.__getattr__�s���t�z�z�3�'�'r)r'r�)NN)rrrrrr7r�r�r�r�r�r�rrrErrrrr#r#zs>���
8�+��&�-���'�
:�(�(rr#c� �V^8�dQhRRRR/#r�r)r+s"rr,r,�s����U��t�rc��\R4R#)zcache pre changedN��printr.s&r�cache_pre_changedrK�s��	�
�rc� �V^8�dQhRRRR/#r�r)r+s"rr,r,�s�� � �e� �� rc��\R4R#)zcache post changedNrIr.s&r�cache_post_changedrN�s��	�
�rc��V^8�dQhRR/#r:r)r+s"rr,r,�s��5�5�t�5rc��\R4\P!4\\P
PP44pVPR\4VPR\4\RV94VR,p\VP4\\V44VP4FpW,PV8XdKQh	VP4VP4p\\V44VFpVP'dKQh	RF@p\ P"P%V4'dK*\ P&!V4KB	\P(P+RR4\P,!VP.4p\P0!\P
PP344pVP5WeR4\R4\7V4pVP8PR\4VP8PR\4VP8P4VP;\=44\\V44VP4FpW'V,P8XdKQh	\\V44\R	4\7\P
P>P4R
7pVP8PR\4VP8PR\4VP8P4VP;\=44\\V44VP4FpW'V,P8XdKQh	\\V44R#)zInternal test code.zCache self testrrV�aptitude�/tmp/pytestr_Nz.Testing filtered cache (argument is old cache)z$Testing filtered cache (no argument))rL)rRz/tmp/pytest/partial) rJr1r�rJr�rLrWr
r�rKrNr�r�r�rr
r3r'ru�mkdirrrrsrrcrrrQr#r�rr�r�)r�r�r�rr�rr�filtereds        r�_testrU�s���	�
���L�L�N��#�,�,�#�#�.�.�0�1�E�	�N�N�%�'8�9�	�N�N�&�(:�;�	�*��
��
�
�
�C�	�#�(�(�O�	�#�e�*���:�:�<���~�"�"�g�-�-�-� �
�M�M�O����!�G�	�#�g�,�����x�x�x��x��:���w�w�~�~�g�&�&��H�H�W��:��N�N���-�}�=�	�	�	����	0�B��o�o�c�l�l�/�/�?�?�A�B�G�	���'�t�,�
�
:�;��U�#�H��N�N���.�0A�B��N�N���/�1C�D��N�N�������+�-�.�	�#�h�-���=�=�?���7�+�0�0�0�0�0�#�
�#�h�-��	�
0�1��c�l�l�&7�&7�&B�&B�&D�E�H��N�N���.�0A�B��N�N���/�1C�D��N�N�������+�-�.�	�#�h�-���=�=�?���7�+�0�0�0�0�0�#�
�#�h�-�r�__main__)*�
__future__rr�r3r�rj�collections.abcrrr�typingrrr1�apt.progress.textr��apt.packager	r
�apt.progress.baserrr
�IOErrorrrrr �	Exceptionr"r$rJr�r�r�rr
r#rKrNrUrrrr�<module>r_s���,#��	���8�8����(�J�J�L�g�L�8�7�8�I�-�I�7�'�7�I�9�I�:�:�*~
)�~
)�B&(�&(�X���&�� �f� �$�$�@1(�1(�h� �5�p�z��	�G�r

Youez - 2016 - github.com/yon3zu
LinuXploit