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 | |
parent | 15ceaaaaf777175df8fa49f08e37b23052ca2290 (diff) | |
download | openembedded-core-ec4d6b989aad5f4564e367c99c62c59f962b57ea.tar.gz openembedded-core-ec4d6b989aad5f4564e367c99c62c59f962b57ea.tar.bz2 openembedded-core-ec4d6b989aad5f4564e367c99c62c59f962b57ea.zip |
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')
-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 import warnings sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib')) +try: + import cPickle as pickle +except ImportError: + import pickle + bb.msg.note(1, bb.msg.domain.Cache, "Importing cPickle failed. Falling back to a very slow implementation.") + class BBConfiguration(object): """ Manages build options and configurations for one run @@ -62,8 +68,9 @@ bb.event.useStdout = False import bb.cooker cooker = bb.cooker.BBCooker(BBConfiguration(), None) -buildfile = sys.argv[1] -taskname = sys.argv[2] +hashfile = sys.argv[1] +buildfile = sys.argv[2] +taskname = sys.argv[3] cooker.parseConfiguration() @@ -84,8 +91,18 @@ cooker.bb_cache.handle_data(fn, cooker.status) if taskname.endswith("_setscene"): the_data.setVarFlag(taskname, "quieterrors", "1") +p = pickle.Unpickler(file(hashfile, "rb")) +hashdata = p.load() + +bb.parse.siggen.set_taskdata(hashdata["hashes"], hashdata["deps"]) + +for h in hashdata["hashes"]: + bb.data.setVar("BBHASH_%s" % h, hashdata["hashes"][h], the_data) +for h in hashdata["deps"]: + bb.data.setVar("BBHASHDEPS_%s" % h, hashdata["deps"][h], the_data) + ret = 0 -if sys.argv[3] != "True": +if sys.argv[4] != "True": ret = bb.build.exec_task(fn, taskname, the_data) sys.exit(ret) |