[oe-commits] [openembedded-core] 12/13: sstatesig: Fix locked signature handling with unihashes

git at git.openembedded.org git at git.openembedded.org
Wed Jan 1 11:07:33 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 275ce6496ec7a6459267b86f2f9e8e0efcec755d
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Mon Dec 30 14:44:01 2019 +0000

    sstatesig: Fix locked signature handling with unihashes
    
    get_taskhash will call get_unihash internally in the parent class. We
    need to disable our filter of it whilst this runs else incorrect hashes
    can be calculated.
    
    This is believed to be causing the locked signatures test to fail under
    some circumstances (depending on whether earlier hashes are being
    remapped).
    
    [YOCTO #13605]
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oe/sstatesig.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index ca3c6df..acccf93 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -104,6 +104,7 @@ class SignatureGeneratorOEBasicHashMixIn(object):
                                 "").split()
         self.unlockedrecipes = { k: "" for k in self.unlockedrecipes }
         self.buildarch = data.getVar('BUILD_ARCH')
+        self._internal = False
         pass
 
     def tasks_resolved(self, virtmap, virtpnmap, dataCache):
@@ -156,7 +157,12 @@ class SignatureGeneratorOEBasicHashMixIn(object):
             else:
                 return super().get_taskhash(tid, deps, dataCache)
 
+        # get_taskhash will call get_unihash internally in the parent class, we 
+        # need to disable our filter of it whilst this runs else
+        # incorrect hashes can be calculated.
+        self._internal = True
         h = super().get_taskhash(tid, deps, dataCache)
+        self._internal = False
 
         (mc, _, task, fn) = bb.runqueue.split_tid_mcfn(tid)
 
@@ -199,7 +205,7 @@ class SignatureGeneratorOEBasicHashMixIn(object):
         return h
 
     def get_unihash(self, tid):
-        if tid in self.lockedhashes and self.lockedhashes[tid]:
+        if tid in self.lockedhashes and self.lockedhashes[tid] and not self._internal:
             return self.lockedhashes[tid]
         return super().get_unihash(tid)
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list