| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/PackageKit/helpers/yum/ |
Upload File : |
Ñò
°séJc @ sU d d k Td d k Td d k Z d d k Z e i d ƒ Z d e f d „ ƒ YZ d S( iÿÿÿÿ( t *Ns
(qt)|(gtk)t YumFilterc B sw e Z d d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d
„ Z d „ Z d „ Z
RS(
t nonec C se t i | | ƒ t i i ƒ } | d j o d d d d g | _ n
| g | _ | i i d ƒ d S( Nt i386t i486t i586t i686t noarch( t PackagekitFiltert __init__t rpmUtilst archt getBaseArcht
basearch_listt append( t selft fltlistt basearch( ( s. /usr/share/PackageKit/helpers/yum/yumFilter.pyR s
c C sC | i d ƒ o t S| i d ƒ o t S| i d ƒ o t St S( Ns
-debuginfos -devels -libs( t endswitht Falset True( R t repo( ( s. /usr/share/PackageKit/helpers/yum/yumFilter.pyt _is_main_package) s c C sÁ g } g } g } xs | D]k \ } } | i o9 t i i | i ƒ d } | i | | | | i f ƒ q | i | | d | i f ƒ q Wxg | D]_ \ } } } } | | i j o= | | f | j o* | i | | f ƒ | i | | f ƒ q q Wxn | D]f \ } } } } | | f | j oA | i | i ƒ o* | i | | f ƒ | i | | f ƒ q_qù qù WxW | D]O \ } } } } | | f | j o* | i | | f ƒ | i | | f ƒ qjqjW| S( sG
Filter the list so that the number of packages are reduced.
This is done by only displaying gtk2 rather than gtk2-devel, gtk2-debuginfo, etc.
This imlementation is done by comparing the SRPM name, and if not falling back
to the first entry.
We have to fall back else we don't emit packages where the SRPM does not produce a
RPM with the same name, for instance, mono produces mono-core, mono-data and mono-winforms.
@package_list: a (pkg, status) list of packages
A new list is returned that has been filtered
i t nosrpm( t sourcerpmR
t miscutilst
splitFilenameR t versiont nameR ( R t package_listt base_listt output_listt base_list_already_gott pkgt statust baseR ( ( s. /usr/share/PackageKit/helpers/yum/yumFilter.pyt _basename_filter2 s4
# c C s h } x| | D]t \ } } | i | ƒ } | i | i | f } | | j o' | | | d j o q
n | | =n | | f | | <q
W| i ƒ S( sC
Only return the newest package for each name.arch
i ( t _pkg_is_installedR R t values( R t pkglistt newestR! t statet instt key( ( s. /usr/share/PackageKit/helpers/yum/yumFilter.pyt _do_newest_filtering] s
c C sY t | i j o | i | i ƒ | _ n t | i j o | i | i ƒ | _ n | i S( s6 do filtering we couldn't do when generating the list ( t FILTER_BASENAMER R$ R t
FILTER_NEWESTR, ( R ( ( s. /usr/share/PackageKit/helpers/yum/yumFilter.pyt post_processt s
c C s&