All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] bitbake: cooker: convert type which needs to be marshalled
@ 2016-11-29  9:57 Sujith Haridasan
  2016-11-29  9:57 ` [PATCH 1/1] " Sujith Haridasan
  0 siblings, 1 reply; 3+ messages in thread
From: Sujith Haridasan @ 2016-11-29  9:57 UTC (permalink / raw)
  To: bitbake-devel

From: Sujith H <sujith.h@gmail.com>

While working on toaster, I found that when data returned from getAllKeysWithFlags 
was causing problem. So after debugging I found that one of the variable was having
a data type which couldn't be marshalled by xmlrpc. So this patch helps us
to make the data of type string.


The following changes since commit 71b7c3a88ec5a20d5e4531751d0bf23d5c94e494:

  Revert "classes/populate_sdk_ext: require uninative" (2016-11-28 15:49:15 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib sujith/xmlrpc-cooker-fix
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=sujith/xmlrpc-cooker-fix

Sujith H (1):
  bitbake: cooker: convert type which needs to be marshalled

 bitbake/lib/bb/cooker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] bitbake: cooker: convert type which needs to be marshalled
  2016-11-29  9:57 [PATCH 0/1] bitbake: cooker: convert type which needs to be marshalled Sujith Haridasan
@ 2016-11-29  9:57 ` Sujith Haridasan
  2016-11-29 16:33   ` Christopher Larson
  0 siblings, 1 reply; 3+ messages in thread
From: Sujith Haridasan @ 2016-11-29  9:57 UTC (permalink / raw)
  To: bitbake-devel

From: Sujith H <sujith.h@gmail.com>

We assume that the value taken by variable v can be string,
integer or any type which can be marshalled by xmlrpc. This
change would help us to convert the non marshallable types
to string. So that we don't get exception from xmlrpc.

[YOCTO #10740]

Signed-off-by: Sujith H <sujith.h@gmail.com>
---
 bitbake/lib/bb/cooker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index c08af45..1dab450 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1488,7 +1488,7 @@ class BBCooker:
                 v = self.data.getVar(k, expand)
                 if not k.startswith("__") and not isinstance(v, bb.data_smart.DataSmart):
                     dump[k] = {
-    'v' : v ,
+    'v' : repr(v) ,
     'history' : self.data.varhistory.variable(k),
                     }
                     for d in flaglist:
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] bitbake: cooker: convert type which needs to be marshalled
  2016-11-29  9:57 ` [PATCH 1/1] " Sujith Haridasan
@ 2016-11-29 16:33   ` Christopher Larson
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Larson @ 2016-11-29 16:33 UTC (permalink / raw)
  To: Sujith Haridasan; +Cc: bitbake-devel@lists.openembedded.org

[-- Attachment #1: Type: text/plain, Size: 1402 bytes --]

On Tue, Nov 29, 2016 at 2:57 AM, Sujith Haridasan <sujith.h@gmail.com>
wrote:

> From: Sujith H <sujith.h@gmail.com>
>
> We assume that the value taken by variable v can be string,
> integer or any type which can be marshalled by xmlrpc. This
> change would help us to convert the non marshallable types
> to string. So that we don't get exception from xmlrpc.
>
> [YOCTO #10740]
>
> Signed-off-by: Sujith H <sujith.h@gmail.com>
> ---
>  bitbake/lib/bb/cooker.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index c08af45..1dab450 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -1488,7 +1488,7 @@ class BBCooker:
>                  v = self.data.getVar(k, expand)
>                  if not k.startswith("__") and not isinstance(v,
> bb.data_smart.DataSmart):
>                      dump[k] = {
> -    'v' : v ,
> +    'v' : repr(v) ,
>      'history' : self.data.varhistory.variable(k),
>                      }
>                      for d in flaglist:
>

I think str(v) would be more appropriate here. We need it to be a string,
not necessarily a more complete representation of the object.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 2211 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-29 16:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-29  9:57 [PATCH 0/1] bitbake: cooker: convert type which needs to be marshalled Sujith Haridasan
2016-11-29  9:57 ` [PATCH 1/1] " Sujith Haridasan
2016-11-29 16:33   ` Christopher Larson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.