From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Alex DAMIAN <alexandru.damian@intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 07/13] bitbake: cooker, command: add a command to return global data
Date: Fri, 13 Sep 2013 15:52:46 +0100 [thread overview]
Message-ID: <1379083966.3484.267.camel@ted> (raw)
In-Reply-To: <a1812224527bb7669488131821eb6989fcda6917.1378743829.git.alexandru.damian@intel.com>
On Mon, 2013-09-09 at 17:40 +0100, Alex DAMIAN wrote:
> From: Alexandru DAMIAN <alexandru.damian@intel.com>
>
> Adding the 'getDataDump' read-only command that will
> return a dump of the global data state.
>
> This will be used by the DSI to store the build configuration.
>
> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
> ---
> bitbake/lib/bb/command.py | 7 +++++++
> bitbake/lib/bb/cooker.py | 13 +++++++++++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
> index 3527ad0..4d36c4b 100644
> --- a/bitbake/lib/bb/command.py
> +++ b/bitbake/lib/bb/command.py
> @@ -145,6 +145,13 @@ class CommandsSync:
> """
> command.cooker.stop()
>
> + def getDataDump(self, command, params):
> + """
> + Returns a dump of the global state.
> + """
> + return command.cooker.getGlobalExpandedData()
> + getDataDump.readonly = True
> +
> def getVariable(self, command, params):
> """
> Read the value of a variable from data
> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index 9fd3417..383c9c4 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -1117,6 +1117,19 @@ class BBCooker:
>
> self.configuration.server_register_idlecallback(buildTargetsIdle, rq)
>
> +
> + def getGlobalExpandedData(self):
> + dump = {}
> + for k in self.data.keys():
> + try:
> + v = self.data.getVar(k, True)
> + if not k.startswith("__") and not bool(self.data.getVarFlag(k, 'func')) and not isinstance(v, bb.data_smart.DataSmart):
> + dump[k] = { 'v' : v, 'd' : self.data.getVarFlag(k, 'doc') }
> + except:
> + pass
> + return dump
There is a 'doc' hardcoded into there, perhaps this should be a better
named command and take a parameter?
Cheers,
Richard
next prev parent reply other threads:[~2013-09-13 14:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 16:40 [PATCH 00/13] webhob related changes in bitbake Alex DAMIAN
2013-09-09 16:40 ` [PATCH 01/13] bitbake: cooker: clean up code and avoid duplication Alex DAMIAN
2013-09-09 16:40 ` [PATCH 02/13] bitbake: runqueue: Add runQueueTaskSkipped event Alex DAMIAN
2013-09-09 16:40 ` [PATCH 03/13] bitbake: runqueue: added prebuild detailed information Alex DAMIAN
2013-09-09 16:40 ` [PATCH 04/13] bitbake: runqueue, build: event data change Alex DAMIAN
2013-09-10 13:52 ` Richard Purdie
2013-09-09 16:40 ` [PATCH 05/13] bitbake: runqueue: add sceneQueueTaskCompleted event Alex DAMIAN
2013-09-09 16:40 ` [PATCH 06/13] bitbake: build: add link to logfile for Task events Alex DAMIAN
2013-09-10 14:01 ` Richard Purdie
2013-09-09 16:40 ` [PATCH 07/13] bitbake: cooker, command: add a command to return global data Alex DAMIAN
2013-09-13 14:52 ` Richard Purdie [this message]
2013-09-09 16:40 ` [PATCH 08/13] bitbake: cooker: use prepareTreeData when computing environment Alex DAMIAN
2013-09-09 16:41 ` [PATCH 09/13] bitbake: event: do not abort on UI handlers error Alex DAMIAN
2013-09-09 16:49 ` Richard Purdie
2013-09-09 16:41 ` [PATCH 10/13] bitbake: add SinglePackageInfo event Alex DAMIAN
2013-09-09 16:41 ` [PATCH 11/13] bitbake: event: adding an event to pass build file sizes Alex DAMIAN
2013-09-09 16:41 ` [PATCH 12/13] bitbake: xmlrpc: delete unused code BitBakeUIEventServer Alex DAMIAN
2013-09-09 16:41 ` [PATCH 13/13] bitbake: cooker: add extra recipe information Alex DAMIAN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1379083966.3484.267.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=alexandru.damian@intel.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.