summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/taskdata.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/taskdata.py')
-rw-r--r--bitbake/lib/bb/taskdata.py35
1 files changed, 22 insertions, 13 deletions
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index 181bb5e35b..17d6d95530 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):
"""