summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-09-28 14:45:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-01 13:04:44 +0100
commit5c8aa1f41f04519a8ba3997c0d8e3a71fe270fae (patch)
treeb779f75f990ec6f3dc96a4d7415e13c02352d02f
parent25f7c6c329038b443d36074fff45a30ba3712f7a (diff)
downloadopenembedded-core-contrib-5c8aa1f41f04519a8ba3997c0d8e3a71fe270fae.tar.gz
openembedded-core-contrib-5c8aa1f41f04519a8ba3997c0d8e3a71fe270fae.tar.bz2
openembedded-core-contrib-5c8aa1f41f04519a8ba3997c0d8e3a71fe270fae.zip
archiver: check tasks exist before adding dependencies
Some recipes don't have do_configure, or have them but are marked as noexec. Check for their existance before hooking up dependencies. [ YOCTO #12868 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/archiver.bbclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 31c9b7eb4b..7c3e701e70 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -98,9 +98,12 @@ python () {
# 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-"):
+ def hasTask(task):
+ return bool(d.getVarFlag(task, "task", False)) and not bool(d.getVarFlag(task, "noexec", False))
+
+ if hasTask("do_preconfigure"):
d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_preconfigure' % pn)
- else:
+ elif hasTask("do_configure"):
d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' % pn)
d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_configured' % pn)