[packagekit] yum backend free filter

Tim Lauridsen tim.lauridsen at googlemail.com
Thu Dec 20 00:09:57 PST 2007


Richard Hughes wrote:
> Just testing the new free filter:
> 
> [hughsie at hughsie-laptop PackageKit]$ sudo /usr/share/PackageKit/helpers/yum/search-name.py "free" pl
> allow-interrupt true
> no-percentage-updates
> status  query
> Traceback (most recent call last):
>   File "/usr/share/PackageKit/helpers/yum/search-name.py", line 21, in <module>
>     backend.search_name(options,searchterms)
>   File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 386, in search_name
>     self._do_search(searchlist, filters, key)
>   File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 306, in _do_search
>     if self._do_extra_filtering(pkg,fltlist):
>   File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 331, in _do_extra_filtering
>     if not self._do_free_filtering(filter, pkg):
>   File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 373, in _do_free_filtering
>     isFree = self.check_license_field(pkg.license)
>   File "/usr/lib/python2.5/site-packages/packagekit/backend.py", line 221, in check_license_field
>     if license in PackageKitEnum.fsf_free_licenses:
> AttributeError: class PackageKitEnum has no attribute 'fsf_free_licenses'
> 
> Boom. Additionally, is there anyway we can put all tracebacks in the error signal? Thanks guys.
> 
> Richard.
> 
> 
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit

looks like fsf_free_licenses is missing in enums.py, enums.py is auto 
generated from libpackagekit/pk-enum.c, i dont see any fsf_free_licenses 
enums in pk-enum.c.
Robin, do you missed pushing when adding the free filtering to the yum 
backend ?

The Tracebacks can be put into error signals, but i have find a good way 
to add it without making the code crappy ( try / except blocks around 
all functions )


Tim




More information about the PackageKit mailing list