[oe-commits] [bitbake] 01/01: fix?
git at git.openembedded.org
git at git.openembedded.org
Mon Dec 2 18:04:58 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit b0351f4c233e6c614fe93c46924b12b7acfe2d24
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Mon Dec 2 17:52:37 2019 +0000
fix?
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/siggen.py | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index 3d0be35..466114e 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -525,21 +525,24 @@ class SignatureGeneratorUniHashMixIn(object):
except OSError:
pass
- def report_unihash_equiv(self, tid, unihash, newunihash, datacaches):
+ def report_unihash_equiv(self, tid, oldunihash, newunihash, datacaches):
try:
extra_data = {}
- data = self.client().report_unihash_equiv(newunihash, self.method, unihash, extra_data)
- bb.warn('Reported task %s as unihash %s to %s (%s)' % (tid, newunihash, self.server, str(data)))
-
- # FIXME, only rename if there is an upstream hash?
- (mc, fn, taskname, taskfn) = bb.runqueue.split_tid_mcfn(tid)
- stamp = bb.build.stampfile(taskname + "_setscene", datacaches[mc], taskfn, noextra=True)
- oldstamp = stamp.replace(newunihash, unihash)
- if os.path.exists(oldstamp):
- bb.note("Renaming %s to %s" % (oldstamp, stamp))
- os.rename(oldstamp, stamp)
+ data = self.client().report_unihash_equiv(newunihash, self.method, oldunihash, extra_data)
+ bb.note('Reported task %s as unihash %s to %s (%s)' % (tid, newunihash, self.server, str(data)))
+
+ if data is None:
+ bb.warn("Server unable to handle unihash report")
+ return
+
+ finalunihash = data['unihash']
+
+ if newunihash != finalunihash:
+ bb.note('Task %s unihash changed %s -> %s (%s)' % (tid, newunihash, finalunihash, oldunihash))
+ bb.event.fire(bb.runqueue.taskUniHashUpdate(fn + ':do_' + task, finalunihash), d)
+ self.set_unihash(tid, finalunihash)
else:
- bb.note("Not renaming %s to %s" % (oldstamp, stamp))
+ bb.note('Task %s unihash %s unchanged by server' % (tid, finalunihash))
except hashserv.client.HashConnectionError as e:
bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e)))
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list