diff options
Diffstat (limited to 'meta/lib/oe/copy_buildsystem.py')
| -rw-r--r-- | meta/lib/oe/copy_buildsystem.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py index 5a4d8c332e..cf7fada7f0 100644 --- a/meta/lib/oe/copy_buildsystem.py +++ b/meta/lib/oe/copy_buildsystem.py | |||
| @@ -68,3 +68,35 @@ class BuildSystem(object): | |||
| 68 | _smart_copy(layer, layerdestpath) | 68 | _smart_copy(layer, layerdestpath) |
| 69 | 69 | ||
| 70 | return layers_copied | 70 | return layers_copied |
| 71 | |||
| 72 | def generate_locked_sigs(sigfile, d): | ||
| 73 | bb.utils.mkdirhier(os.path.dirname(sigfile)) | ||
| 74 | depd = d.getVar('BB_TASKDEPDATA', True) | ||
| 75 | tasks = ['%s.%s' % (v[2], v[1]) for v in depd.itervalues()] | ||
| 76 | bb.parse.siggen.dump_lockedsigs(sigfile, tasks) | ||
| 77 | |||
| 78 | def prune_lockedsigs(allowed_tasks, excluded_targets, lockedsigs, pruned_output): | ||
| 79 | with open(lockedsigs, 'r') as infile: | ||
| 80 | bb.utils.mkdirhier(os.path.dirname(pruned_output)) | ||
| 81 | with open(pruned_output, 'w') as f: | ||
| 82 | invalue = False | ||
| 83 | for line in infile: | ||
| 84 | if invalue: | ||
| 85 | if line.endswith('\\\n'): | ||
| 86 | splitval = line.strip().split(':') | ||
| 87 | if splitval[1] in allowed_tasks and not splitval[0] in excluded_targets: | ||
| 88 | f.write(line) | ||
| 89 | else: | ||
| 90 | f.write(line) | ||
| 91 | invalue = False | ||
| 92 | elif line.startswith('SIGGEN_LOCKEDSIGS'): | ||
| 93 | invalue = True | ||
| 94 | f.write(line) | ||
| 95 | |||
| 96 | def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cache, d, fixedlsbstring=""): | ||
| 97 | bb.note('Generating sstate-cache...') | ||
| 98 | |||
| 99 | bb.process.run("gen-lockedsig-cache %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache)) | ||
| 100 | if fixedlsbstring: | ||
| 101 | os.rename(output_sstate_cache + '/' + d.getVar('NATIVELSBSTRING', True), | ||
| 102 | output_sstate_cache + '/' + fixedlsbstring) | ||
