From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Alex DAMIAN <alexandru.damian@intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 4/7] bitbake: cooker: add extra recipe information
Date: Mon, 16 Sep 2013 15:10:56 +0100 [thread overview]
Message-ID: <1379340656.3484.309.camel@ted> (raw)
In-Reply-To: <039a39382824feb5ed5e28a8beb40855a6657170.1379338189.git.alexandru.damian@intel.com>
On Mon, 2013-09-16 at 14:33 +0100, Alex DAMIAN wrote:
> From: Alexandru DAMIAN <alexandru.damian@intel.com>
>
> Adding in the extra recipe information when creating
> the dependency tree information.
>
> This works in server-mode because the HOB extra_cache
> is already enabled. In normal mode, it will do nothing
> with no performance impact.
>
> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
> ---
> bitbake/lib/bb/cooker.py | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index 68a3c01..cb0e3e5 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -439,6 +439,29 @@ class BBCooker:
> depend_tree["pn"][pn] = {}
> depend_tree["pn"][pn]["filename"] = fn
> depend_tree["pn"][pn]["version"] = version
> +
> + # This data is needed for webhob;
> + # it's here if the bitbake runs in server mode
> + try:
> + summary = self.recipecache.summary[fn]
> + lic = self.recipecache.license[fn]
> + section = self.recipecache.section[fn]
> + description = self.recipecache.description[fn]
> + homepage = self.recipecache.homepage[fn]
> + bugtracker = self.recipecache.bugtracker[fn]
> + inherits = self.recipecache.inherits.get(fn, None)
> + depend_tree["pn"][pn]["filename"] = fn
> + depend_tree["pn"][pn]["version"] = version
> + depend_tree["pn"][pn]["summary"] = summary
> + depend_tree["pn"][pn]["license"] = lic
> + depend_tree["pn"][pn]["section"] = section
> + depend_tree["pn"][pn]["description"] = description
> + depend_tree["pn"][pn]["inherits"] = inherits
> + depend_tree["pn"][pn]["homepage"] = homepage
> + depend_tree["pn"][pn]["bugtracker"] = bugtracker
> + except:
> + pass
> +
> for dep in rq.rqdata.runq_depends[task]:
> depfn = taskdata.fn_index[rq.rqdata.runq_fnid[dep]]
> deppn = self.recipecache.pkg_fn[depfn]
This is horrible, please try and do something like:
diff --git a/bitbake/lib/bb/cache_extra.py b/bitbake/lib/bb/cache_extra.py
index 9e38a43..041ba0e 100644
--- a/bitbake/lib/bb/cache_extra.py
+++ b/bitbake/lib/bb/cache_extra.py
@@ -67,3 +67,6 @@ class HobRecipeInfo(RecipeInfoCommon):
cachedata.bugtracker[fn] = self.bugtracker
cachedata.prevision[fn] = self.prevision
cachedata.files_info[fn] = self.files_info
+
+ @staticmethod
+ def addDepTreePackageInfo(xxx)
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 2c8d4dc..84d62e5 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -485,6 +485,10 @@ class BBCooker:
depend_tree["packages"][package]["filename"] = fn
depend_tree["packages"][package]["version"] = version
+ for extracache in self.cooker.caches_array:
+ if <executable function>:
+ <function>(depend_tree["packages"][package])
+
return depend_tree
so the extra cache info is added as a staticmethod function in the extra
cache info file which generated the data. You might as well fix the
hardcoding in the following function marked with:
######## WARNING : this function requires cache_extra to be enabled ########
to use this approach too whilst you're doing this.
Thanks,
Richard
next prev parent reply other threads:[~2013-09-16 14:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-16 13:32 [PATCH v3 0/7] webhob related changes in bitbake, version 3 Alex DAMIAN
2013-09-16 13:33 ` [PATCH 1/7] bitbake: cooker: clean up code and avoid duplication Alex DAMIAN
2013-09-16 13:33 ` [PATCH 2/7] bitbake: event: send the task dependency tree to UI Alex DAMIAN
2013-09-16 15:32 ` Richard Purdie
2013-09-16 13:33 ` [PATCH 3/7] bitbake: runqueue: add runQueueTaskSkipped event Alex DAMIAN
2013-09-16 14:24 ` Richard Purdie
2013-09-16 14:32 ` Damian, Alexandru
2013-09-16 15:23 ` Richard Purdie
2013-09-16 13:33 ` [PATCH 4/7] bitbake: cooker: add extra recipe information Alex DAMIAN
2013-09-16 14:10 ` Richard Purdie [this message]
2013-09-16 13:33 ` [PATCH 5/7] bitbake: cooker, command: add a command to return global data Alex DAMIAN
2013-09-16 13:54 ` Richard Purdie
2013-09-16 13:33 ` [PATCH 6/7] bitbake: event: adding events to allow bbclasses to push custom info Alex DAMIAN
2013-09-16 13:46 ` Richard Purdie
2013-09-16 13:56 ` Damian, Alexandru
2013-09-16 15:20 ` Richard Purdie
2013-09-16 13:33 ` [PATCH 7/7] bitbake: runqueue: add task hash to Queue events 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=1379340656.3484.309.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox