Skip to content

RFC Don't use set() for datastore variables

Joshua Lock bitbake-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1cache|cooker|parse: switch __depends from a set to a dictlib/bb/cache.py lib/bb/cooker.py lib/bb/parse/__init__.py +1 more+16 -150 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/1] Don't use set() for datastore variables

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.

I've assumed that storing variables in the datastore that cannot be accessed using the getVariable API with each of our servers is a bad thing and the attached patch changes the use of set to a dict.

There are, of course, alternative workarounds for this issue. For example, we could create a new variable to list file dependencies, but that seems a little wasteful? Or we could add some logic to the xmlrpc server to ensure it doesn't try and marshal unsupported types?

Comments?

Regards,
Joshua

The following changes since commit 24272dae15ccf641ece11ef5a6e2bfa3ebb6f5f9:

lib/bb/siggen.py: return a string from noop get_taskhash (2011-09-05 20:16:08 +0100)

are available in the git repository at:
git://github.com/incandescant/bitbake hob
https://github.com/incandescant/bitbake/tree/hob

Joshua Lock (1):
cache|cooker|parse: switch __depends from a set to a dict

 lib/bb/cache.py          |   11 ++++++-----
 lib/bb/cooker.py         |    8 ++++----
 lib/bb/parse/__init__.py |    4 ++--
 lib/bb/ui/hob.py         |    8 ++++----
 4 files changed, 16 insertions(+), 15 deletions(-)
Signature · 1 line
1.7.6