aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2005-05-17 22:16:16 +0000
committerHolger Hans Peter Freyther <zecke@selfish.org>2005-05-17 22:16:16 +0000
commite629173521df39dbba8ff9b346ac7f1c727c1b18 (patch)
tree04e70501e065e1d3505db01b939b9373ce54b154 /lib/bb
parent874b3db5302dd7f90de6d5a3701cd05115155b6d (diff)
downloadbitbake-e629173521df39dbba8ff9b346ac7f1c727c1b18.tar.gz
lib/bb/build.py:
Do not assume we hold a reference to the variable we got with a bb.data.getVar*. Always set changes back to the variable.
Diffstat (limited to 'lib/bb')
-rw-r--r--lib/bb/build.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 3674f9574..1fd3bbde0 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -364,13 +364,14 @@ def add_task(task, deps, d):
task_graph = data.getVar('_task_graph', d)
if not task_graph:
task_graph = bb.digraph()
- data.setVar('_task_graph', task_graph, d)
data.setVarFlag(task, 'task', 1, d)
task_graph.addnode(task, None)
for dep in deps:
if not task_graph.hasnode(dep):
task_graph.addnode(dep, None)
task_graph.addnode(task, dep)
+ # don't assume holding a reference
+ data.setVar('_task_graph', task_graph, d)
def remove_task(task, kill, d):
@@ -381,7 +382,6 @@ def remove_task(task, kill, d):
task_graph = data.getVar('_task_graph', d)
if not task_graph:
task_graph = bb.digraph()
- data.setVar('_task_graph', task_graph, d)
if not task_graph.hasnode(task):
return
@@ -390,6 +390,7 @@ def remove_task(task, kill, d):
if kill == 1:
ref = 2
task_graph.delnode(task, ref)
+ data.setVar('_task_graph', task_graph, d)
def task_exists(task, d):
task_graph = data.getVar('_task_graph', d)