summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/taskdata.py
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-01-08 23:53:01 +0000
committerRichard Purdie <richard@openedhand.com>2007-01-08 23:53:01 +0000
commitf5665d5bfcfb13d01da9e4c7d5046453e80f7baf (patch)
treeb8908549afaf3006bf3763419711090ac999c2a4 /bitbake/lib/bb/taskdata.py
parentaec95de5f7dca2afa3a4a0bdb0d4d553c13f680d (diff)
downloadpoky-f5665d5bfcfb13d01da9e4c7d5046453e80f7baf.tar.gz
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
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
6 6
7Task data collection and handling 7Task data collection and handling
8 8
9Copyright (C) 2006 Richard Purdie
10
11This program is free software; you can redistribute it and/or modify it under
12the terms of the GNU General Public License version 2 as published by the Free
13Software Foundation
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License along with
20""" 9"""
21 10
11# Copyright (C) 2006 Richard Purdie
12#
13# This program is free software; you can redistribute it and/or modify
14# it under the terms of the GNU General Public License version 2 as
15# published by the Free Software Foundation.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License along
23# with this program; if not, write to the Free Software Foundation, Inc.,
24# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25
22from bb import data, fetch, event, mkdirhier, utils 26from bb import data, fetch, event, mkdirhier, utils
23import bb, os 27import bb, os
24 28
@@ -86,10 +90,11 @@ class TaskData:
86 90
87 return self.fn_index.index(name) 91 return self.fn_index.index(name)
88 92
89 def gettask_id(self, fn, task): 93 def gettask_id(self, fn, task, create = True):
90 """ 94 """
91 Return an ID number for the task matching fn and task. 95 Return an ID number for the task matching fn and task.
92 If it doesn't exist, create one. 96 If it doesn't exist, create one by default.
97 Optionally return None instead.
93 """ 98 """
94 fnid = self.getfn_id(fn) 99 fnid = self.getfn_id(fn)
95 100
@@ -97,6 +102,9 @@ class TaskData:
97 if task in self.tasks_lookup[fnid]: 102 if task in self.tasks_lookup[fnid]:
98 return self.tasks_lookup[fnid][task] 103 return self.tasks_lookup[fnid][task]
99 104
105 if not create:
106 return None
107
100 self.tasks_name.append(task) 108 self.tasks_name.append(task)
101 self.tasks_fnid.append(fnid) 109 self.tasks_fnid.append(fnid)
102 self.tasks_tdepends.append([]) 110 self.tasks_tdepends.append([])
@@ -529,6 +537,7 @@ class TaskData:
529 bb.msg.debug(1, bb.msg.domain.TaskData, "Resolved " + str(added) + " extra dependecies") 537 bb.msg.debug(1, bb.msg.domain.TaskData, "Resolved " + str(added) + " extra dependecies")
530 if added == 0: 538 if added == 0:
531 break 539 break
540 # self.dump_data()
532 541
533 def dump_data(self): 542 def dump_data(self):
534 """ 543 """