summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/sstatesig.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/sstatesig.py')
-rw-r--r--meta/lib/oe/sstatesig.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 8224e3a12e..e053c37e96 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -63,10 +63,10 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
63 63
64def sstate_lockedsigs(d): 64def sstate_lockedsigs(d):
65 sigs = {} 65 sigs = {}
66 types = (d.getVar("SIGGEN_LOCKEDSIGS_TYPES", True) or "").split() 66 types = (d.getVar("SIGGEN_LOCKEDSIGS_TYPES") or "").split()
67 for t in types: 67 for t in types:
68 siggen_lockedsigs_var = "SIGGEN_LOCKEDSIGS_%s" % t 68 siggen_lockedsigs_var = "SIGGEN_LOCKEDSIGS_%s" % t
69 lockedsigs = (d.getVar(siggen_lockedsigs_var, True) or "").split() 69 lockedsigs = (d.getVar(siggen_lockedsigs_var) or "").split()
70 for ls in lockedsigs: 70 for ls in lockedsigs:
71 pn, task, h = ls.split(":", 2) 71 pn, task, h = ls.split(":", 2)
72 if pn not in sigs: 72 if pn not in sigs:
@@ -77,8 +77,8 @@ def sstate_lockedsigs(d):
77class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic): 77class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic):
78 name = "OEBasic" 78 name = "OEBasic"
79 def init_rundepcheck(self, data): 79 def init_rundepcheck(self, data):
80 self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE", True) or "").split() 80 self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split()
81 self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS", True) or "").split() 81 self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split()
82 pass 82 pass
83 def rundep_check(self, fn, recipename, task, dep, depname, dataCache = None): 83 def rundep_check(self, fn, recipename, task, dep, depname, dataCache = None):
84 return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCache) 84 return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCache)
@@ -86,15 +86,15 @@ class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic):
86class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash): 86class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
87 name = "OEBasicHash" 87 name = "OEBasicHash"
88 def init_rundepcheck(self, data): 88 def init_rundepcheck(self, data):
89 self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE", True) or "").split() 89 self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split()
90 self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS", True) or "").split() 90 self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split()
91 self.lockedsigs = sstate_lockedsigs(data) 91 self.lockedsigs = sstate_lockedsigs(data)
92 self.lockedhashes = {} 92 self.lockedhashes = {}
93 self.lockedpnmap = {} 93 self.lockedpnmap = {}
94 self.lockedhashfn = {} 94 self.lockedhashfn = {}
95 self.machine = data.getVar("MACHINE", True) 95 self.machine = data.getVar("MACHINE")
96 self.mismatch_msgs = [] 96 self.mismatch_msgs = []
97 self.unlockedrecipes = (data.getVar("SIGGEN_UNLOCKED_RECIPES", True) or 97 self.unlockedrecipes = (data.getVar("SIGGEN_UNLOCKED_RECIPES") or
98 "").split() 98 "").split()
99 self.unlockedrecipes = { k: "" for k in self.unlockedrecipes } 99 self.unlockedrecipes = { k: "" for k in self.unlockedrecipes }
100 pass 100 pass
@@ -224,13 +224,13 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
224 sstate_missing_msgs.append("Locked sig is set for %s:%s (%s) yet not in sstate cache?" 224 sstate_missing_msgs.append("Locked sig is set for %s:%s (%s) yet not in sstate cache?"
225 % (pn, sq_task[task], sq_hash[task])) 225 % (pn, sq_task[task], sq_hash[task]))
226 226
227 checklevel = d.getVar("SIGGEN_LOCKEDSIGS_TASKSIG_CHECK", True) 227 checklevel = d.getVar("SIGGEN_LOCKEDSIGS_TASKSIG_CHECK")
228 if checklevel == 'warn': 228 if checklevel == 'warn':
229 warn_msgs += self.mismatch_msgs 229 warn_msgs += self.mismatch_msgs
230 elif checklevel == 'error': 230 elif checklevel == 'error':
231 error_msgs += self.mismatch_msgs 231 error_msgs += self.mismatch_msgs
232 232
233 checklevel = d.getVar("SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK", True) 233 checklevel = d.getVar("SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK")
234 if checklevel == 'warn': 234 if checklevel == 'warn':
235 warn_msgs += sstate_missing_msgs 235 warn_msgs += sstate_missing_msgs
236 elif checklevel == 'error': 236 elif checklevel == 'error':
@@ -274,7 +274,7 @@ def find_siginfo(pn, taskname, taskhashlist, d):
274 localdata.setVar('PV', '*') 274 localdata.setVar('PV', '*')
275 localdata.setVar('PR', '*') 275 localdata.setVar('PR', '*')
276 localdata.setVar('EXTENDPE', '') 276 localdata.setVar('EXTENDPE', '')
277 stamp = localdata.getVar('STAMP', True) 277 stamp = localdata.getVar('STAMP')
278 if pn.startswith("gcc-source"): 278 if pn.startswith("gcc-source"):
279 # gcc-source shared workdir is a special case :( 279 # gcc-source shared workdir is a special case :(
280 stamp = localdata.expand("${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}") 280 stamp = localdata.expand("${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}")
@@ -309,18 +309,18 @@ def find_siginfo(pn, taskname, taskhashlist, d):
309 localdata.setVar('PV', '*') 309 localdata.setVar('PV', '*')
310 localdata.setVar('PR', '*') 310 localdata.setVar('PR', '*')
311 localdata.setVar('BB_TASKHASH', hashval) 311 localdata.setVar('BB_TASKHASH', hashval)
312 swspec = localdata.getVar('SSTATE_SWSPEC', True) 312 swspec = localdata.getVar('SSTATE_SWSPEC')
313 if taskname in ['do_fetch', 'do_unpack', 'do_patch', 'do_populate_lic', 'do_preconfigure'] and swspec: 313 if taskname in ['do_fetch', 'do_unpack', 'do_patch', 'do_populate_lic', 'do_preconfigure'] and swspec:
314 localdata.setVar('SSTATE_PKGSPEC', '${SSTATE_SWSPEC}') 314 localdata.setVar('SSTATE_PKGSPEC', '${SSTATE_SWSPEC}')
315 elif pn.endswith('-native') or "-cross-" in pn or "-crosssdk-" in pn: 315 elif pn.endswith('-native') or "-cross-" in pn or "-crosssdk-" in pn:
316 localdata.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/") 316 localdata.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/")
317 sstatename = taskname[3:] 317 sstatename = taskname[3:]
318 filespec = '%s_%s.*.siginfo' % (localdata.getVar('SSTATE_PKG', True), sstatename) 318 filespec = '%s_%s.*.siginfo' % (localdata.getVar('SSTATE_PKG'), sstatename)
319 319
320 if hashval != '*': 320 if hashval != '*':
321 sstatedir = "%s/%s" % (d.getVar('SSTATE_DIR', True), hashval[:2]) 321 sstatedir = "%s/%s" % (d.getVar('SSTATE_DIR'), hashval[:2])
322 else: 322 else:
323 sstatedir = d.getVar('SSTATE_DIR', True) 323 sstatedir = d.getVar('SSTATE_DIR')
324 324
325 for root, dirs, files in os.walk(sstatedir): 325 for root, dirs, files in os.walk(sstatedir):
326 for fn in files: 326 for fn in files: