summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-runtask
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-27 15:57:13 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-28 15:34:27 +0100
commitec4d6b989aad5f4564e367c99c62c59f962b57ea (patch)
treebd1a4783352a90629a4c07950391cafb986f5373 /bitbake/bin/bitbake-runtask
parent15ceaaaaf777175df8fa49f08e37b23052ca2290 (diff)
downloadpoky-ec4d6b989aad5f4564e367c99c62c59f962b57ea.tar.gz
bitbake: Pass task hash information to subprocesses
Pass task has informaiton to work processes, allowing full manipulation of the hash data in the task context allowing checksums to be usable. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/bin/bitbake-runtask')
-rwxr-xr-xbitbake/bin/bitbake-runtask23
1 files changed, 20 insertions, 3 deletions
diff --git a/bitbake/bin/bitbake-runtask b/bitbake/bin/bitbake-runtask
index 2f5ebea792..9e59b8a6f2 100755
--- a/bitbake/bin/bitbake-runtask
+++ b/bitbake/bin/bitbake-runtask
@@ -5,6 +5,12 @@ import sys
5import warnings 5import warnings
6sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib')) 6sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib'))
7 7
8try:
9 import cPickle as pickle
10except ImportError:
11 import pickle
12 bb.msg.note(1, bb.msg.domain.Cache, "Importing cPickle failed. Falling back to a very slow implementation.")
13
8class BBConfiguration(object): 14class BBConfiguration(object):
9 """ 15 """
10 Manages build options and configurations for one run 16 Manages build options and configurations for one run
@@ -62,8 +68,9 @@ bb.event.useStdout = False
62import bb.cooker 68import bb.cooker
63 69
64cooker = bb.cooker.BBCooker(BBConfiguration(), None) 70cooker = bb.cooker.BBCooker(BBConfiguration(), None)
65buildfile = sys.argv[1] 71hashfile = sys.argv[1]
66taskname = sys.argv[2] 72buildfile = sys.argv[2]
73taskname = sys.argv[3]
67 74
68cooker.parseConfiguration() 75cooker.parseConfiguration()
69 76
@@ -84,8 +91,18 @@ cooker.bb_cache.handle_data(fn, cooker.status)
84if taskname.endswith("_setscene"): 91if taskname.endswith("_setscene"):
85 the_data.setVarFlag(taskname, "quieterrors", "1") 92 the_data.setVarFlag(taskname, "quieterrors", "1")
86 93
94p = pickle.Unpickler(file(hashfile, "rb"))
95hashdata = p.load()
96
97bb.parse.siggen.set_taskdata(hashdata["hashes"], hashdata["deps"])
98
99for h in hashdata["hashes"]:
100 bb.data.setVar("BBHASH_%s" % h, hashdata["hashes"][h], the_data)
101for h in hashdata["deps"]:
102 bb.data.setVar("BBHASHDEPS_%s" % h, hashdata["deps"][h], the_data)
103
87ret = 0 104ret = 0
88if sys.argv[3] != "True": 105if sys.argv[4] != "True":
89 ret = bb.build.exec_task(fn, taskname, the_data) 106 ret = bb.build.exec_task(fn, taskname, the_data)
90sys.exit(ret) 107sys.exit(ret)
91 108