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:44 +0100 |
commit | fe26382f94d8cb7d2453d9937aee451b757252b8 (patch) | |
tree | 839b0b4ab94cf99b178b794a061dbac61fa6a95a | |
parent | 5c8aa1f41f04519a8ba3997c0d8e3a71fe270fae (diff) | |
download | openembedded-core-fe26382f94d8cb7d2453d9937aee451b757252b8.tar.gz openembedded-core-fe26382f94d8cb7d2453d9937aee451b757252b8.tar.bz2 openembedded-core-fe26382f94d8cb7d2453d9937aee451b757252b8.zip |
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.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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() { # do_configure, we archive the already configured ${S} to # instead of. elif pn != 'libtool-native': + def runTask(task): + bb.warn("running %s" % task) + prefuncs = d.getVarFlag(task, 'prefuncs') or '' + for func in prefuncs.split(): + if func != "sysroot_cleansstate": + bb.build.exec_func(func, d) + bb.build.exec_func(task, d) + postfuncs = d.getVarFlag(task, 'postfuncs') or '' + for func in postfuncs.split(): + if func != 'do_qa_configure': + bb.build.exec_func(func, d) + # Change the WORKDIR to make do_configure run in another dir. d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR')) - if bb.data.inherits_class('kernel-yocto', d): - bb.build.exec_func('do_kernel_configme', d) - if bb.data.inherits_class('cmake', d): - bb.build.exec_func('do_generate_toolchain_file', d) - prefuncs = d.getVarFlag('do_configure', 'prefuncs') - for func in (prefuncs or '').split(): - if func != "sysroot_cleansstate": - bb.build.exec_func(func, d) - bb.build.exec_func('do_configure', d) - postfuncs = d.getVarFlag('do_configure', 'postfuncs') - for func in (postfuncs or '').split(): - if func != "do_qa_configure": - bb.build.exec_func(func, d) + + preceeds = bb.build.preceedtask('do_configure', False, d) + for task in preceeds: + if task != 'do_patch' and task != 'do_prepare_recipe_sysroot': + runTask(task) + runTask('do_configure') + srcdir = d.getVar('S') builddir = d.getVar('B') if srcdir != builddir: |