diff options
author | Ross Burton <ross.burton@intel.com> | 2018-09-28 14:45:41 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-01 13:04:50 +0100 |
commit | 4771a7c2ed3e7375c4733210e3cae4c8210044e1 (patch) | |
tree | a46e02f9b07c08b315cd2f0c11a7bd46f96e8be6 /meta/classes/archiver.bbclass | |
parent | e85f567f9669193b9214f935bce459eac1920844 (diff) | |
download | poky-4771a7c2ed3e7375c4733210e3cae4c8210044e1.tar.gz |
archiver: generalise task running when in configured mode
When in configured mode the archive will re-run configure itself, but that
doesn't work if there are other tasks that need to run such as cmake's
generate_toolchain_file.
Instead of hard-coding a list of classes and tasks, obtain the list of tasks
preceeding do_configure, filter out ones we don't want to re-run such as
do_patch and do_prepare_recipe_sysroot, and run those too.
(From OE-Core rev: fe26382f94d8cb7d2453d9937aee451b757252b8)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/archiver.bbclass')
-rw-r--r-- | meta/classes/archiver.bbclass | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 7c3e701e70..a54cf948f3 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass | |||
@@ -246,21 +246,27 @@ python do_ar_configured() { | |||
246 | # do_configure, we archive the already configured ${S} to | 246 | # do_configure, we archive the already configured ${S} to |
247 | # instead of. | 247 | # instead of. |
248 | elif pn != 'libtool-native': | 248 | elif pn != 'libtool-native': |
249 | def runTask(task): | ||
250 | bb.warn("running %s" % task) | ||
251 | prefuncs = d.getVarFlag(task, 'prefuncs') or '' | ||
252 | for func in prefuncs.split(): | ||
253 | if func != "sysroot_cleansstate": | ||
254 | bb.build.exec_func(func, d) | ||
255 | bb.build.exec_func(task, d) | ||
256 | postfuncs = d.getVarFlag(task, 'postfuncs') or '' | ||
257 | for func in postfuncs.split(): | ||
258 | if func != 'do_qa_configure': | ||
259 | bb.build.exec_func(func, d) | ||
260 | |||
249 | # Change the WORKDIR to make do_configure run in another dir. | 261 | # Change the WORKDIR to make do_configure run in another dir. |
250 | d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR')) | 262 | d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR')) |
251 | if bb.data.inherits_class('kernel-yocto', d): | 263 | |
252 | bb.build.exec_func('do_kernel_configme', d) | 264 | preceeds = bb.build.preceedtask('do_configure', False, d) |
253 | if bb.data.inherits_class('cmake', d): | 265 | for task in preceeds: |
254 | bb.build.exec_func('do_generate_toolchain_file', d) | 266 | if task != 'do_patch' and task != 'do_prepare_recipe_sysroot': |
255 | prefuncs = d.getVarFlag('do_configure', 'prefuncs') | 267 | runTask(task) |
256 | for func in (prefuncs or '').split(): | 268 | runTask('do_configure') |
257 | if func != "sysroot_cleansstate": | 269 | |
258 | bb.build.exec_func(func, d) | ||
259 | bb.build.exec_func('do_configure', d) | ||
260 | postfuncs = d.getVarFlag('do_configure', 'postfuncs') | ||
261 | for func in (postfuncs or '').split(): | ||
262 | if func != "do_qa_configure": | ||
263 | bb.build.exec_func(func, d) | ||
264 | srcdir = d.getVar('S') | 270 | srcdir = d.getVar('S') |
265 | builddir = d.getVar('B') | 271 | builddir = d.getVar('B') |
266 | if srcdir != builddir: | 272 | if srcdir != builddir: |