From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mail.openembedded.org (Postfix) with ESMTP id BF394759D5 for ; Wed, 14 Oct 2015 08:41:19 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 14 Oct 2015 01:41:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,681,1437462000"; d="scan'208";a="580439237" Received: from linux.intel.com ([10.23.219.25]) by FMSMGA003.fm.intel.com with ESMTP; 14 Oct 2015 01:41:20 -0700 Received: from vmed.fi.intel.com (vmed.fi.intel.com [10.237.72.51]) by linux.intel.com (Postfix) with ESMTP id 13B2A6A4005; Wed, 14 Oct 2015 01:40:19 -0700 (PDT) From: Ed Bartosh To: bitbake-devel@lists.openembedded.org Date: Wed, 14 Oct 2015 11:41:13 +0300 Message-Id: <1444812073-9024-1-git-send-email-ed.bartosh@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444625699.29375.12.camel@linuxfoundation.org> References: <1444625699.29375.12.camel@linuxfoundation.org> Subject: [PATCH] bitbake: normalize build targets X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 08:41:25 -0000 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 :do_. Consider default task (do_build or specified by -c command line option) when normalizing. Signed-off-by: Ed Bartosh --- 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 :do_ + 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