diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-27 15:57:13 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-28 15:34:27 +0100 |
commit | ec4d6b989aad5f4564e367c99c62c59f962b57ea (patch) | |
tree | bd1a4783352a90629a4c07950391cafb986f5373 /bitbake/bin/bitbake-runtask | |
parent | 15ceaaaaf777175df8fa49f08e37b23052ca2290 (diff) | |
download | poky-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-x | bitbake/bin/bitbake-runtask | 23 |
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 | |||
5 | import warnings | 5 | import warnings |
6 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib')) | 6 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib')) |
7 | 7 | ||
8 | try: | ||
9 | import cPickle as pickle | ||
10 | except ImportError: | ||
11 | import pickle | ||
12 | bb.msg.note(1, bb.msg.domain.Cache, "Importing cPickle failed. Falling back to a very slow implementation.") | ||
13 | |||
8 | class BBConfiguration(object): | 14 | class 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 | |||
62 | import bb.cooker | 68 | import bb.cooker |
63 | 69 | ||
64 | cooker = bb.cooker.BBCooker(BBConfiguration(), None) | 70 | cooker = bb.cooker.BBCooker(BBConfiguration(), None) |
65 | buildfile = sys.argv[1] | 71 | hashfile = sys.argv[1] |
66 | taskname = sys.argv[2] | 72 | buildfile = sys.argv[2] |
73 | taskname = sys.argv[3] | ||
67 | 74 | ||
68 | cooker.parseConfiguration() | 75 | cooker.parseConfiguration() |
69 | 76 | ||
@@ -84,8 +91,18 @@ cooker.bb_cache.handle_data(fn, cooker.status) | |||
84 | if taskname.endswith("_setscene"): | 91 | if taskname.endswith("_setscene"): |
85 | the_data.setVarFlag(taskname, "quieterrors", "1") | 92 | the_data.setVarFlag(taskname, "quieterrors", "1") |
86 | 93 | ||
94 | p = pickle.Unpickler(file(hashfile, "rb")) | ||
95 | hashdata = p.load() | ||
96 | |||
97 | bb.parse.siggen.set_taskdata(hashdata["hashes"], hashdata["deps"]) | ||
98 | |||
99 | for h in hashdata["hashes"]: | ||
100 | bb.data.setVar("BBHASH_%s" % h, hashdata["hashes"][h], the_data) | ||
101 | for h in hashdata["deps"]: | ||
102 | bb.data.setVar("BBHASHDEPS_%s" % h, hashdata["deps"][h], the_data) | ||
103 | |||
87 | ret = 0 | 104 | ret = 0 |
88 | if sys.argv[3] != "True": | 105 | if sys.argv[4] != "True": |
89 | ret = bb.build.exec_task(fn, taskname, the_data) | 106 | ret = bb.build.exec_task(fn, taskname, the_data) |
90 | sys.exit(ret) | 107 | sys.exit(ret) |
91 | 108 | ||