diff options
author | Richard Purdie <richard@openedhand.com> | 2007-08-20 07:48:43 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-08-20 07:48:43 +0000 |
commit | d8bfa5c6eff1cff34895304a33be671fb141084e (patch) | |
tree | 8f63f2cad401f42f5dd30930b0f042aa9c5bdaf8 /bitbake/lib/bb/runqueue.py | |
parent | e68823a20c6e3b629c947bc7e329e5ea71a9860c (diff) | |
download | poky-d8bfa5c6eff1cff34895304a33be671fb141084e.tar.gz |
bitbake: Sync with 1.8.8 release
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2513 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index c55a58da2b..3dfae219d2 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -137,7 +137,7 @@ class RunQueue: | |||
137 | dep = taskData.fn_index[depdata] | 137 | dep = taskData.fn_index[depdata] |
138 | depends.append(taskData.gettask_id(dep, idepend.split(":")[1])) | 138 | depends.append(taskData.gettask_id(dep, idepend.split(":")[1])) |
139 | 139 | ||
140 | def add_recursive_build(depid): | 140 | def add_recursive_build(depid, depfnid): |
141 | """ | 141 | """ |
142 | Add build depends of depid to depends | 142 | Add build depends of depid to depends |
143 | (if we've not see it before) | 143 | (if we've not see it before) |
@@ -150,26 +150,28 @@ class RunQueue: | |||
150 | depdata = taskData.build_targets[depid][0] | 150 | depdata = taskData.build_targets[depid][0] |
151 | if depdata is not None: | 151 | if depdata is not None: |
152 | dep = taskData.fn_index[depdata] | 152 | dep = taskData.fn_index[depdata] |
153 | idepends = [] | ||
153 | # Need to avoid creating new tasks here | 154 | # Need to avoid creating new tasks here |
154 | taskid = taskData.gettask_id(dep, taskname, False) | 155 | taskid = taskData.gettask_id(dep, taskname, False) |
155 | if taskid is not None: | 156 | if taskid is not None: |
156 | depends.append(taskid) | 157 | depends.append(taskid) |
157 | fnid = taskData.tasks_fnid[taskid] | 158 | fnid = taskData.tasks_fnid[taskid] |
159 | idepends = taskData.tasks_idepends[taskid] | ||
160 | #print "Added %s (%s) due to %s" % (taskid, taskData.fn_index[fnid], taskData.fn_index[depfnid]) | ||
158 | else: | 161 | else: |
159 | fnid = taskData.getfn_id(dep) | 162 | fnid = taskData.getfn_id(dep) |
160 | for nextdepid in taskData.depids[fnid]: | 163 | for nextdepid in taskData.depids[fnid]: |
161 | if nextdepid not in dep_seen: | 164 | if nextdepid not in dep_seen: |
162 | add_recursive_build(nextdepid) | 165 | add_recursive_build(nextdepid, fnid) |
163 | for nextdepid in taskData.rdepids[fnid]: | 166 | for nextdepid in taskData.rdepids[fnid]: |
164 | if nextdepid not in rdep_seen: | 167 | if nextdepid not in rdep_seen: |
165 | add_recursive_run(nextdepid) | 168 | add_recursive_run(nextdepid, fnid) |
166 | idepends = taskData.tasks_idepends[depid] | ||
167 | for idepend in idepends: | 169 | for idepend in idepends: |
168 | nextdepid = int(idepend.split(":")[0]) | 170 | nextdepid = int(idepend.split(":")[0]) |
169 | if nextdepid not in dep_seen: | 171 | if nextdepid not in dep_seen: |
170 | add_recursive_build(nextdepid) | 172 | add_recursive_build(nextdepid, fnid) |
171 | 173 | ||
172 | def add_recursive_run(rdepid): | 174 | def add_recursive_run(rdepid, depfnid): |
173 | """ | 175 | """ |
174 | Add runtime depends of rdepid to depends | 176 | Add runtime depends of rdepid to depends |
175 | (if we've not see it before) | 177 | (if we've not see it before) |
@@ -182,24 +184,26 @@ class RunQueue: | |||
182 | depdata = taskData.run_targets[rdepid][0] | 184 | depdata = taskData.run_targets[rdepid][0] |
183 | if depdata is not None: | 185 | if depdata is not None: |
184 | dep = taskData.fn_index[depdata] | 186 | dep = taskData.fn_index[depdata] |
187 | idepends = [] | ||
185 | # Need to avoid creating new tasks here | 188 | # Need to avoid creating new tasks here |
186 | taskid = taskData.gettask_id(dep, taskname, False) | 189 | taskid = taskData.gettask_id(dep, taskname, False) |
187 | if taskid is not None: | 190 | if taskid is not None: |
188 | depends.append(taskid) | 191 | depends.append(taskid) |
189 | fnid = taskData.tasks_fnid[taskid] | 192 | fnid = taskData.tasks_fnid[taskid] |
193 | idepends = taskData.tasks_idepends[taskid] | ||
194 | #print "Added %s (%s) due to %s" % (taskid, taskData.fn_index[fnid], taskData.fn_index[depfnid]) | ||
190 | else: | 195 | else: |
191 | fnid = taskData.getfn_id(dep) | 196 | fnid = taskData.getfn_id(dep) |
192 | for nextdepid in taskData.depids[fnid]: | 197 | for nextdepid in taskData.depids[fnid]: |
193 | if nextdepid not in dep_seen: | 198 | if nextdepid not in dep_seen: |
194 | add_recursive_build(nextdepid) | 199 | add_recursive_build(nextdepid, fnid) |
195 | for nextdepid in taskData.rdepids[fnid]: | 200 | for nextdepid in taskData.rdepids[fnid]: |
196 | if nextdepid not in rdep_seen: | 201 | if nextdepid not in rdep_seen: |
197 | add_recursive_run(nextdepid) | 202 | add_recursive_run(nextdepid, fnid) |
198 | idepends = taskData.tasks_idepends[rdepid] | ||
199 | for idepend in idepends: | 203 | for idepend in idepends: |
200 | nextdepid = int(idepend.split(":")[0]) | 204 | nextdepid = int(idepend.split(":")[0]) |
201 | if nextdepid not in dep_seen: | 205 | if nextdepid not in dep_seen: |
202 | add_recursive_build(nextdepid) | 206 | add_recursive_build(nextdepid, fnid) |
203 | 207 | ||
204 | 208 | ||
205 | # Resolve Recursive Runtime Depends | 209 | # Resolve Recursive Runtime Depends |
@@ -210,12 +214,12 @@ class RunQueue: | |||
210 | rdep_seen = [] | 214 | rdep_seen = [] |
211 | idep_seen = [] | 215 | idep_seen = [] |
212 | for depid in taskData.depids[fnid]: | 216 | for depid in taskData.depids[fnid]: |
213 | add_recursive_build(depid) | 217 | add_recursive_build(depid, fnid) |
214 | for rdepid in taskData.rdepids[fnid]: | 218 | for rdepid in taskData.rdepids[fnid]: |
215 | add_recursive_run(rdepid) | 219 | add_recursive_run(rdepid, fnid) |
216 | for idepend in idepends: | 220 | for idepend in idepends: |
217 | depid = int(idepend.split(":")[0]) | 221 | depid = int(idepend.split(":")[0]) |
218 | add_recursive_build(depid) | 222 | add_recursive_build(depid, fnid) |
219 | 223 | ||
220 | #Prune self references | 224 | #Prune self references |
221 | if task in depends: | 225 | if task in depends: |