1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

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>
This commit is contained in:
Paul Eggleton
2016-01-23 00:59:48 +13:00
committed by Richard Purdie
parent a9dfcedd21
commit d3a4f72896
4 changed files with 131 additions and 7 deletions
+56 -2
View File
@@ -93,10 +93,64 @@ def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output
invalue = True
f.write(line)
def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_output, copy_output):
merged = {}
arch_order = []
with open(lockedsigs_main, 'r') as f:
invalue = None
for line in f:
if invalue:
if line.endswith('\\\n'):
merged[invalue].append(line)
else:
invalue = None
elif line.startswith('SIGGEN_LOCKEDSIGS_t-'):
invalue = line[18:].split('=', 1)[0].rstrip()
merged[invalue] = []
arch_order.append(invalue)
with open(lockedsigs_extra, 'r') as f:
invalue = None
tocopy = {}
for line in f:
if invalue:
if line.endswith('\\\n'):
if not line in merged[invalue]:
target, task = line.strip().split(':')[:2]
if task in copy_tasks:
tocopy[invalue].append(line)
merged[invalue].append(line)
else:
invalue = None
elif line.startswith('SIGGEN_LOCKEDSIGS_t-'):
invalue = line[18:].split('=', 1)[0].rstrip()
if not invalue in merged:
merged[invalue] = []
arch_order.append(invalue)
tocopy[invalue] = []
def write_sigs_file(fn, types, sigs):
fulltypes = []
bb.utils.mkdirhier(os.path.dirname(fn))
with open(fn, 'w') as f:
for typename in types:
lines = sigs[typename]
if lines:
f.write('SIGGEN_LOCKEDSIGS_%s = "\\\n' % typename)
for line in lines:
f.write(line)
f.write(' "\n')
fulltypes.append(typename)
f.write('SIGGEN_LOCKEDSIGS_TYPES = "%s"\n' % ' '.join(fulltypes))
write_sigs_file(copy_output, tocopy.keys(), tocopy)
write_sigs_file(merged_output, arch_order, merged)
def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cache, d, fixedlsbstring=""):
bb.note('Generating sstate-cache...')
bb.process.run("gen-lockedsig-cache %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache))
if fixedlsbstring:
os.rename(output_sstate_cache + '/' + d.getVar('NATIVELSBSTRING', True),
output_sstate_cache + '/' + fixedlsbstring)
nativedir = output_sstate_cache + '/' + d.getVar('NATIVELSBSTRING', True)
if os.path.isdir(nativedir):
os.rename(nativedir, output_sstate_cache + '/' + fixedlsbstring)