[OE-core] [PATCH 1/2] archiver: check tasks exist before adding dependencies
Ross Burton
ross.burton at intel.com
Fri Sep 28 13:45:40 UTC 2018
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 at intel.com>
---
meta/classes/archiver.bbclass | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 31c9b7eb4b6..7c3e701e704 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)
--
2.11.0
More information about the Openembedded-core
mailing list