From f5665d5bfcfb13d01da9e4c7d5046453e80f7baf Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 8 Jan 2007 23:53:01 +0000 Subject: bitbake: Sync with upstream. * File licence headers were sanitised causing most of the diff. * cooker.py was created from bin/bitbake. * cvs fetcher port option was added * The -f force option was fixed to work correctly * Multiple entries in rrecrdeps are now handled correctly (allows adding do_deploy to image depends) git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1129 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- bitbake/lib/bb/taskdata.py | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'bitbake/lib/bb/taskdata.py') diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py index 181bb5e35..17d6d9553 100644 --- a/bitbake/lib/bb/taskdata.py +++ b/bitbake/lib/bb/taskdata.py @@ -6,19 +6,23 @@ BitBake 'TaskData' implementation Task data collection and handling -Copyright (C) 2006 Richard Purdie - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License version 2 as published by the Free -Software Foundation - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with """ +# Copyright (C) 2006 Richard Purdie +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from bb import data, fetch, event, mkdirhier, utils import bb, os @@ -86,10 +90,11 @@ class TaskData: return self.fn_index.index(name) - def gettask_id(self, fn, task): + def gettask_id(self, fn, task, create = True): """ Return an ID number for the task matching fn and task. - If it doesn't exist, create one. + If it doesn't exist, create one by default. + Optionally return None instead. """ fnid = self.getfn_id(fn) @@ -97,6 +102,9 @@ class TaskData: if task in self.tasks_lookup[fnid]: return self.tasks_lookup[fnid][task] + if not create: + return None + self.tasks_name.append(task) self.tasks_fnid.append(fnid) self.tasks_tdepends.append([]) @@ -529,6 +537,7 @@ class TaskData: bb.msg.debug(1, bb.msg.domain.TaskData, "Resolved " + str(added) + " extra dependecies") if added == 0: break + # self.dump_data() def dump_data(self): """ -- cgit v1.2.3