From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: [PATCH] bitbake: normalize build targets
Date: Wed, 14 Oct 2015 11:41:13 +0300 [thread overview]
Message-ID: <1444812073-9024-1-git-send-email-ed.bartosh@linux.intel.com> (raw)
In-Reply-To: <1444625699.29375.12.camel@linuxfoundation.org>
BuildStarted event not fully represents build tasks for
the targets. If -c option is used to specify default task
it's not included into the event.
Made build targets to always look as <target>:do_<task>.
Consider default task (do_build or specified by -c command
line option) when normalizing.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
bitbake/lib/bb/cooker.py | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index a0d7d59..7e84a7c 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1391,10 +1391,28 @@ class BBCooker:
build.reset_cache()
self.buildSetVars()
+ # If we are told to do the None task then query the default task
+ if (task == None):
+ task = self.configuration.cmd
+
+ if not task.startswith("do_"):
+ task = "do_%s" % task
+
taskdata, runlist, fulltargetlist = self.buildTaskData(targets, task, self.configuration.abort)
buildname = self.data.getVar("BUILDNAME", False)
- bb.event.fire(bb.event.BuildStarted(buildname, fulltargetlist), self.data)
+
+ # make targets to always look as <target>:do_<task>
+ ntargets = []
+ for target in fulltargetlist:
+ if ":" in target:
+ if ":do_" not in target:
+ target = "%s:do_%s" % tuple(target.split(":"))
+ else:
+ target = "%s:%s" % (target, task)
+ ntargets.append(target)
+
+ bb.event.fire(bb.event.BuildStarted(buildname, ntargets), self.data)
rq = bb.runqueue.RunQueue(self, self.data, self.recipecache, taskdata, runlist)
if 'universe' in targets:
--
2.1.4
next prev parent reply other threads:[~2015-10-14 8:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-05 9:43 [PATCH 0/6] Fixes for toastergui Elliot Smith
2015-10-05 9:43 ` [PATCH 1/6] event: add new property to BuildBase class Elliot Smith
2015-10-11 4:22 ` Richard Purdie
2015-10-11 20:02 ` Ed Bartosh
2015-10-12 4:54 ` Richard Purdie
2015-10-13 8:33 ` Ed Bartosh
2015-10-14 8:41 ` Ed Bartosh [this message]
2015-10-14 22:20 ` [PATCH] bitbake: normalize build targets Christopher Larson
2015-10-15 8:37 ` [PATCH v2] " Ed Bartosh
2015-10-16 13:09 ` Richard Purdie
2015-10-05 9:43 ` [PATCH 2/6] event: add new parameter to Build* event APIs Elliot Smith
2015-10-05 9:43 ` [PATCH 3/6] toaster: add task to the target_information Elliot Smith
2015-10-05 9:43 ` [PATCH 4/6] toaster: add get_or_create_targets API Elliot Smith
2015-10-05 9:43 ` [PATCH 5/6] toaster: ignore ReachableStamps event Elliot Smith
2015-10-05 9:43 ` [PATCH 6/6] toaster: use meaningful logging levels Elliot Smith
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=1444812073-9024-1-git-send-email-ed.bartosh@linux.intel.com \
--to=ed.bartosh@linux.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