diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2007-08-17 23:41:54 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2007-08-17 23:41:54 +0000 |
commit | cf2a814cfe7255ba35022ee981ded4abe7b92c73 (patch) | |
tree | 68422217a183cbd92b5d7b73ab86c7bacb6fb788 | |
parent | 802d4389c560d1759e0fbed99515c50b868ed401 (diff) | |
download | bitbake-cf2a814cfe7255ba35022ee981ded4abe7b92c73.tar.gz |
runqueue.py: Fix idepends handling to avoid dependency errors, improve debugging capability
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | lib/bb/runqueue.py | 30 |
2 files changed, 18 insertions, 13 deletions
@@ -31,6 +31,7 @@ Changes in Bitbake 1.8.x: - Rework add_task to be more efficient (6% speedup, 7% number of function calls reduction) - Sort digraph output to make builds more reproducible - Split expandKeys into two for loops to benefit from the expand_cache (12% speedup) + - runqueue.py: Fix idepends handling to avoid dependency errors Changes in Bitbake 1.8.6: - Correctly redirect stdin when forking diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index c55a58da2..3dfae219d 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -137,7 +137,7 @@ class RunQueue: dep = taskData.fn_index[depdata] depends.append(taskData.gettask_id(dep, idepend.split(":")[1])) - def add_recursive_build(depid): + def add_recursive_build(depid, depfnid): """ Add build depends of depid to depends (if we've not see it before) @@ -150,26 +150,28 @@ class RunQueue: depdata = taskData.build_targets[depid][0] if depdata is not None: dep = taskData.fn_index[depdata] + idepends = [] # Need to avoid creating new tasks here taskid = taskData.gettask_id(dep, taskname, False) if taskid is not None: depends.append(taskid) fnid = taskData.tasks_fnid[taskid] + idepends = taskData.tasks_idepends[taskid] + #print "Added %s (%s) due to %s" % (taskid, taskData.fn_index[fnid], taskData.fn_index[depfnid]) else: fnid = taskData.getfn_id(dep) for nextdepid in taskData.depids[fnid]: if nextdepid not in dep_seen: - add_recursive_build(nextdepid) + add_recursive_build(nextdepid, fnid) for nextdepid in taskData.rdepids[fnid]: if nextdepid not in rdep_seen: - add_recursive_run(nextdepid) - idepends = taskData.tasks_idepends[depid] + add_recursive_run(nextdepid, fnid) for idepend in idepends: nextdepid = int(idepend.split(":")[0]) if nextdepid not in dep_seen: - add_recursive_build(nextdepid) + add_recursive_build(nextdepid, fnid) - def add_recursive_run(rdepid): + def add_recursive_run(rdepid, depfnid): """ Add runtime depends of rdepid to depends (if we've not see it before) @@ -182,24 +184,26 @@ class RunQueue: depdata = taskData.run_targets[rdepid][0] if depdata is not None: dep = taskData.fn_index[depdata] + idepends = [] # Need to avoid creating new tasks here taskid = taskData.gettask_id(dep, taskname, False) if taskid is not None: depends.append(taskid) fnid = taskData.tasks_fnid[taskid] + idepends = taskData.tasks_idepends[taskid] + #print "Added %s (%s) due to %s" % (taskid, taskData.fn_index[fnid], taskData.fn_index[depfnid]) else: fnid = taskData.getfn_id(dep) for nextdepid in taskData.depids[fnid]: if nextdepid not in dep_seen: - add_recursive_build(nextdepid) + add_recursive_build(nextdepid, fnid) for nextdepid in taskData.rdepids[fnid]: if nextdepid not in rdep_seen: - add_recursive_run(nextdepid) - idepends = taskData.tasks_idepends[rdepid] + add_recursive_run(nextdepid, fnid) for idepend in idepends: nextdepid = int(idepend.split(":")[0]) if nextdepid not in dep_seen: - add_recursive_build(nextdepid) + add_recursive_build(nextdepid, fnid) # Resolve Recursive Runtime Depends @@ -210,12 +214,12 @@ class RunQueue: rdep_seen = [] idep_seen = [] for depid in taskData.depids[fnid]: - add_recursive_build(depid) + add_recursive_build(depid, fnid) for rdepid in taskData.rdepids[fnid]: - add_recursive_run(rdepid) + add_recursive_run(rdepid, fnid) for idepend in idepends: depid = int(idepend.split(":")[0]) - add_recursive_build(depid) + add_recursive_build(depid, fnid) #Prune self references if task in depends: |