summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/copy_buildsystem.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-07-25 20:41:39 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-26 08:56:31 +0100
commit0b2ca6687404999a3f663b116259c041a39d389d (patch)
treed7a58b786b23e1547d5395527d239cdb6e6a8156 /meta/lib/oe/copy_buildsystem.py
parent2ac1fdf53741f1943623df47c7a2bfa2a91544b9 (diff)
downloadpoky-0b2ca6687404999a3f663b116259c041a39d389d.tar.gz
classes/populate_sdk_ext: filter sstate within the extensible SDK
Use the new oe-check-sstate to filter the sstate artifacts shipped with the extensible SDK by effectively running bitbake within the produced eSDK and and getting it to tell us which tasks it will restore from sstate. This has several benefits: 1) We drop the *-initial artifacts from the minimal + toolchain eSDK. This still leaves us with a reasonably large SDK for this configuration, however it does pave the way for future reductions since we are actually filtering by what will be expected to be there on install rather than hoping that whatever cuts we make will match. 2) We verify bitbake's basic operation within the eSDK, i.e. that we haven't messed up the configuration 3) We verify that the sstate artifacts we expect to be present are present (at least in the sstate cache for the build producing the eSDK). Outside deletion of sstate artifacts has been a problem up to now, and this should at least catch that earlier i.e. during the build rather than when someone tries to install the eSDK. This does add a couple of minutes to the do_populate_sdk_ext time, but it seems like the most appropriate way to handle this. Should mostly address [YOCTO #9083] and [YOCTO #9626]. (From OE-Core rev: 4b7b48fcb9b39fccf8222650c2608325df2a4507) 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/copy_buildsystem.py')
-rw-r--r--meta/lib/oe/copy_buildsystem.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index b5f546f99f..4d3faf6681 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -200,11 +200,11 @@ def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_outpu
200 if merged_output: 200 if merged_output:
201 write_sigs_file(merged_output, arch_order, merged) 201 write_sigs_file(merged_output, arch_order, merged)
202 202
203def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cache, d, fixedlsbstring=""): 203def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cache, d, fixedlsbstring="", filterfile=None):
204 bb.note('Generating sstate-cache...') 204 bb.note('Generating sstate-cache...')
205 205
206 nativelsbstring = d.getVar('NATIVELSBSTRING', True) 206 nativelsbstring = d.getVar('NATIVELSBSTRING', True)
207 bb.process.run("gen-lockedsig-cache %s %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache, nativelsbstring)) 207 bb.process.run("gen-lockedsig-cache %s %s %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache, nativelsbstring, filterfile or ''))
208 if fixedlsbstring: 208 if fixedlsbstring:
209 nativedir = output_sstate_cache + '/' + nativelsbstring 209 nativedir = output_sstate_cache + '/' + nativelsbstring
210 if os.path.isdir(nativedir): 210 if os.path.isdir(nativedir):
@@ -216,3 +216,21 @@ def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cac
216 src = os.path.join(nativedir, i) 216 src = os.path.join(nativedir, i)
217 dest = os.path.join(destdir, i) 217 dest = os.path.join(destdir, i)
218 os.rename(src, dest) 218 os.rename(src, dest)
219
220def check_sstate_task_list(d, targets, filteroutfile, cmdprefix='', cwd=None, logfile=None):
221 import subprocess
222
223 bb.note('Generating sstate task list...')
224
225 if not cwd:
226 cwd = os.getcwd()
227 if logfile:
228 logparam = '-l %s' % logfile
229 else:
230 logparam = ''
231 cmd = "%sBB_SETSCENE_ENFORCE=1 PSEUDO_DISABLED=1 oe-check-sstate %s -s -o %s %s" % (cmdprefix, targets, filteroutfile, logparam)
232 env = dict(d.getVar('BB_ORIGENV', False))
233 env.pop('BUILDDIR', '')
234 pathitems = env['PATH'].split(':')
235 env['PATH'] = ':'.join([item for item in pathitems if not item.endswith('/bitbake/bin')])
236 bb.process.run(cmd, stderr=subprocess.STDOUT, env=env, cwd=cwd, executable='/bin/bash')