diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-29 17:28:20 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-08-06 11:21:32 +0100 |
commit | 4fbb862cdcdcfa44da83f9a7e7a74ab518ef67d0 (patch) | |
tree | 0fa843c4a2f3f5c7dc69907cb4e40d47c9443109 /bitbake/lib/bb/runqueue.py | |
parent | 40a5e193c4ba45c928fccd899415ea56b5417725 (diff) | |
download | poky-4fbb862cdcdcfa44da83f9a7e7a74ab518ef67d0.tar.gz |
bitbake: siggen: Clean up task reference formats
Currently siggen uses the format "<filename>.<taskname>" for referencing tasks
whilst runqueue uses "<filename>:<taskname>". This converts to use ":" as the
separator everywhere.
This is an API breaking change since the cache is affected, as are siginfo files
and any custom signature handlers such as those in OE-Core.
Ultimately this will let us clean up and the accessor functions from runqueue,
removing all the ".rsplit(".", 1)[0]" type code currently all over the place.
Once a standard is used everwhere we can update the code over time to be more
optimal.
(Bitbake rev: 07e539e1c566ca3434901e1a00335cb76c69d496)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index f0f95f9b5e..bb61087359 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -1174,10 +1174,9 @@ class RunQueueData: | |||
1174 | def prepare_task_hash(self, tid): | 1174 | def prepare_task_hash(self, tid): |
1175 | procdep = [] | 1175 | procdep = [] |
1176 | for dep in self.runtaskentries[tid].depends: | 1176 | for dep in self.runtaskentries[tid].depends: |
1177 | procdep.append(fn_from_tid(dep) + "." + taskname_from_tid(dep)) | 1177 | procdep.append(dep) |
1178 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) | 1178 | self.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(tid, procdep, self.dataCaches[mc_from_tid(tid)]) |
1179 | self.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(taskfn, taskname, procdep, self.dataCaches[mc]) | 1179 | self.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(tid) |
1180 | self.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(taskfn + "." + taskname) | ||
1181 | 1180 | ||
1182 | def dump_data(self): | 1181 | def dump_data(self): |
1183 | """ | 1182 | """ |
@@ -1401,7 +1400,7 @@ class RunQueue: | |||
1401 | sq_data['hashfn'][tid] = self.rqdata.dataCaches[mc].hashfn[taskfn] | 1400 | sq_data['hashfn'][tid] = self.rqdata.dataCaches[mc].hashfn[taskfn] |
1402 | sq_data['unihash'][tid] = self.rqdata.runtaskentries[tid].unihash | 1401 | sq_data['unihash'][tid] = self.rqdata.runtaskentries[tid].unihash |
1403 | 1402 | ||
1404 | valid_ids = self.validate_hash(sq_data, data, siginfo, currentcount) | 1403 | valid = self.validate_hash(sq_data, data, siginfo, currentcount) |
1405 | 1404 | ||
1406 | return valid | 1405 | return valid |
1407 | 1406 | ||
@@ -2152,8 +2151,7 @@ class RunQueueExecute: | |||
2152 | if unihash != self.rqdata.runtaskentries[tid].unihash: | 2151 | if unihash != self.rqdata.runtaskentries[tid].unihash: |
2153 | logger.info("Task %s unihash changed to %s" % (tid, unihash)) | 2152 | logger.info("Task %s unihash changed to %s" % (tid, unihash)) |
2154 | self.rqdata.runtaskentries[tid].unihash = unihash | 2153 | self.rqdata.runtaskentries[tid].unihash = unihash |
2155 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) | 2154 | bb.parse.siggen.set_unihash(tid, unihash) |
2156 | bb.parse.siggen.set_unihash(taskfn + "." + taskname, unihash) | ||
2157 | 2155 | ||
2158 | # Work out all tasks which depend on this one | 2156 | # Work out all tasks which depend on this one |
2159 | total = set() | 2157 | total = set() |
@@ -2177,12 +2175,11 @@ class RunQueueExecute: | |||
2177 | continue | 2175 | continue |
2178 | procdep = [] | 2176 | procdep = [] |
2179 | for dep in self.rqdata.runtaskentries[tid].depends: | 2177 | for dep in self.rqdata.runtaskentries[tid].depends: |
2180 | procdep.append(fn_from_tid(dep) + "." + taskname_from_tid(dep)) | 2178 | procdep.append(dep) |
2181 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) | ||
2182 | orighash = self.rqdata.runtaskentries[tid].hash | 2179 | orighash = self.rqdata.runtaskentries[tid].hash |
2183 | self.rqdata.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(taskfn, taskname, procdep, self.rqdata.dataCaches[mc]) | 2180 | self.rqdata.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(tid, procdep, self.rqdata.dataCaches[mc_from_tid(tid)]) |
2184 | origuni = self.rqdata.runtaskentries[tid].unihash | 2181 | origuni = self.rqdata.runtaskentries[tid].unihash |
2185 | self.rqdata.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(taskfn + "." + taskname) | 2182 | self.rqdata.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(tid) |
2186 | logger.debug(1, "Task %s hash changes: %s->%s %s->%s" % (tid, orighash, self.rqdata.runtaskentries[tid].hash, origuni, self.rqdata.runtaskentries[tid].unihash)) | 2183 | logger.debug(1, "Task %s hash changes: %s->%s %s->%s" % (tid, orighash, self.rqdata.runtaskentries[tid].hash, origuni, self.rqdata.runtaskentries[tid].unihash)) |
2187 | next |= self.rqdata.runtaskentries[tid].revdeps | 2184 | next |= self.rqdata.runtaskentries[tid].revdeps |
2188 | changed.add(tid) | 2185 | changed.add(tid) |