Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/apt/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/apt/__pycache__/cache.cpython-310.pyc
o

4��f��@s�ddlmZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZddlZddlmZmZddlZddlmZmZmZGdd�de�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�Z Gdd�de!�Z"Gdd�de#�Z$Gdd�de#�Z%Gdd�de#�Z&Gdd�de#�Z'Gdd�de'�Z(Gdd�de'�Z)Gdd�de#�Z*Gdd�de#�Z+d d!�Z,d"d#�Z-d$d%�Z.e/d&kr�e.�dSdS)'�)�print_functionN)�Any�Callable�Dict�Iterator�List�Optional�Set�Tuple�Union�cast�KeysView)�Package�Version)�AcquireProgress�InstallProgress�
OpProgressc@�eZdZdZdS)�FetchCancelledExceptionzAException that is thrown when the user cancels a fetch operation.N��__name__�
__module__�__qualname__�__doc__�rr�+/usr/lib/python3/dist-packages/apt/cache.pyr'�rc@r)�FetchFailedExceptionz-Exception that is thrown when fetching fails.Nrrrrrr+rrc@r)�UntrustedExceptionz>Exception that is thrown when fetching fails for trust reasonsNrrrrrr/rrc@r)�LockFailedExceptionz,Exception that is thrown when locking fails.Nrrrrrr3rrc@r)�CacheClosedExceptionz>Exception that is thrown when the cache is used after close().Nrrrrrr 7rr c@s(eZdZdZdd�Zdd�Zdd�ZdS)	�_WrappedLockz`Wraps an apt_pkg.FileLock to raise LockFailedException.

    Initialized using a directory path.cCs ||_t�tj�|d��|_dS)N�lock)�_path�apt_pkg�FileLock�os�path�join�_lock)�selfr'rrr�__init__@sz_WrappedLock.__init__c
Cs:z|j��WStjy}z	td|j|f��d}~ww)NzFailed to lock directory %s: %s)r)�	__enter__r$�Errorrr#)r*�errrr,Es���z_WrappedLock.__enter__cCs|j�|||�S�N)r)�__exit__)r*�typ�value�	tracebackrrrr0Msz_WrappedLock.__exit__N)rrrrr+r,r0rrrrr!;s
r!c@s�eZdZdZd\dd�Zdd�Zdd	�Zd
d�Zdd
�Zd]dd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zd]dd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd^d,d-�Zed.d/��Zed0d1��Zed2d3��Zd4d5�Z	d]d6d7�Z			d_d8d9�Zd:d;�Z 	<	d`d=d>�Z!	?	dad@dA�Z"dBdC�Z#			d_dDdE�Z$dFdG�Z%dHdI�Z&dJdK�Z'dLdM�Z(dNdO�Z)dPdQ�Z*edRdS��Z+edTdU��Z,edVdW��Z-edXdY��Z.edZd[��Z/dS)b�Cachea�Dictionary-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.
    NFc	CsTttjd�|_ttjd�|_ttjd�|_ttjd�|_	i|_
i|_t�
�|_t��|_d|_d|_|�dd�|�dd�|rGtj�dd�|r�tj�|�}tj�|d�r`t�tj|d�tj�|d�rqt�tj|d�tj�d	|�tj�d
|d�tj�dtj�|d
dd��|�|�t��tj� d�}t!|�|_"|�#|�dS)N����cache_post_open�_inc_changes_count�cache_post_changezDir::Cache::pkgcache�z/etc/apt/apt.confz/etc/apt/apt.conf.d�Dir�Dir::State::status�/var/lib/dpkg/statuszDir::bin::dpkg�usr�bin�dpkg�Dir::Cache::Archives)$rr$r4�_cache�DepCache�	_depcache�PackageRecords�_records�
SourceList�_list�
_callbacks�_callbacks2�weakref�WeakValueDictionary�_weakref�WeakSet�
_weakversions�_changes_count�_sorted_set�connect�config�setr&r'�abspath�exists�read_config_file�isdir�read_config_dirr(�_check_and_create_required_dirs�init_system�find_dirr!�
_archive_lock�open)r*�progress�rootdir�memonly�archive_dirrrrr+lsH

����

zCache.__init__cC�|j��dS)zFix broken packages.N)rC�
fix_broken�r*rrrrc��zCache.fix_brokencCs|jd7_dS)zIncrease the number of changes�N)rOrdrrrr7��zCache._inc_changes_countcCshddg}gd�}|D]}tj�||�st�||�q
|D]}tj�||�s1t||d���qdS)zf
        check if the required apt directories/files are there and if
        not create them
        r<z/etc/apt/sources.list)z
/var/lib/dpkgz	/etc/apt/z/var/cache/apt/archives/partialz/var/lib/apt/lists/partial�wN)r&r'rU�makedirsr]�close)r*r_�files�dirs�d�frrrrY�s����z%Cache._check_and_create_required_dirscCsp||jvr|j|D]}|dkr|��q
|�q
||jvr4|j|D]\}}}||g|�Ri|��q#dSdS)z# internal helper to run a callback r7N)rHr7rI�r*�name�callback�args�kwdsrrr�_run_callbacks�s


�zCache._run_callbackscCs�|dur
tjj��}|��||_|�d�t�|�|_	t�
|j	�|_t�|j	�|_
t��|_|j��d|_|��tt���dk|_|��|�d�dS)zY Open the package cache, after that it can be used like
            a dictionary
        N�cache_pre_openrfr6)�aptr^�baserrj�op_progressrtr$r4rArBrCrDrErFrG�read_main_listrP�
_Cache__remap�len�get_architectures�_have_multi_arch�done)r*r^rrrr]�s


z
Cache.openc	Cs�t|j���D].}z|j|}Wn	tyYqwz|j|jj|jjf|_Wqty5|j|=Yqwt|j	�D]<}|j
jjD].}|j|j
jkrp|jdks]|j
jdks]|j|j
jkrp|j|j
jkrp|j|j
jkrp||_
nqB|j	�|�q;dS)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)�listrL�keys�KeyErrorrA�_pkgrp�architecture�LookupErrorrN�package�version_list�hash�_cand�size�
multi_arch�ver_str�remove)r*�key�pkg�ver�vrrr�__remap�s0�����z
Cache.__remapcCs|`ttjd�|_dS)z Close the package cache N)rErr$rDrdrrrrjszCache.closecCs|S)z Enter the with statement rrdrrrr,
szCache.__enter__cCs|��dS)z Exit the with statement N)rj)r*�exc_type�	exc_valuer3rrrr0�zCache.__exit__cCsVzt|�}|j|}Wn
tytd|��w|�|�s$td|��|�|�}|S)z" look like a dictionary (get key) z!The cache has no package named %r)�strrAr��_Cache__is_real_pkg�_rawpkg_to_pkg)r*r��rawpkgr�rrr�__getitem__s�

zCache.__getitem__cCs"z||WSty|YSw)zaReturn *self*[*key*] or *default* if *key* not in *self*.

        .. versionadded:: 1.1
        )r�)r*r��defaultrrr�get%s

�z	Cache.getcCs |jdd�}|j�|t||��S)zgReturns the apt.Package object for an apt_pkg.Package object.

        .. versionadded:: 1.0.0
        T��pretty)�get_fullnamerL�
setdefaultr)r*r��fullnamerrrr�0szCache._rawpkg_to_pkgccs4�|��D]}t||j|�}|j�||�VqdSr/)r�rrArLr��r*�pkgnamer�rrr�__iter__:s
��zCache.__iter__cC�|jS)z8Check if the apt_pkg.Package provided is a real package.)�has_versions)r*r�rrr�
__is_real_pkgEszCache.__is_real_pkgcC�||vSr/r�r*r�rrr�has_keyJ�z
Cache.has_keycCs,z|�|jt|��WStyYdSw�NF)r�rAr�r�r�rrr�__contains__Ns
�zCache.__contains__cCst|���Sr/)r{r�rdrrr�__len__U�z
Cache.__len__cs0�jdurt�fdd��jjD���_t�j�S)Nc3s&�|]}��|�r|jdd�VqdS)Tr�N)r�r�)�.0�prdrr�	<genexpr>\s
��zCache.keys.<locals>.<genexpr>)rP�sortedrA�packagesrrdrrdrr�Ys


�
z
Cache.keyscCs6g}|jj}|jjD]}||�s|�|�|��q
|S)z Get the marked changes )rC�marked_keeprAr��appendr�)r*�changesr�r�rrr�get_changesas�zCache.get_changescCs |��|j�|�|��dS)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�upgrader8)r*�dist_upgraderrrr�ksz
Cache.upgradecCs>|jdur	td��t�|j�}t��}|�||j|j�|jS)z;Get the size of the packages that are required to download.N�&Cache object used after close() called)	rEr r$�PackageManagerrC�Acquire�get_archivesrG�fetch_needed)r*�pm�fetcherrrr�required_downloadws
�zCache.required_downloadcC�|jjS)z8Get the size of the additional required space on the fs.)rC�usr_sizerdrrr�required_space��zCache.required_spacecCs^t�}|jj}ttjtjf�}|jjD]}||�}|r,|j	s,|j
|vr,|�|jdd��q|S)zAReturn the packages not downloadable packages in reqreinst state.Tr�)
rSrC�get_candidate_ver�	frozensetr$�INSTSTATE_REINSTREQ�INSTSTATE_HOLD_REINSTREQrAr��downloadable�
inst_state�addr�)r*�	reqreinstr��statesr��candrrr�req_reinstall_pkgs�s��zCache.req_reinstall_pkgscCs�|durtj�dd�}dd�|jD�}|r%|s%tdd�dd�|D����|��}d}d	}|jD]}|j|jkr9q0|j	r=q0|d
|j
|jf7}d}q0||jkrSt
|��|rYt|��|S)NzAPT::Get::AllowUnauthenticatedFcSsg|]}|js|�qSr)�
is_trusted)r��itemrrr�
<listcomp>�sz&Cache._run_fetcher.<locals>.<listcomp>zUntrusted packages:
%s�
css�|]}|jVqdSr/)�desc_uri)r��irrrr��s�z%Cache._run_fetcher.<locals>.<genexpr>r9zFailed to fetch %s %s
T)r$rR�find_b�itemsrr(�run�status�	STAT_DONE�	STAT_IDLEr��
error_text�RESULT_CANCELLEDrr)r*r��allow_unauthenticated�	untrusted�res�failed�err_msgr�rrr�_run_fetcher�s4��
�
zCache._run_fetchercCs4|jdur	td��|�||j|j�sdS|�||�S)z fetch the needed archives Nr�F)rEr r�rGr�)r*r�r�r�rrr�_fetch_archives�s
�zCache._fetch_archivescCs~|dur|durtd��|durtjj��}|durt�|�}|j�|�|t�	|j
�|�Wd�S1s8wYdS)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)�
ValueErrorrvr^�textrr$r�r\r�r�rC)r*r^r�r�rrr�fetch_archives�s

�$�zCache.fetch_archivescCs6z|j|}Wn
tyYdSwt|jo|j�S)z0Return whether the package is a virtual package.F)rAr��bool�has_providesr�r�rrr�is_virtual_package�s�zCache.is_virtual_packageTcCs�t�}|jj}z|j|}|jr|st|�WSWn
ty%t|�YSw|jD]\}}}	|	j}
|r9|	||
�krA|�	|�
|
��q)t|�S)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�rr��
provides_list�
parent_pkgr�r�)r*r��candidate_only�include_nonvirtual�	providersr��vp�provides�providesver�versionr�rrr�get_providing_packages�s 


���zCache.get_providing_packagesrcCsfttj�d����|r?tj�d�}tj�d�}tj�d�}tj�dtj�|��tj�dd�tj�dd�t�	�}|�
�n|j}zM|durMtj
j��}z
|j�|||�}	Wntyg}
zt|
��d}
~
ww|	so|rot��|	W|r�tj�d|�tj�d|�tj�d|�Wd�S|r�tj�d|�tj�d|�tj�d|�ww1s�wYdS)aRun 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$rRr[�findrSr&r'rTrFryrGrvr^rwrrA�update�SystemErrorr)r*�fetch_progress�pulse_interval�raise_on_error�sources_list�old_sources_list�old_sources_list_d�old_cleanup�slistr�r.rrrr�sf
�
�

������������zCache.updatecCs�z|��Wn
ty|��Ynwt��}|rt��z
|�|�}W|r+t��n|r3t��wwz|��W|StyI|�	�Y|Sw)aY
        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)r*r��install_progress�
did_unlockr�rrr�install_archivesKs.
���
�
�
�zCache.install_archivesc	Cs�|dur
tjj��}|durtjj��}|dusJ�t���Tt�|j�}t�	|�}|j
�6	|�|||�}|�||�}||j
krBn||jkrKtd��||jkrQntd|��|��q/Wd�n1sfwYWd�n1suwY||j
kS)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`.
        NTzinstallArchives() failedz<internal-error: unknown result code from InstallArchives: %s)rvr^rwrrr$�
SystemLockr�rCr�r\r�r�RESULT_COMPLETED�
RESULT_FAILEDr��RESULT_INCOMPLETE�shutdown)r*r�rr�r�r�r�rrr�commitms<

�


�����
zCache.commitcCrb)z Unmark all changes N)rC�initrdrrr�clear�rezCache.clearcC�|�d�dS)z@ called internally if the cache has changed, emit a signal then r8N�rtrdrrrr8�rezCache.cache_post_changecCr)zS called internally if the cache is about to change, emit
            a signal then r�Nrrdrrrr���zCache.cache_pre_changecCs>|dkrt�dtd�||jvrg|j|<|j|�|�dS)z�Connect to a signal.

        .. deprecated:: 1.0

            Please use connect2() instead, as this function is very
            likely to cause a memory leak.
        r7zAconnect() likely causes a reference cycle, use connect2() instead�N)�warnings�warn�RuntimeWarningrHr�)r*rprqrrrrQ�s	�

z
Cache.connectcOs.||jvr
g|j|<|j|�|||f�dS)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)rIr�rorrr�connect2�s

zCache.connect2cCst�|j�S)a�Return 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$�ActionGrouprCrdrrr�actiongroup�szCache.actiongroupcCsDtj�tj�d��}t�tj�|d��D]}t�|d�rdSqdS)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.
        r;�updatesz[0-9]*TF)	r&r'�dirnamer$rR�	find_file�listdirr(�fnmatch)r*�dpkg_status_dirrnrrr�dpkg_journal_dirty�s	
��zCache.dpkg_journal_dirtycCr�)z7Return the number of packages with broken dependencies.)rC�broken_countrdrrrr(r�zCache.broken_countcCr�)z2Return the number of packages marked for deletion.)rC�	del_countrdrrr�delete_count
r�zCache.delete_countcCr�)z6Return the number of packages marked for installation.)rC�
inst_countrdrrr�
install_countr�zCache.install_countcCr�)z-Return the number of packages marked as keep.)rC�
keep_countrdrrrr-r�zCache.keep_count)NNFr/)F)NNN)TF)NrTN)0rrrrr+rcr7rYrtr]rzrjr,r0r�r�r�r�r�r�r�r�r�r�r��propertyr�r�r�r�r�r�r�r�r�rrrr8r�rQrr r'r(r*r,r-rrrrr4Rs�
.
 







$
�
�"

�!
�3#
�:



r4c@s@eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)�ProblemResolverzuResolve problems due to dependencies and conflicts.

    The first argument 'cache' is an instance of apt.Cache.
    cCst�|j�|_||_dSr/)r$r/rC�	_resolverrA�r*�cacherrrr+#s
zProblemResolver.__init__cC�|j�|j�dS)z'Reset the package to the default state.N)r0rr��r*r�rrrr(rgzProblemResolver.clearcCr3)z)Protect a package so it won't be removed.N)r0�protectr�r4rrrr5-rgzProblemResolver.protectcCr3)zMark a package for removal.N)r0r�r�r4rrrr�2rgzProblemResolver.removecC�"|j��|j��|j��dS)z:Resolve dependencies, try to remove packages where needed.N)rAr�r0�resolver8rdrrrr77�

zProblemResolver.resolvecCr6)z4Resolve dependencies, do not try to remove packages.N)rAr�r0�resolve_by_keepr8rdrrrr9>r8zProblemResolver.resolve_by_keepN)
rrrrr+rr5r�r7r9rrrrr/sr/c@�eZdZdZdd�ZdS)�Filterz Filter base class cCsdS)zn Filter function, return True if the package matchs a
            filter criteria and False otherwise
        Tr�r*r�rrr�applyLszFilter.applyN�rrrrr=rrrrr;I�r;c@r:)�MarkedChangesFilterz( Filter that returns all marked changes cCs|js	|js	|jrdSdS)NTF)�marked_install�
marked_delete�marked_upgrader<rrrr=WszMarkedChangesFilter.applyNr>rrrrr@Tr?r@c@r:)�InstalledFilterzMFilter that returns all installed packages.

    .. versionadded:: 1.0.0
    cCr�r/)�is_installedr<rrrr=eszInstalledFilter.applyNr>rrrrrD_srDc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�_FilteredCacheHelperz:Helper class for FilteredCache to break a reference cycle.cCs,i|_g|_|�d|j�|�d|j�dS)Nr8r6)�	_filtered�_filtersr�filter_cache_post_changer1rrrr+msz_FilteredCacheHelper.__init__cCs:i|_|D]}|jD]}|�|�rd|j|j<nq
qdS)z internal helper to refilter TN)rGrHr=rp)r*r2r�rnrrr�_reapply_filtervs

���z$_FilteredCacheHelper._reapply_filtercCsg|_|j�|�dS�zSet the current active filter.N)rHr��r*�filterrrr�
set_filter�sz_FilteredCacheHelper.set_filtercCs|�|�dS�z;Called internally if the cache changes, emit a signal then.N)rJr1rrrrI�rz-_FilteredCacheHelper.filter_cache_post_changeN)rrrrr+rJrNrIrrrrrFjs	rFc@sbeZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�
FilteredCacheza A package cache that is filtered.

        Can work on a existing cache or create a new one
    NcCs*|dur
t|�|_n||_t|j�|_dSr/)r4r2rF�_helper)r*r2r^rrrr+�szFilteredCache.__init__cCst|jj�Sr/)r{rQrGrdrrrr��r�zFilteredCache.__len__cCs
|j|Sr/�r2r�rrrr��s
zFilteredCache.__getitem__ccs �|jjD]}|j|VqdSr/)rQrGr2)r*r�rrrr��s��zFilteredCache.__iter__cCs|jj��Sr/)rQrGr�rdrrrr��r�zFilteredCache.keyscCr�r/rr�rrrr��r�zFilteredCache.has_keycCs,z|j|j|jjvWStyYdSwr�)r2rprQrGr�r�rrrr��s
�zFilteredCache.__contains__cCs|j�|�|j��dSrK)rQrNr2r8rLrrrrN�szFilteredCache.set_filtercCs|j�|j�dSrO)rQrIr2rdrrrrI�rgz&FilteredCache.filter_cache_post_changecCst|j|�S)z)we try to look exactly like a real cache.)�getattrr2r�rrr�__getattr__�r�zFilteredCache.__getattr__)NN)rrrrr+r�r�r�r�r�r�rNrIrTrrrrrP�s
rPcC�td�dS)Nzcache pre changed��printrRrrr�cache_pre_changed�r�rXcCrU)Nzcache post changedrVrRrrr�cache_post_changed�r�rYcCstd�t��ttjj���}|�dt	�|�dt
�td|v�|d}t|j�tt|��|�
�D]}||j|ks@J�q5|��|��}tt|��|D]}|jsXJ�qQdD]
}tj�|�sht�|�q[tj�dd�t�|j�}t�tjj���}|�||d�td	�t|�}|j�dt	�|j�dt
�|j��|�t��tt|��|�
�D]}|||jks�J�q�tt|��td
�ttjj��d�}|j�dt	�|j�dt
�|j��|�t��tt|��|�
�D]}|||jks�J�q�tt|��dS)zInternal test code.zCache self testr�r8�aptitude)�/tmp/pytestz/tmp/pytest/partialr@r[Nz.Testing filtered cache (argument is old cache)z$Testing filtered cache (no argument))r^) rWr$rr4rvr^r�rrrXrYrpr{r�r�r�r&r'rU�mkdirrRrSr�rCr�rr�rPr2rNr@rw)r2r�r�r�r"r�r��filteredrrr�_test�sX

�

r^�__main__)0�
__future__rr%r&rrJ�typingrrrrrrr	r
rrr
r$�apt.packagerr�apt.progress.textrv�apt.progress.baserrr�IOErrorrrrr�	Exceptionr �objectr!r4r/r;r@rDrFrPrXrYr^rrrrr�<module>sD4P,$<9
�

Spamworldpro Mini