HEX
Server: Apache
System: Linux hp3-stn-1011028.hostingp3.local 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: csh958633 (951153)
PHP: 8.3.30
Disabled: shell_exec,exec,system,popen,set_time_limit
Upload Files
File: //lib/python2.7/site-packages/packagekit/filter.pyc
�
�^c@sCddlTddlmZddlZdeefd��YZdS(i(t*(tPackagekitPackagei����NtPackagekitFiltercBs�eZdd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(tnonecCs||_g|_i|_dS(s save state N(tfltlisttpackage_listtinstalled_unique(tselfR((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyt__init__s		cCs+x$|D]}|jj|tf�qWdS(s3 add a list of packages that are already installed N(RtappendtINFO_INSTALLED(Rtpkgstpkg((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyt
add_installed"s
cCs+x$|D]}|jj|tf�qWdS(s+ add a list of packages that are available N(RR	tINFO_AVAILABLE(RRR((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyt
add_available's
cCs|jj||f�dS(s% add a custom packages indervidually N(RR	(RRtinfo((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyt
add_custom,scCs�x�|jD]�}|ttfkr;|j||�s�tSq
|ttfkrf|j||�s�tSq
|tt	fkr�|j
||�s�tSq
|ttfkr
|j
||�s�tSq
q
WtS(s% do extra filtering (gui, devel etc) (Rt
FILTER_GUItFILTER_NOT_GUIt_do_gui_filteringtFalsetFILTER_DEVELOPMENTtFILTER_NOT_DEVELOPMENTt_do_devel_filteringtFILTER_FREEtFILTER_NOT_FREEt_do_free_filteringtFILTER_ARCHtFILTER_NOT_ARCHt_do_arch_filteringtTrue(RRtflt((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyt_filter_base0scCsCx<|jD]1}|ttfkr
|j||�s;tSq
q
WtS(s% do extra filtering (gui, devel etc) (RtFILTER_INSTALLEDtFILTER_NOT_INSTALLEDt_do_installed_filteringRR(RRR ((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyt_filter_installedAs
cCs�|j}g|_x<|D]4\}}|j|�r|jj||f�qqWtjt�}x@|jD]5\}}|tkrj||j|�j|�qjqjW|j}g|_x�|D]�\}}t}|t	kr/xR||j|�D]:}|j
||�}|dks|dkr�t}Pq�q�Wn|r�|jj||f�q�q�W|j}g|_x<|D]4\}}|j|�rk|jj||f�qkqkW|j
�S(sF
        do filtering we couldn't do when generating the list
        ii����(RR!R	tcollectionstdefaultdicttlistR
t
_pkg_get_nameRRt_pkg_compareRR%tpost_process(RRRtstatetinstalled_dicttaddtpkg_tmptrc((s5/usr/lib/python2.7/site-packages/packagekit/filter.pytget_package_listIs6		!				cCs|jS(sv
        do filtering we couldn't do when generating the list
        Needed to be implemented in a sub class
        (R(R((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyR+{scCsdS(s"
        Returns a version comparison of the packages, where:
        -2 : pkg1 not comparable with pkg2
        -1 : pkg2 is newer than pkg1
         0 : pkg1 == pkg2
         1 : pkg1 is newer than pkg2
         2 : not implemented
        Needed to be implemented in a sub class
        i((Rtpkg1tpkg2((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyR*�s
cCsdS(s~
        Returns the name of the package used for duplicate filtering
        Needed to be implemented in a sub class
        N(tNone(RR((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyR)�scCstS(se
        Return if the package is installed.
        Needed to be implemented in a sub class
        (R(RR((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyt_pkg_is_installed�scCstS(sg
        Return if the package is development.
        Needed to be implemented in a sub class
        (R(RR((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyt
_pkg_is_devel�scCstS(si
        Return if the package is a GUI program.
        Needed to be implemented in a sub class
        (R(RR((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyt_pkg_is_gui�scCstS(si
        Return if the package is free software.
        Needed to be implemented in a sub class
        (R(RR((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyt_pkg_is_free�scCstS(s�
        Return if the package is the same architecture as the machine.
        Needed to be implemented in a sub class
        (R(RR((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyt_pkg_is_arch�scCs4|j|�}|tkr$t}nt}||kS(N(R5R"RR(RR Rtis_installedtwant_installed((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyR$�s
	cCs4|j|�}|tkr$t}nt}||kS(N(R6RRR(RR Rtis_develt
want_devel((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyR�s
	cCs4|j|�}|tkr$t}nt}||kS(N(R7RRR(RR Rtis_guitwant_gui((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyR�s
	cCs4|j|�}|tkr$t}nt}||kS(N(R8RRR(RR Rtis_freet	want_free((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyR�s
	cCs4|j|�}|tkr$t}nt}||kS(N(R9RRR(RR Rtis_archt	want_arch((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyR�s
	(t__name__t
__module__RR
RRR!R%R1R+R*R)R5R6R7R8R9R$RRRR(((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyRs(						2												(tenumstpackageRR&tobjectR(((s5/usr/lib/python2.7/site-packages/packagekit/filter.pyt<module>s