HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python2.7/dist-packages/apt/cache.pyc
�
&��cc@s�ddlmZddlZddlZddlZddlZyxddlmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZeee	e
eeee
eeWnek
r�d�ZnXddlZddlmZmZddlZddlmZmZmZeeeedefd��YZd	efd
��YZdefd��YZ d
efd��YZ!de"fd��YZ#de$fd��YZ%de$fd��YZ&de$fd��YZ'de$fd��YZ(de(fd��YZ)de(fd��YZ*de$fd��YZ+de$fd ��YZ,d!�Z-d"�Z.d#�Z/e0d$kr~e/�ndS(%i����(tprint_functionN(tAnytCallabletDicttIteratortListtOptionaltSettTupletUniontcasttKeysViewcCs|S(N((ttyptobj((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR
+s(tPackagetVersion(tAcquireProgresstInstallProgresst
OpProgresstFetchCancelledExceptioncBseZdZRS(sAException that is thrown when the user cancels a fetch operation.(t__name__t
__module__t__doc__(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR9stFetchFailedExceptioncBseZdZRS(s-Exception that is thrown when fetching fails.(RRR(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR=stUntrustedExceptioncBseZdZRS(s>Exception that is thrown when fetching fails for trust reasons(RRR(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRAstLockFailedExceptioncBseZdZRS(s,Exception that is thrown when locking fails.(RRR(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyREstCacheClosedExceptioncBseZdZRS(s>Exception that is thrown when the cache is used after close().(RRR(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRIst_WrappedLockcBs)eZdZd�Zd�Zd�ZRS(s`Wraps an apt_pkg.FileLock to raise LockFailedException.

    Initialized using a directory path.cCs.||_tjtjj|d��|_dS(Ntlock(t_pathtapt_pkgtFileLocktostpathtjoint_lock(tselfR!((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt__init__Rs	cCsGy|jj�SWn/tjk
rB}td|j|f��nXdS(NsFailed to lock directory %s: %s(R#t	__enter__RtErrorRR(R$te((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR&Ws
cCs|jj|||�S(N(R#t__exit__(R$Rtvaluet	traceback((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR)_s(RRRR%R&R)(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRMs		tCachecBs�eZdZd-d-ed�Zd�Zd�Zd�Zd�Z	d-d�Z
d�Zd�Zd	�Z
d
�Zd�Zd-d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zed�Zed��Zed��Zed��Zd�Zd-d�Zd-d-d-d�Z d�Z!e"ed�Z#d-de"d-d�Z$d �Z%d-d-d-d!�Z&d"�Z'd#�Z(d$�Z)d%�Z*d&�Z+d'�Z,ed(��Z-ed)��Z.ed*��Z/ed+��Z0ed,��Z1RS(.s�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.
    cCs�ttjd�|_ttjd�|_ttjd�|_ttj	d�|_
i|_i|_t
j�|_t
j�|_d|_d|_|jdd�|jdd�|r�tjjdd�n|r�tjj|�}tjj|d�rtjtj|d�ntjj|d�rJtjtj|d�ntjjd	|�tjjd
|d�tjjdtjj|d
dd��|j|�tj �ntjj!d�}t"|�|_#|j$|�dS(Ni����tcache_post_opent_inc_changes_counttcache_post_changesDir::Cache::pkgcachets/etc/apt/apt.confs/etc/apt/apt.conf.dtDirsDir::State::statuss/var/lib/dpkg/statussDir::bin::dpkgtusrtbintdpkgsDir::Cache::Archives(%R
RR,tNonet_cachetDepCachet	_depcachetPackageRecordst_recordst
SourceListt_listt
_callbackst_callbacks2tweakreftWeakValueDictionaryt_weakreftWeakSett
_weakversionst_changes_countt_sorted_settconnecttconfigtsetR R!tabspathtexiststread_config_filetisdirtread_config_dirR"t_check_and_create_required_dirstinit_systemtfind_dirRt
_archive_locktopen(R$tprogresstrootdirtmemonlytarchive_dir((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR%~s@				

cCs|jj�dS(sFix broken packages.N(R8t
fix_broken(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRW�scCs|jd7_dS(sIncrease the number of changesiN(RD(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR.�scCs�ddg}ddddg}x8|D]0}tjj||�s%tj||�q%q%Wx>|D]6}tjj||�s`t||d�j�q`q`WdS(	sf
        check if the required apt directories/files are there and if
        not create them
        s/var/lib/dpkg/statuss/etc/apt/sources.lists
/var/lib/dpkgs	/etc/apt/s/var/cache/apt/archives/partials/var/lib/apt/lists/partialtwN(R R!RJtmakedirsRRtclose(R$RTtfilestdirstdtf((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRN�s		

cCs�||jkrJx8|j|D]&}|dkr<|j�q|�qWn||jkr�x1|j|D]\}}}||||�qgWndS(s# internal helper to run a callback R.N(R=R.R>(R$tnametcallbacktargstkwds((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt_run_callbacks�s
cCs�|dkr!tjjj�}n|j�||_|jd�tj	|�|_
tj|j
�|_tj
|j
�|_tj�|_|jj�d|_|j�ttj��dk|_|j�|jd�dS(sY Open the package cache, after that it can be used like
            a dictionary
        tcache_pre_openiR-N(R5taptRStbaseRRZtop_progressRcRR,R6R7R8R9R:R;R<tread_main_listREt
_Cache__remaptlentget_architecturest_have_multi_archtdone(R$RS((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRR�s
	

	

cCsVx�t|jj��D]r}y|j|}Wntk
rCqnXy&|j|jj|jjf|_Wqtk
r�|j|=qXqWx�t|j	�D]�}x�|j
jjD]�}|j|j
jkr�|jdks|j
jdks|j|j
jkr�|j|j
jkr�|j|j
jkr�||_
Pq�q�W|j	j|�q�WdS(s�Called after cache reopen() to relocate to new cache.

        Relocate objects like packages and versions from the old
        underlying cache to the new one.
        iN(tlistRAtkeystKeyErrorR6t_pkgR_tarchitecturetLookupErrorRCtpackagetversion_listthasht_candtsizet
multi_archtver_strtremove(R$tkeytpkgtvertv((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt__remap�s&
&
!	cCs|`ttjd�|_dS(s Close the package cache N(R:R
RR9R5(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRZscCs|S(s Enter the with statement ((R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR&scCs|j�dS(s Exit the with statement N(RZ(R$texc_typet	exc_valueR+((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR)!scCsvyt|�}|j|}Wn!tk
r@td|��nX|j|�sctd|��n|j|�}|S(s" look like a dictionary (get key) s!The cache has no package named %r(tstrR6Rpt_Cache__is_real_pkgt_rawpkg_to_pkg(R$R|trawpkgR}((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt__getitem__&s
cCs%y||SWntk
r |SXdS(saReturn *self*[*key*] or *default* if *key* not in *self*.

        .. versionadded:: 1.1
        N(Rp(R$R|tdefault((s-/usr/lib/python2.7/dist-packages/apt/cache.pytget7s
cCs.|jdt�}|jj|t||��S(sgReturns the apt.Package object for an apt_pkg.Package object.

        .. versionadded:: 1.0.0
        tpretty(tget_fullnametTrueRAt
setdefaultR(R$R�tfullname((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR�BsccsEx>|j�D]0}t||j|�}|jj||�Vq
WdS(N(RoRR6RAR�(R$tpkgnameR}((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt__iter__LscCs|jS(s8Check if the apt_pkg.Package provided is a real package.(thas_versions(R$R�((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt
__is_real_pkgWscCs
||kS(N((R$R|((s-/usr/lib/python2.7/dist-packages/apt/cache.pythas_key\scCs7y|j|jt|��SWntk
r2tSXdS(N(R�R6R�RptFalse(R$R|((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt__contains__`s
cCst|j��S(N(RjRo(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt__len__gscsD�jdkr7t�fd��jjD���_nt�j�S(Nc3s0|]&}�j|�r|jdt�VqdS(R�N(R�R�R�(t.0tp(R$(s-/usr/lib/python2.7/dist-packages/apt/cache.pys	<genexpr>ns(RER5tsortedR6tpackagesRn(R$((R$s-/usr/lib/python2.7/dist-packages/apt/cache.pyRokscCsRg}|jj}x9|jjD]+}||�s|j|j|��qqW|S(s Get the marked changes (R8tmarked_keepR6R�tappendR�(R$tchangesR�R�((s-/usr/lib/python2.7/dist-packages/apt/cache.pytget_changessscCs(|j�|jj|�|j�dS(s�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(tcache_pre_changeR8tupgradeR/(R$tdist_upgrade((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR�}s
cCs\|jdkrtd��ntj|j�}tj�}|j||j|j�|j	S(s;Get the size of the packages that are required to download.s&Cache object used after close() calledN(
R:R5RRtPackageManagerR8tAcquiretget_archivesR<tfetch_needed(R$tpmtfetcher((s-/usr/lib/python2.7/dist-packages/apt/cache.pytrequired_download�scCs
|jjS(s8Get the size of the additional required space on the fs.(R8tusr_size(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pytrequired_space�scCs�t�}|jj}ttjtjf�}x[|jjD]M}||�}|r:|j	r:|j
|kr:|j|jdt
��q:q:W|S(sAReturn the packages not downloadable packages in reqreinst state.R�(RHR8tget_candidate_vert	frozensetRtINSTSTATE_REINSTREQtINSTSTATE_HOLD_REINSTREQR6R�tdownloadablet
inst_statetaddR�R�(R$t	reqreinstR�tstatesR}tcand((s-/usr/lib/python2.7/dist-packages/apt/cache.pytreq_reinstall_pkgs�s		 cCs&|dkr$tjjdt�}ng|jD]}|js.|^q.}|r||r|tddjd�|D����n|j	�}t}d}xX|jD]M}|j
|jkr�q�n|jr�q�n|d|j
|jf7}t}q�W||jkr
t|��n|r"t|��n|S(NsAPT::Get::AllowUnauthenticatedsUntrusted packages:
%ss
css|]}|jVqdS(N(tdesc_uri(R�ti((s-/usr/lib/python2.7/dist-packages/apt/cache.pys	<genexpr>�sR0sFailed to fetch %s %s
(R5RRGtfind_bR�titemst
is_trustedRR"truntstatust	STAT_DONEt	STAT_IDLER�t
error_textR�tRESULT_CANCELLEDRR(R$R�tallow_unauthenticatedtitemt	untrustedtrestfailedterr_msg((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt_run_fetcher�s.%
 	
cCsM|jdkrtd��n|j||j|j�s=tS|j||�S(s fetch the needed archives s&Cache object used after close() calledN(R:R5RR�R<R�R�(R$R�R�R�((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt_fetch_archives�scCs�|dk	r'|dk	r'td��n|dkrHtjjj�}n|dkrftj|�}n|j�$|j	|tj
|j�|�SWdQXdS(s�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
        s'Takes a progress or a an Acquire objectN(R5t
ValueErrorReRSttextRRR�RQR�R�R8(R$RSR�R�((s-/usr/lib/python2.7/dist-packages/apt/cache.pytfetch_archives�s
	cCsAy|j|}Wntk
r%tSXt|jo9|j�SdS(s0Return whether the package is a virtual package.N(R6RpR�tboolthas_providesR�(R$R�R}((s-/usr/lib/python2.7/dist-packages/apt/cache.pytis_virtual_package�s

cCs�t�}|jj}y+|j|}|jr?|r?t|�SWntk
rZt|�SXxU|jD]J\}}}	|	j}
|s�|	||
�kre|j	|j
|
��qeqeWt|�S(s)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.
        (RHR8R�R6R�RnRpt
provides_listt
parent_pkgR�R�(R$R�tcandidate_onlytinclude_nonvirtualt	providersR�tvptprovidestprovidesvertversionR�((s-/usr/lib/python2.7/dist-packages/apt/cache.pytget_providing_packages	s	

	ic
Cs�ttjjd���n|r�tjjd�}tjjd�}tjjd�}tjjdtjj|��tjjdd�tjjdd�tj	�}|j
�n	|j}z�|dkr�t
jjj�}ny|jj|||�}	Wntk
r}
t|
��nX|	r7|r7t��n|	SWd|r�tjjd|�tjjd|�tjjd|�nXWdQXdS(sRun 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
        sDir::State::ListssDir::Etc::sourcelistsDir::Etc::sourcepartssAPT::List-Cleanuptxxxt0N(RRRGRPtfindRHR R!RIR;RhR<R5ReRSRfRR6tupdatetSystemErrorR(R$tfetch_progresstpulse_intervaltraise_on_errortsources_listtold_sources_listtold_sources_list_dtold_cleanuptslistR�R(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR�*s<
	

cCs�y|j�Wntk
r+|j�nXtj�}|rKtj�nz|j|�}Wd|rttj�nXy|j�Wntk
r�|j	�nX|S(sY
        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.
        N(
tstartUpdatetAttributeErrortstart_updateRtpkgsystem_is_lockedtpkgsystem_unlock_innerR�tpkgsystem_lock_innertfinishUpdatet
finish_update(R$R�tinstall_progresst
did_unlockR�((s-/usr/lib/python2.7/dist-packages/apt/cache.pytinstall_archives]s 



cCs6|dkr!tjjj�}n|dkrBtjjj�}n|dk	sTt�tj���tj	|j
�}tj|�}|j��x�t
r|j|||�}|j||�}||jkr�Pn@||jkr�td��n"||jkr�ntd|��|j�q�WWdQXWdQX||jkS(s!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`.
        sinstallArchives() faileds<internal-error: unknown result code from InstallArchives: %sN(R5ReRSRfRRtAssertionErrorRt
SystemLockR�R8R�RQR�R�R�tRESULT_COMPLETEDt
RESULT_FAILEDR�tRESULT_INCOMPLETEtshutdown(R$R�R�R�R�R�R�((s-/usr/lib/python2.7/dist-packages/apt/cache.pytcommits.

		
cCs|jj�dS(s Unmark all changes N(R8tinit(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pytclear�scCs|jd�dS(s@ called internally if the cache has changed, emit a signal then R/N(Rc(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR/�scCs|jd�dS(sS called internally if the cache is about to change, emit
            a signal then R�N(Rc(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR��scCsY|dkr"tjdtd�n||jkrAg|j|<n|j|j|�dS(s�Connect to a signal.

        .. deprecated:: 1.0

            Please use connect2() instead, as this function is very
            likely to cause a memory leak.
        R.sAconnect() likely causes a reference cycle, use connect2() insteadiN(twarningstwarntRuntimeWarningR=R�(R$R_R`((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRF�s		
cOs@||jkrg|j|<n|j|j|||f�dS(s;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(R>R�(R$R_R`RaRb((s-/usr/lib/python2.7/dist-packages/apt/cache.pytconnect2�scCstj|j�S(s�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.
        (RtActionGroupR8(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pytactiongroup�scCsatjjtjjd��}x<tjtjj|d��D]}tj|d�r=t	Sq=Wt
S(s�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.
        sDir::State::statustupdatess[0-9]*(R R!tdirnameRRGt	find_filetlistdirR"tfnmatchR�R�(R$tdpkg_status_dirR^((s-/usr/lib/python2.7/dist-packages/apt/cache.pytdpkg_journal_dirtys		%cCs
|jjS(s7Return the number of packages with broken dependencies.(R8tbroken_count(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRscCs
|jjS(s2Return the number of packages marked for deletion.(R8t	del_count(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pytdelete_countscCs
|jjS(s6Return the number of packages marked for installation.(R8t
inst_count(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt
install_count"scCs
|jjS(s-Return the number of packages marked as keep.(R8t
keep_count(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR(sN(2RRRR5R�R%RWR.RNRcRRRiRZR&R)R�R�R�R�R�R�R�R�RoR�R�tpropertyR�R�R�R�R�R�R�R�R�R�R�R�R�R/R�RFR�R�RRR	RR(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR,dsd.					 					
							
	$	
 2	#7						tProblemResolvercBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(suResolve problems due to dependencies and conflicts.

    The first argument 'cache' is an instance of apt.Cache.
    cCs"tj|j�|_||_dS(N(RRR8t	_resolverR6(R$tcache((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR%5scCs|jj|j�dS(s'Reset the package to the default state.N(RR�Rq(R$Rt((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR�:scCs|jj|j�dS(s)Protect a package so it won't be removed.N(RtprotectRq(R$Rt((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR?scCs|jj|j�dS(sMark a package for removal.N(RR{Rq(R$Rt((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR{DscCs+|jj�|jj�|jj�dS(s:Resolve dependencies, try to remove packages where needed.N(R6R�RtresolveR/(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRIs

cCs+|jj�|jj�|jj�dS(s4Resolve dependencies, do not try to remove packages.N(R6R�Rtresolve_by_keepR/(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRPs

(	RRRR%R�RR{RR(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR/s					tFiltercBseZdZd�ZRS(s Filter base class cCstS(sn Filter function, return True if the package matchs a
            filter criteria and False otherwise
        (R�(R$R}((s-/usr/lib/python2.7/dist-packages/apt/cache.pytapply^s(RRRR(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR[stMarkedChangesFiltercBseZdZd�ZRS(s( Filter that returns all marked changes cCs'|js|js|jrtStSdS(N(tmarked_installt
marked_deletetmarked_upgradeR�R�(R$R}((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRis(RRRR(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRfstInstalledFiltercBseZdZd�ZRS(sMFilter that returns all installed packages.

    .. versionadded:: 1.0.0
    cCs|jS(N(tis_installed(R$R}((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRws(RRRR(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRqst_FilteredCacheHelpercBs2eZdZd�Zd�Zd�Zd�ZRS(s:Helper class for FilteredCache to break a reference cycle.cCs<i|_g|_|jd|j�|jd|j�dS(NR/R-(t	_filteredt_filtersR�tfilter_cache_post_change(R$R((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR%s		cCsUi|_xE|D]=}x4|jD])}|j|�r t|j|j<Pq q WqWdS(s internal helper to refilter N(RRRR�R_(R$RR}R^((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt_reapply_filter�s	
cCsg|_|jj|�dS(sSet the current active filter.N(RR�(R$tfilter((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt
set_filter�s	cCs|j|�dS(s;Called internally if the cache changes, emit a signal then.N(R (R$R((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR�s(RRRR%R R"R(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR|s
				t
FilteredCachecBsneZdZddd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
RS(sa A package cache that is filtered.

        Can work on a existing cache or create a new one
    cCs=|dkrt|�|_n	||_t|j�|_dS(N(R5R,RRt_helper(R$RRS((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR%�s	cCst|jj�S(N(RjR$R(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR��scCs|j|S(N(R(R$R|((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR��sccs'x |jjD]}|j|Vq
WdS(N(R$RR(R$R�((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR��scCs|jjj�S(N(R$RRo(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyRo�scCs
||kS(N((R$R|((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR��scCs7y|j|j|jjkSWntk
r2tSXdS(N(RR_R$RRpR�(R$R|((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR��s
cCs!|jj|�|jj�dS(sSet the current active filter.N(R$R"RR/(R$R!((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR"�scCs|jj|j�dS(s;Called internally if the cache changes, emit a signal then.N(R$RR(R$((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR�scCst|j|�S(s)we try to look exactly like a real cache.(tgetattrR(R$R|((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt__getattr__�sN(RRRR5R%R�R�R�RoR�R�R"RR&(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyR#�s								cCstd�dS(Nscache pre changed(tprint(R((s-/usr/lib/python2.7/dist-packages/apt/cache.pytcache_pre_changed�scCstd�dS(Nscache post changed(R'(R((s-/usr/lib/python2.7/dist-packages/apt/cache.pytcache_post_changed�scCs�td�tj�ttjjj��}|jdt	�|jdt
�td|k�|d}t|j�tt|��x-|j
�D]}||j|ks�t�q�W|j�|j�}tt|��x|D]}|js�t�q�Wx6ddgD](}tjj|�stj|�qqWtjjdd�tj|j�}tjtjjj��}|j||d�td�t|�}|jjdt	�|jjdt
�|jj�|jt ��tt|��x-|j
�D]}|||jks�t�q�Wtt|��td	�td
tjj!j��}|jjdt	�|jjdt
�|jj�|jt ��tt|��x-|j
�D]}|||jks�t�q�Wtt|��dS(sInternal test code.sCache self testR�R/taptitudes/tmp/pytests/tmp/pytest/partialsDir::Cache::Archivess.Testing filtered cache (argument is old cache)s$Testing filtered cache (no argument)RSN("R'RR�R,ReRSR�RR�R(R)R_RjRoR�R�R�R R!RJtmkdirRGRHR�R8R�RR�R5R#RR"RRf(RR}R�R�RR�R�tfiltered((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt_test�sV









t__main__(1t
__future__RRR R�R?ttypingRRRRRRRRR	R
RtImportErrorRtapt.packageRRtapt.progress.textRetapt.progress.baseRRRtIOErrorRRRRt	ExceptionRtobjectRR,RRRRRR#R(R)R-R(((s-/usr/lib/python2.7/dist-packages/apt/cache.pyt<module>s^L
	���,$<			9