diff options
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 | |||
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 | ||