summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-01-23 00:59:48 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-24 09:40:32 +0000
commitd3a4f72896aaea7374bd8915cfe3adaaecc55a2d (patch)
tree0bd76cd1c224afe941bed4b0bb88551647cd7cb7 /meta/lib/oe
parenta9dfcedd21a5fe212d237633f40e2efcdfb34690 (diff)
downloadpoky-d3a4f72896aaea7374bd8915cfe3adaaecc55a2d.tar.gz
classes/populate_sdk_ext: add option to bring in pkgdata for world
Add a variable SDK_INCLUDE_PKGDATA which you can set to "1" to include pkgdata for all recipes in the world target. There are a couple of uses for this: 1) If you use "devtool add" to add a recipe that builds something which depends on anything in world, the dependency can then be correctly mapped to the recipe providing it and that recipe can be added to DEPENDS, since we have the pkg-config and shared library dependency data within pkgdata. 2) You'll be able to search for these recipes and any files they package for the target with "devtool search" since that also uses pkgdata This of course assumes you've tailored world through EXCLUDE_FROM_WORLD to only include recipes you'd want built in your distro, but I think that's a reasonable assumption; failing that there is a WORLD_PKGDATA_EXCLUDE variable that you can set to exclude any recipes you don't want. Note that this patch relies on functionality implemented in a recent BitBake patch and will not work without it. Implements [YOCTO #8600]. (From OE-Core rev: 67149ea097d6fab7496b43e85a40853f40bd527e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/copy_buildsystem.py58
1 files changed, 56 insertions, 2 deletions
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index a5ca3df320..64755107d8 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -93,10 +93,64 @@ def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output
93 invalue = True 93 invalue = True
94 f.write(line) 94 f.write(line)
95 95
96def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_output, copy_output):
97 merged = {}
98 arch_order = []
99 with open(lockedsigs_main, 'r') as f:
100 invalue = None
101 for line in f:
102 if invalue:
103 if line.endswith('\\\n'):
104 merged[invalue].append(line)
105 else:
106 invalue = None
107 elif line.startswith('SIGGEN_LOCKEDSIGS_t-'):
108 invalue = line[18:].split('=', 1)[0].rstrip()
109 merged[invalue] = []
110 arch_order.append(invalue)
111
112 with open(lockedsigs_extra, 'r') as f:
113 invalue = None
114 tocopy = {}
115 for line in f:
116 if invalue:
117 if line.endswith('\\\n'):
118 if not line in merged[invalue]:
119 target, task = line.strip().split(':')[:2]
120 if task in copy_tasks:
121 tocopy[invalue].append(line)
122 merged[invalue].append(line)
123 else:
124 invalue = None
125 elif line.startswith('SIGGEN_LOCKEDSIGS_t-'):
126 invalue = line[18:].split('=', 1)[0].rstrip()
127 if not invalue in merged:
128 merged[invalue] = []
129 arch_order.append(invalue)
130 tocopy[invalue] = []
131
132 def write_sigs_file(fn, types, sigs):
133 fulltypes = []
134 bb.utils.mkdirhier(os.path.dirname(fn))
135 with open(fn, 'w') as f:
136 for typename in types:
137 lines = sigs[typename]
138 if lines:
139 f.write('SIGGEN_LOCKEDSIGS_%s = "\\\n' % typename)
140 for line in lines:
141 f.write(line)
142 f.write(' "\n')
143 fulltypes.append(typename)
144 f.write('SIGGEN_LOCKEDSIGS_TYPES = "%s"\n' % ' '.join(fulltypes))
145
146 write_sigs_file(copy_output, tocopy.keys(), tocopy)
147 write_sigs_file(merged_output, arch_order, merged)
148
96def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cache, d, fixedlsbstring=""): 149def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cache, d, fixedlsbstring=""):
97 bb.note('Generating sstate-cache...') 150 bb.note('Generating sstate-cache...')
98 151
99 bb.process.run("gen-lockedsig-cache %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache)) 152 bb.process.run("gen-lockedsig-cache %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache))
100 if fixedlsbstring: 153 if fixedlsbstring:
101 os.rename(output_sstate_cache + '/' + d.getVar('NATIVELSBSTRING', True), 154 nativedir = output_sstate_cache + '/' + d.getVar('NATIVELSBSTRING', True)
102 output_sstate_cache + '/' + fixedlsbstring) 155 if os.path.isdir(nativedir):
156 os.rename(nativedir, output_sstate_cache + '/' + fixedlsbstring)