diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2018-12-18 21:10:28 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-03 22:47:11 +0000 |
commit | 57e3c55f6dd17f8019335818c6f34e67f8110295 (patch) | |
tree | 137b912ae0abe4187fc3384deb7b782eb24a176d | |
parent | 960fb3ed0250b4fe54c08be715c76d17e0990531 (diff) | |
download | poky-57e3c55f6dd17f8019335818c6f34e67f8110295.tar.gz |
bitbake: runqueue: Track task unique hash
Requests the task unique hash from siggen and tracks it
[YOCTO #13030]
(Bitbake rev: 1ecc47f0831b35c8c92b37a81cef4e43ff9f67b2)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index f2b95a9829..27b188256d 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -346,6 +346,7 @@ class RunTaskEntry(object): | |||
346 | self.depends = set() | 346 | self.depends = set() |
347 | self.revdeps = set() | 347 | self.revdeps = set() |
348 | self.hash = None | 348 | self.hash = None |
349 | self.unihash = None | ||
349 | self.task = None | 350 | self.task = None |
350 | self.weight = 1 | 351 | self.weight = 1 |
351 | 352 | ||
@@ -385,6 +386,9 @@ class RunQueueData: | |||
385 | def get_task_hash(self, tid): | 386 | def get_task_hash(self, tid): |
386 | return self.runtaskentries[tid].hash | 387 | return self.runtaskentries[tid].hash |
387 | 388 | ||
389 | def get_task_unihash(self, tid): | ||
390 | return self.runtaskentries[tid].unihash | ||
391 | |||
388 | def get_user_idstring(self, tid, task_name_suffix = ""): | 392 | def get_user_idstring(self, tid, task_name_suffix = ""): |
389 | return tid + task_name_suffix | 393 | return tid + task_name_suffix |
390 | 394 | ||
@@ -1150,18 +1154,21 @@ class RunQueueData: | |||
1150 | if len(self.runtaskentries[tid].depends - dealtwith) == 0: | 1154 | if len(self.runtaskentries[tid].depends - dealtwith) == 0: |
1151 | dealtwith.add(tid) | 1155 | dealtwith.add(tid) |
1152 | todeal.remove(tid) | 1156 | todeal.remove(tid) |
1153 | procdep = [] | 1157 | self.prepare_task_hash(tid) |
1154 | for dep in self.runtaskentries[tid].depends: | ||
1155 | procdep.append(fn_from_tid(dep) + "." + taskname_from_tid(dep)) | ||
1156 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) | ||
1157 | self.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(taskfn, taskname, procdep, self.dataCaches[mc]) | ||
1158 | task = self.runtaskentries[tid].task | ||
1159 | 1158 | ||
1160 | bb.parse.siggen.writeout_file_checksum_cache() | 1159 | bb.parse.siggen.writeout_file_checksum_cache() |
1161 | 1160 | ||
1162 | #self.dump_data() | 1161 | #self.dump_data() |
1163 | return len(self.runtaskentries) | 1162 | return len(self.runtaskentries) |
1164 | 1163 | ||
1164 | def prepare_task_hash(self, tid): | ||
1165 | procdep = [] | ||
1166 | for dep in self.runtaskentries[tid].depends: | ||
1167 | procdep.append(fn_from_tid(dep) + "." + taskname_from_tid(dep)) | ||
1168 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) | ||
1169 | self.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(taskfn, taskname, procdep, self.dataCaches[mc]) | ||
1170 | self.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(fn + "." + taskname) | ||
1171 | |||
1165 | def dump_data(self): | 1172 | def dump_data(self): |
1166 | """ | 1173 | """ |
1167 | Dump some debug information on the internal data structures | 1174 | Dump some debug information on the internal data structures |
@@ -2081,7 +2088,8 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
2081 | deps = self.rqdata.runtaskentries[revdep].depends | 2088 | deps = self.rqdata.runtaskentries[revdep].depends |
2082 | provides = self.rqdata.dataCaches[mc].fn_provides[taskfn] | 2089 | provides = self.rqdata.dataCaches[mc].fn_provides[taskfn] |
2083 | taskhash = self.rqdata.runtaskentries[revdep].hash | 2090 | taskhash = self.rqdata.runtaskentries[revdep].hash |
2084 | taskdepdata[revdep] = [pn, taskname, fn, deps, provides, taskhash] | 2091 | unihash = self.rqdata.runtaskentries[revdep].unihash |
2092 | taskdepdata[revdep] = [pn, taskname, fn, deps, provides, taskhash, unihash] | ||
2085 | for revdep2 in deps: | 2093 | for revdep2 in deps: |
2086 | if revdep2 not in taskdepdata: | 2094 | if revdep2 not in taskdepdata: |
2087 | additional.append(revdep2) | 2095 | additional.append(revdep2) |
@@ -2524,7 +2532,8 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
2524 | deps = getsetscenedeps(revdep) | 2532 | deps = getsetscenedeps(revdep) |
2525 | provides = self.rqdata.dataCaches[mc].fn_provides[taskfn] | 2533 | provides = self.rqdata.dataCaches[mc].fn_provides[taskfn] |
2526 | taskhash = self.rqdata.runtaskentries[revdep].hash | 2534 | taskhash = self.rqdata.runtaskentries[revdep].hash |
2527 | taskdepdata[revdep] = [pn, taskname, fn, deps, provides, taskhash] | 2535 | unihash = self.rqdata.runtaskentries[revdep].unihash |
2536 | taskdepdata[revdep] = [pn, taskname, fn, deps, provides, taskhash, unihash] | ||
2528 | for revdep2 in deps: | 2537 | for revdep2 in deps: |
2529 | if revdep2 not in taskdepdata: | 2538 | if revdep2 not in taskdepdata: |
2530 | additional.append(revdep2) | 2539 | additional.append(revdep2) |