diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-01-13 10:39:03 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-15 11:54:51 +0000 |
commit | cf0aea78b0e8396f6d01638db948958cb607275d (patch) | |
tree | 63cc4d127a76741b2d0a035caf667fbe7b38cc53 /meta/classes | |
parent | ea29bec6c7bf08cd862b45703bfb8be3ca129d1e (diff) | |
download | poky-cf0aea78b0e8396f6d01638db948958cb607275d.tar.gz |
classes/populate_sdk_ext: avoid unnecessary sstate being brought in
Create a separate task where we can just have the recursive dependencies
for the tasks corresponding to constructing the SDK content (i.e. from
the image contents). This avoids us recursing into dependencies from
buildtools and getting a bunch of nativesdk stuff, for example.
(This isn't an ideal way to have to implement it, but without
overcomplicating things on the BitBake side just for this use-case I
can't see a better way.)
(From OE-Core rev: eabeb26335b1a4eb1e68218160dbdbe8fdf36272)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index 4d8d2a6257..2f788ee7dc 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
@@ -182,11 +182,9 @@ python copy_buildsystem () { | |||
182 | if line.strip() and not line.startswith('#'): | 182 | if line.strip() and not line.startswith('#'): |
183 | f.write(line) | 183 | f.write(line) |
184 | 184 | ||
185 | sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc' | ||
186 | oe.copy_buildsystem.generate_locked_sigs(sigfile, d) | ||
187 | |||
188 | # Filter the locked signatures file to just the sstate tasks we are interested in | 185 | # Filter the locked signatures file to just the sstate tasks we are interested in |
189 | excluded_targets = d.getVar('SDK_TARGETS', True) | 186 | excluded_targets = d.getVar('SDK_TARGETS', True) |
187 | sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc' | ||
190 | lockedsigs_pruned = baseoutpath + '/conf/locked-sigs.inc' | 188 | lockedsigs_pruned = baseoutpath + '/conf/locked-sigs.inc' |
191 | oe.copy_buildsystem.prune_lockedsigs([], | 189 | oe.copy_buildsystem.prune_lockedsigs([], |
192 | excluded_targets.split(), | 190 | excluded_targets.split(), |
@@ -288,6 +286,24 @@ fakeroot python do_populate_sdk_ext() { | |||
288 | bb.build.exec_func("do_populate_sdk", d) | 286 | bb.build.exec_func("do_populate_sdk", d) |
289 | } | 287 | } |
290 | 288 | ||
289 | def get_ext_sdk_depends(d): | ||
290 | return d.getVarFlag('do_rootfs', 'depends', True) + ' ' + d.getVarFlag('do_build', 'depends', True) | ||
291 | |||
292 | python do_sdk_depends() { | ||
293 | # We have to do this separately in its own task so we avoid recursing into | ||
294 | # dependencies we don't need to (e.g. buildtools-tarball) and bringing those | ||
295 | # into the SDK's sstate-cache | ||
296 | import oe.copy_buildsystem | ||
297 | sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc' | ||
298 | oe.copy_buildsystem.generate_locked_sigs(sigfile, d) | ||
299 | } | ||
300 | addtask sdk_depends | ||
301 | |||
302 | do_sdk_depends[dirs] = "${WORKDIR}" | ||
303 | do_sdk_depends[depends] = "${@get_ext_sdk_depends(d)}" | ||
304 | do_sdk_depends[recrdeptask] = "${@d.getVarFlag('do_populate_sdk', 'recrdeptask', False)}" | ||
305 | do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy" | ||
306 | |||
291 | def get_sdk_ext_rdepends(d): | 307 | def get_sdk_ext_rdepends(d): |
292 | localdata = d.createCopy() | 308 | localdata = d.createCopy() |
293 | localdata.appendVar('OVERRIDES', ':task-populate-sdk-ext') | 309 | localdata.appendVar('OVERRIDES', ':task-populate-sdk-ext') |
@@ -297,15 +313,12 @@ def get_sdk_ext_rdepends(d): | |||
297 | do_populate_sdk_ext[dirs] = "${@d.getVarFlag('do_populate_sdk', 'dirs', False)}" | 313 | do_populate_sdk_ext[dirs] = "${@d.getVarFlag('do_populate_sdk', 'dirs', False)}" |
298 | do_populate_sdk_ext[depends] += "${@d.getVarFlag('do_populate_sdk', 'depends', False)}" | 314 | do_populate_sdk_ext[depends] += "${@d.getVarFlag('do_populate_sdk', 'depends', False)}" |
299 | do_populate_sdk_ext[rdepends] = "${@get_sdk_ext_rdepends(d)}" | 315 | do_populate_sdk_ext[rdepends] = "${@get_sdk_ext_rdepends(d)}" |
300 | do_populate_sdk_ext[recrdeptask] += "${@d.getVarFlag('do_populate_sdk', 'recrdeptask', False)}" | ||
301 | |||
302 | 316 | ||
303 | do_populate_sdk_ext[depends] += "buildtools-tarball:do_populate_sdk uninative-tarball:do_populate_sdk" | 317 | do_populate_sdk_ext[depends] += "buildtools-tarball:do_populate_sdk uninative-tarball:do_populate_sdk" |
304 | 318 | ||
305 | do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':do_build' for x in d.getVar('SDK_TARGETS', True).split()])}" | 319 | do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':do_build' for x in d.getVar('SDK_TARGETS', True).split()])}" |
306 | do_populate_sdk_ext[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy" | ||
307 | 320 | ||
308 | # Make sure codes change in copy_buildsystem can result in rebuilt | 321 | # Make sure codes change in copy_buildsystem can result in rebuilt |
309 | do_populate_sdk_ext[vardeps] += "copy_buildsystem" | 322 | do_populate_sdk_ext[vardeps] += "copy_buildsystem" |
310 | 323 | ||
311 | addtask populate_sdk_ext | 324 | addtask populate_sdk_ext after do_sdk_depends |