[bitbake-devel] [RFC PATCH 0/1] Don't use set() for datastore variables

Joshua Lock josh at linux.intel.com
Mon Sep 12 20:42:51 UTC 2011


On Wed, 2011-09-07 at 14:27 -0700, Joshua Lock wrote:
> This is an RFC patch.
> 
> I recently implemented a check within the hob gui to ensure that it's running with the
> required pre and post configuration files. However this check uses a variable from the data
> store which is a Python set container.
> 
> The Python xmlrpclib is unable to marshal sets and therefore the patch I added breaks hob
> when using the xmlrpc server backend.

"Why can't xmlrpclib marshal a set?" - I pretend to hear you ask.
xmlrpclib will only marshal objects with a type which can be serialized
to XML. A set has no direct XML equivalent, so the marshalling fails.

As alluded to in my original mail, we could approach this in alternative
ways. The most obvious being to add an extra step to serialise the set,
or any other passed objects, to some more appropriate form. We already
use the pickle module in various places and this is an obvious contender
here, however I'm not clear on how we would introduce this *just* for
the xmlrpc server.

Would profiling data make this change more palatable? If so what sort of
profiling would people like to see?

Comments appreciated,
Joshua
-- 
Joshua Lock
        Yocto Project "Johannes factotum"
        Intel Open Source Technology Centre





More information about the bitbake-devel mailing list