diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2016-03-22 14:04:02 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-24 21:44:27 +0000 |
commit | 5be5eae2e1630a151a9f5866d60325d439150ced (patch) | |
tree | ae8f0229b67b052078223261b5dcc06533a60846 /meta | |
parent | 09dfc99a813090043262529beb6d900900e983dc (diff) | |
download | openembedded-core-5be5eae2e1630a151a9f5866d60325d439150ced.tar.gz openembedded-core-5be5eae2e1630a151a9f5866d60325d439150ced.tar.bz2 openembedded-core-5be5eae2e1630a151a9f5866d60325d439150ced.zip |
archiver.bbclass: Fix gcc-source corner case
Bitbake couldn't add the task ar_configured when
trying to archive the configured source for
gcc-source-${PV} recipes. This is because the task
depended in the do_configure and this task doesn't
exist for gcc-source.
This fix allows to archive configured gcc-source recipe.
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/archiver.bbclass | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 4064674294..d709f788a7 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass @@ -73,8 +73,15 @@ python () { # We can't use "addtask do_ar_configured after do_configure" since it # will cause the deptask of do_populate_sysroot to run not matter what # archives we need, so we add the depends here. - d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' % pn) + + # There is a corner case with "gcc-source-${PV}" recipes, they don't have + # the "do_configure" task, so we need to use "do_preconfigure" + if pn.startswith("gcc-source-"): + d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_preconfigure' % pn) + else: + d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' % pn) d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_configured' % pn) + elif ar_src: bb.fatal("Invalid ARCHIVER_MODE[src]: %s" % ar_src) @@ -168,11 +175,18 @@ python do_ar_configured() { ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) if d.getVarFlag('ARCHIVER_MODE', 'src', True) == 'configured': bb.note('Archiving the configured source...') + pn = d.getVar('PN', True) + # "gcc-source-${PV}" recipes don't have "do_configure" + # task, so we need to run "do_preconfigure" instead + if pn.startswith("gcc-source-"): + d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True)) + bb.build.exec_func('do_preconfigure', d) + # The libtool-native's do_configure will remove the # ${STAGING_DATADIR}/aclocal/libtool.m4, so we can't re-run the # do_configure, we archive the already configured ${S} to # instead of. - if d.getVar('PN', True) != 'libtool-native': + elif pn != 'libtool-native': # Change the WORKDIR to make do_configure run in another dir. d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True)) if bb.data.inherits_class('kernel-yocto', d): |