[oe-commits] [bitbake] 01/01: fix?
git at git.openembedded.org
git at git.openembedded.org
Tue Dec 3 00:19:52 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 796d2830343691f341c282b1e885eb9b1366f496
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 | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index 3d0be35..ea2c7bc 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -507,7 +507,7 @@ class SignatureGeneratorUniHashMixIn(object):
if new_unihash != unihash:
bb.debug(1, 'Task %s unihash changed %s -> %s by server %s' % (taskhash, unihash, new_unihash, self.server))
- bb.event.fire(bb.runqueue.taskUniHashUpdate(fn + ':do_' + task, new_unihash), d)
+ bb.event.fire(bb.runqueue.taskUniHashUpdate(tid, new_unihash), d)
self.set_unihash(tid, new_unihash)
else:
bb.debug(1, 'Reported task %s as unihash %s to %s' % (taskhash, unihash, self.server))
@@ -525,21 +525,23 @@ 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))
+ 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