summaryrefslogtreecommitdiffstats
path: root/scripts/lib/compatlayer/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/compatlayer/__init__.py')
-rw-r--r--scripts/lib/compatlayer/__init__.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/lib/compatlayer/__init__.py b/scripts/lib/compatlayer/__init__.py
index b46527a185..6130b8548c 100644
--- a/scripts/lib/compatlayer/__init__.py
+++ b/scripts/lib/compatlayer/__init__.py
@@ -224,6 +224,7 @@ def get_signatures(builddir, failsafe=False):
224 exclude_recipes = ('meta-world-pkgdata',) 224 exclude_recipes = ('meta-world-pkgdata',)
225 225
226 sigs = {} 226 sigs = {}
227 tune2tasks = {}
227 228
228 cmd = 'bitbake ' 229 cmd = 'bitbake '
229 if failsafe: 230 if failsafe:
@@ -234,9 +235,14 @@ def get_signatures(builddir, failsafe=False):
234 sigs_file = os.path.join(builddir, 'locked-sigs.inc') 235 sigs_file = os.path.join(builddir, 'locked-sigs.inc')
235 236
236 sig_regex = re.compile("^(?P<task>.*:.*):(?P<hash>.*) .$") 237 sig_regex = re.compile("^(?P<task>.*:.*):(?P<hash>.*) .$")
238 tune_regex = re.compile("(^|\s)SIGGEN_LOCKEDSIGS_t-(?P<tune>\S*)\s*=\s*")
239 current_tune = None
237 with open(sigs_file, 'r') as f: 240 with open(sigs_file, 'r') as f:
238 for line in f.readlines(): 241 for line in f.readlines():
239 line = line.strip() 242 line = line.strip()
243 t = tune_regex.search(line)
244 if t:
245 current_tune = t.group('tune')
240 s = sig_regex.match(line) 246 s = sig_regex.match(line)
241 if s: 247 if s:
242 exclude = False 248 exclude = False
@@ -249,11 +255,12 @@ def get_signatures(builddir, failsafe=False):
249 continue 255 continue
250 256
251 sigs[s.group('task')] = s.group('hash') 257 sigs[s.group('task')] = s.group('hash')
258 tune2tasks.setdefault(current_tune, []).append(s.group('task'))
252 259
253 if not sigs: 260 if not sigs:
254 raise RuntimeError('Can\'t load signatures from %s' % sigs_file) 261 raise RuntimeError('Can\'t load signatures from %s' % sigs_file)
255 262
256 return sigs 263 return (sigs, tune2tasks)
257 264
258def get_depgraph(targets=['world']): 265def get_depgraph(targets=['world']):
259 ''' 266 '''