summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-26 14:11:30 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-30 16:55:21 +0100
commitd80dd1c3f913259a58008a2ed2822b70e6297335 (patch)
treed11e1432c0191064d0570c478d5cb66f74e0dc56
parentca6cc9fa529c207a761e3cd5d2b09dc658ed45dc (diff)
downloadpoky-d80dd1c3f913259a58008a2ed2822b70e6297335.tar.gz
lib/sstatesig: Fix class inheritance problems
The locked sigs class needs to be inherited after the hashequiv mixin so that get_unihash can correctly wrap the underlying hashequiv function. To do this turn the locked sigs class into a second mixin, then the order can be correctly handled. Tweak the get/set_taskdata to match. (From OE-Core rev: 73d3414ecf594e426e6024b71931038a201eca52) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/sstatesig.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 43eb6034e6..c566ce5a0c 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -90,8 +90,7 @@ class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic):
90 def rundep_check(self, fn, recipename, task, dep, depname, dataCache = None): 90 def rundep_check(self, fn, recipename, task, dep, depname, dataCache = None):
91 return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCache) 91 return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCache)
92 92
93class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash): 93class SignatureGeneratorOEBasicHashMixIn(object):
94 name = "OEBasicHash"
95 def init_rundepcheck(self, data): 94 def init_rundepcheck(self, data):
96 self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split() 95 self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split()
97 self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split() 96 self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split()
@@ -129,12 +128,11 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
129 return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCache) 128 return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCache)
130 129
131 def get_taskdata(self): 130 def get_taskdata(self):
132 data = super(bb.siggen.SignatureGeneratorBasicHash, self).get_taskdata() 131 return (self.lockedpnmap, self.lockedhashfn, self.lockedhashes) + super().get_taskdata()
133 return (data, self.lockedpnmap, self.lockedhashfn, self.lockedhashes)
134 132
135 def set_taskdata(self, data): 133 def set_taskdata(self, data):
136 coredata, self.lockedpnmap, self.lockedhashfn, self.lockedhashes = data 134 self.lockedpnmap, self.lockedhashfn, self.lockedhashes = data[:3]
137 super(bb.siggen.SignatureGeneratorBasicHash, self).set_taskdata(coredata) 135 super().set_taskdata(data[3:])
138 136
139 def dump_sigs(self, dataCache, options): 137 def dump_sigs(self, dataCache, options):
140 sigfile = os.getcwd() + "/locked-sigs.inc" 138 sigfile = os.getcwd() + "/locked-sigs.inc"
@@ -263,7 +261,10 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
263 if error_msgs: 261 if error_msgs:
264 bb.fatal("\n".join(error_msgs)) 262 bb.fatal("\n".join(error_msgs))
265 263
266class SignatureGeneratorOEEquivHash(bb.siggen.SignatureGeneratorUniHashMixIn, SignatureGeneratorOEBasicHash): 264class SignatureGeneratorOEBasicHash(SignatureGeneratorOEBasicHashMixIn, bb.siggen.SignatureGeneratorBasicHash):
265 name = "OEBasicHash"
266
267class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHashMixIn, bb.siggen.SignatureGeneratorUniHashMixIn, bb.siggen.SignatureGeneratorBasicHash):
267 name = "OEEquivHash" 268 name = "OEEquivHash"
268 269
269 def init_rundepcheck(self, data): 270 def init_rundepcheck(self, data):