[packagekit] ACTION REQUIRED: please fix up your python backends

Richard Hughes hughsient at gmail.com
Fri Feb 19 03:47:11 PST 2010


Guys,

I've just committed this change:

commit 1dad89f15c235158a59b13cbd1d9f9bd46ebbcda
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Feb 19 11:41:47 2010 +0000

    Change the python helpers to get sent an array of values, not a
delimited string

    This requires backend authors to change thier backed so that the
search term passed
    to search-name, search-details, search-group, search-details and
what-provides is
    now an array of strings, not a single string.

So if you have a spawned python backend (apt, conary, entropy, pisi,
portage, smart or yum) please remove hacks you've got such as this:

    def what_provides(self, filters, provides_type, values):
        values = values.split('&')

And search from a list. So it's no longer acceptable to do:

    def what_provides(self, filters, provides_type, values):
        search_provides_for_string (values)

and what you'll need to make sure you're doing:

    def what_provides(self, filters, provides_type, values):
        for value in values:
            search_provides_for_string (value)

If it unclear, or you want me to convert your backend for you, please
shout on the mailing list.

I'm making this change so all backends do not have to split the
strings themselves, and so we can ensure that all backends support
multiple search terms. I'll convert the yum backend now.

Thanks,

Richard.



More information about the PackageKit mailing list